$(document).ready(function(){		$("#work_thumbs").easySlider({vertical:true, pagination:'#work_types li', controlsShow:false});	$("#projects").easySlider({controlsShow:false, pagination:'.pag li',  speed:  1000});	$("#projects2").easySlider({controlsShow:false, pagination:'.pag2 li',  speed:  1000});	//$("#people, #clients").easySlider({vertical:true, controlsShow:false, pagination:'#pag li',  speed:  1000});	$("#clients").easySlider({vertical:true, controlsShow:false, pagination:'#pag li',  speed:  1000});	var t = 0;	/*	$("#people_nav li").hover(		function() {		$(this).stop(				function(){					$(this).children("img.a").animate({"opacity": "0"});				});		},		function() {		$(this).stop(				function(){					$(this).children("img.a").animate({"opacity": "1"});				});			});		*/	$("#people_nav li").hover(		function() {		$(this).find("img.a").stop().animate({"opacity": "0"});		},		function() {		$(this).find("img.a").stop().animate({"opacity": "1"}, "slow");	});	$(".person img.a").hover(		function() {		$(this).stop().animate({"opacity": "0"});		},		function() {		$(this).stop().animate({"opacity": "1"}, "slow");	});	$('a.light_box').lightBox();	$("#agents_btn").click(function(){  		centerPopup();  //centering with css  		loadPopup();  //load popup  	});	$("#popupContactClose").click(function(){  		disablePopup();  	});  		$("#backgroundPopup").click(function(){  //Click out event!  		disablePopup();  	});    $('.splash, .marker').each(function () {    // options    var distance = 5;    var time = 200;    var hideDelay = 200;    var hideDelayTimer = null;    // tracker    var beingShown = false;    var shown = false;        var trigger = $('.trigger', this);    var popup = $('.popup, .map_popup', this).css('opacity', 0);    // set the mouseover and mouseout on both element    $([trigger.get(0), popup.get(0)]).mouseover(function () {      // stops the hide event if we move from the trigger to the popup element      if (hideDelayTimer) clearTimeout(hideDelayTimer);      // don't trigger the animation again if we're being shown, or already visible      if (beingShown || shown) {        return;      } else {        beingShown = true;        // reset position of popup box        popup.css({          top: 0,          left: 0,          display: 'block' // brings the popup back in to view        })		        // (we're using chaining on the popup) now animate it's opacity and position        .animate({          top: '-=' + distance + 'px',          opacity: 1        }, time, 'swing', function() {          // once the animation is complete, set the tracker variables          beingShown = false;          shown = true;        });      }    }).mouseout(function () {      // reset the timer if we get fired again - avoids double animations      if (hideDelayTimer) clearTimeout(hideDelayTimer);            // store the timer so that it can be cleared in the mouseover if required      hideDelayTimer = setTimeout(function () {        hideDelayTimer = null;        popup.animate({          top: '-=' + distance + 'px',          opacity: 0        }, time, 'swing', function () {          // once the animate is complete, set the tracker variables          shown = false;          // hide the popup entirely after the effect (opacity alone doesn't do the job)          popup.css('display', 'none');        });      }, hideDelay);    });  });});var popupStatus = 0;  //0 means disabled; 1 means enabled;  function loadPopup(){ 		if(popupStatus==0){  //loads popup only if it is disabled  		$("#backgroundPopup").css({  			"opacity": "0.7"  		});  		$("#backgroundPopup").fadeIn("slow");  		$("#popupContact").fadeIn("slow");  		popupStatus = 1;  	}  } function disablePopup(){  	if(popupStatus==1){  //disables popup only if it is enabled  		$("#backgroundPopup").fadeOut("slow");  		$("#popupContact").fadeOut("slow");  		popupStatus = 0;  	}  }  function centerPopup(){  	//request data for centering  	var windowWidth = document.documentElement.clientWidth;  	var windowHeight = document.documentElement.clientHeight;  	var popupHeight = $("#popupContact").height();  	var popupWidth = $("#popupContact").width();  	//centering  	$("#popupContact").css({  		"position": "absolute",  		/*"top": (windowHeight/2-popupHeight/2),  		"left": windowWidth/2-popupWidth/2 */		"top": 115,		"left": 40 	});  	//only need force for IE6    	$("#backgroundPopup").css({  		"height": windowHeight  	});  }  function displayFlash(){	var flashvars = {};		var params = {};	params.wmode = "transparent";	var attributes = {};	swfobject.embedSWF("images/home.swf", "home_flash", "100%", "630", "8.0.0", "includes/script/expressInstall.swf", flashvars, params, attributes);}
