var menu;var folio;var menu_loaded = false;var folio_loaded = false;$(document).ready(function(){			$('.staff a').click(function () {						var staffId = $(this).parents('div.staff').attr('id').substr(6);				$('html').animate({scrollTop: 0}, 150, 'swing', function(){			$('#staff-member').slideUp(300, function(){				$('#staff-member').load('/ajax/page_staff/'+staffId, function(){ $('#staff-member').slideDown(300); });			});		});		return false;		});				/***************/	/**** FOLIO ****/	/***************/		$('#folio_container a.prev').click( function() { return false; });	$('#folio_container a.prev').mousedown( function() { folio.scrollLeft(); return false; });	$('#folio_container a.prev').mouseup( function() { folio.stopScroll(); return false; });		$('#folio_container a.next').click( function() { return false; });	$('#folio_container a.next').mousedown( function() { folio.scrollRight(); return false; });	$('#folio_container a.next').mouseup( function() { folio.stopScroll(); return false; });			$('ul.medias div.media_pane').css('display','none');	$('ul.medias li h4').wrapInner('<a href="#"></a>').click(function(){		$(this).next("div.media_pane:first").toggle('slow');		return false;	});			$('#search-form').submit( function() {		if($('#keywords').val() == '') return false;			});			$("a.open").fancybox({		'overlayOpacity'    : '0.97',		'titlePosition' 	: 'outside',		'enableEscapeButton' : 'false'	});				$('#solstice-form').ajaxForm(	{		target:"#hiddenDIV",     //set response to go into hidden div      		beforeSubmit:function()  //before sending submit, give user notification... 	 	{  	   		$("#msg").html("Sending...");  	   		$("#msg").css({border:"1px solid #a00", backgroundColor:"#fdd"}); 	 	}, 	  	success:function(rtn)  	  	{ 		   if(rtn=="success")			{				$("#msg").css({border:"1px solid #0d9f0d", backgroundColor:"#8fcc8f"});		  		$("#solstice-form").resetForm();		  		$("#msg").html("Thank you for your participation!");		 	}else{				//there was an erro, so grab the UL in the content ID, 				//inside the hidden DIV, and put it into the Message Notification		  		$("#msg").html(  $("#hiddenDIV #content ul").html() );		 	}	   }	});			$('#contest-form').ajaxForm(	{		target:"#hiddenDIV",     //set response to go into hidden div      		beforeSubmit:function()  //before sending submit, give user notification... 	 	{  	   		$("#msg").html("Sending...");  	   		$("#msg").css({border:"1px solid #a00", backgroundColor:"#fdd"}); 	 	}, 	  	success:function(rtn)  	  	{ 		   if(rtn=="success")			{				$("#msg").css({border:"1px solid #0d9f0d", backgroundColor:"#8fcc8f"});		  		$("#contest-form").resetForm();		  		$("#msg").html("Thank you for your participation!");		 	}else{				//there was an erro, so grab the UL in the content ID, 				//inside the hidden DIV, and put it into the Message Notification		  		$("#msg").html(  $("#hiddenDIV #content ul").html() );		 	}	   }	});		});/***************//**** FOLIO ****//***************/var folioSwfRollHandler = function (){		folio_loaded = true;			folio = {		swf:			$('#folio_swf').get(0),		is_loaded:		folio_loaded ? true : false,		loaded:			function(){ if(this.swf) this.is_loaded = true; },		stopScroll:		function(){ if(this.is_loaded) this.swf.stopScroll(); },		startScroll:	function(){ if(this.is_loaded) this.swf.startScroll(); },		scrollLeft:		function(){ if(this.is_loaded) this.swf.scrollToLeft(); },		scrollRight:	function(){ if(this.is_loaded) this.swf.scrollToRight(); },		wheel:			function(x){ if(this.is_loaded) this.swf.wheel(x); }	};	if(folio) { folio.loaded(); }	$('#folio_swf').mouseover(function(){ folio.startScroll();});	$('#folio_swf').mouseout(function(){folio.stopScroll();});	$('#folio_swf').bind('DOMMouseScroll', function(e){ folioWheel(Math.round(-e.detail*2)); });	$('#folio_swf').bind('mousewheel', function(e){ folioWheel(Math.round(e.wheelDelta/10)); });}var folioWheel = function(x){	folio.wheel(x);}/***************//**** MENU ****//***************/var menuSwfRollHandler = function (e){	menu = {		swf:			$('#'+e.id).get(0),		drawPoint:		function(){ this.swf.drawPoint(); },		resetState:		function(){ this.swf.resetState(); }		};				//	Draw on click	$(document).bind('mousedown', function(){ menu.drawPoint(); });		//	Roll over handling	$('#'+e.id)		.mouseover(function(){			this.rootRollOver();			$(document).unbind('mousedown');		})		.mouseout(function(){			this.rootRollOut();			$(document).bind('mousedown', function(){ menu.drawPoint(); });		});}var saveState = function(draw_count){	$.cookie('exp_draw_count',draw_count,{path:'/'});}var resetState = function(){	$.cookie('exp_draw_count',null,{path:'/'});	menu.resetState();}
