$(document).ready(function(){
			$(document).pngFix();
		// slide show
			 var crrIMG = 0;			   
			 var $slideIMG = $('.slide .slide_img img');	
			 var size = $slideIMG.size();
			 //khi load len thi se hien phan tu dau tien
			 $('.slide .slide_img img:gt(0)').hide();
			 //dat id cho cac thanh phan trong img
			 $slideIMG.attr("id",function(data){
					return "img"+data;					  
			 });
			 function showIMG(crrIndex)
			 {
				 $slideIMG.fadeOut();
				 $('.slide .slide_img #img'+crrIndex).fadeIn();  
			 }
			 function playSlide()
			 {
				 play = setInterval(function(){
					if(crrIMG < (size-1))
					{
						crrIMG += 1;
						showIMG(crrIMG);
					}
					else
					{
						crrIMG = 0;
						showIMG(crrIMG);
					}
				 },4000);
			 }
			 playSlide();
			 function resetSlide()
			 {
				 clearInterval(play);
				 playSlide();
			 }
			 
		//==================================================================
		$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'light_square',slideshow:10000, autoplay_slideshow: false});
			$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000});
			
			$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
				custom_markup: '<div id="map_canvas"></div>',
				changepicturecallback: function(){ initialize(); }
			});

			$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
				custom_markup: '<div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
				changepicturecallback: function(){ _bsap.exec(); }
			});
	});
