$(document).ready(function(){
	$('.popupBG').each(function(){
		$('body').append(this);
		$(this).css('z-index', 9999);
	});
	$('.healingChart>a.showLarge').click(function(evt){
		$('#popupBG').attr('sTop', $(document).scrollTop());
		$(document).scrollTop(0);
		var cont = $(this).parent().find('.cont');
		var img = cont.find('>img').attr('rel');
		if(img == 'pic3') {
			$('.info > p:first-child').attr("style","font-size: 14px;color: #552389");
			$('.info > p:first-child').addClass('first');
		}
		var data = '<div class="info">' + cont.find('.info').html() + '</div>';
		$('.popupBG').width($(document).width()).show();
		if($.browser.msie && $.browser.version!='7.0'){
			$('.popupBG').width($('.popupBG').width()-20);
		}
		if(img == 'pic3'){
			$('#healingPopTitle').removeClass();
			$('#healingPopTitle').addClass("top newBg");
			
		}else if(img == 'pic4'){
			$('#healingPopTitle').removeClass();
			$('#healingPopTitle').addClass("top");
		}
		$('#healingChartPopup .cont>img').hide();
		$('#healingChartPopup .cont>img[rel="' + img + '"]').show();
		$('#healingChartPopup .cont').append(data);
		setTimeout(function(){
			$('.popupBG').height($(document).height());
			$('#popupBG').css({opacity:0.5, backgroundColor:'#000'}).bgiframe();
		}, 0);
	});
	$('#healingChartPopup a.close').click(function(){	
		$('.healingChart .cont p.first').attr("style","font-size: 13px");
		$('.healingChart .cont p.first').removeClass();
		
		$('#healingChartPopup .info').remove();
		$('.popupBG').hide();
	});
});