$(document).ready(function(){	
				$("a[rel='iframe']").colorbox({width:"720px", height:"615px",iframe:true});	
				$(".iframe").colorbox({width:"600px", height:"430px", iframe:true});
                $("a[rel='picshow']").colorbox();
                $("a[rel='iframe_youtoube']").colorbox({width:"705px", height:"480px",iframe:true});
                $("a[rel='headerlink']").colorbox({width:"705px", height:"480px",iframe:true, arrowKey:false});	
				

			});	

//nav 
$(document).ready(function(){ 
      $("ul.sf-menu").superfish({pathClass:'current',delay:1000,animation:{opacity:'show'},speed:'fast',autoArrows:false,dropShadows:false}); 
}); 

//slideshows
$('.refslide').cycle({fx:'scrollHorz',speedOut:400,speedIn: 600,timeout: 0,next: '#slideright,#sr ',prev: '#slideleft,#sl' ,sync: 1	
});
//picturefade
$('.autoslide').cycle({fx:'fade',speed:3000,timeout:8000}); 
		
// slideshownav
$(document).ready(function(){
$("#showleft").mouseenter(function(){
$("#slideleft_stage").fadeIn(1200);
});
$("#showleft").mouseleave(function(){
$("#slideleft_stage").fadeOut(600);
});
$("#showright").mouseenter(function(){
$("#slideright_stage").fadeIn(1200);
});
$("#showright").mouseleave(function(){
$("#slideright_stage").fadeOut(600);
});
});

//center
function centermainlayer() {
		var mainstyle=document.getElementById("mainlayer").style;
		newleft=Math.round(document.body.clientWidth/2)-525;
		if (newleft>0) {
			mainstyle.left=newleft+"px";
		}
//		newtop=25;
//		mainstyle.top=newtop+"px";
}
window.onresize=centermainlayer;







