/** 
* We Are Working On It 	Functions for the BETA explanation bar on the top of the site.
*
* 
*/


jQuery(document).ready(function() {
	
	//slide only on home page
	if(location.href=='http://dev.wimgo.com/'||location.href=='http://local.wimgo.com/'||location.href=='http://wimgo.com/'||location.href=='http://www.wimgo.com/'){
		
		
		//read cookies to determine if hide this cookie is set
		var woiCookie="workingonit=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(woiCookie) == 0) {
				var woiHide = c.substring(woiCookie.length,c.length) ;
				//alert ("woiHide = " + woiHide);
			}
		}	
			if (woiHide != 1){	
				window.setTimeout(function() {
			 		jQuery('#we-are-working-on-it').slideDown("slow");
				}, 2000);
					
				window.setTimeout(function() {
			 		jQuery('#we-are-working-on-it').slideUp("slow");
				}, 12000);
				
				 //set cookie
				 var date = new Date();
				 date.setTime(date.getTime()+(365*24*60*60*1000));
				 document.cookie = 'workingonit=1;expires='+date.toGMTString();
			
			} 
			
		 

		
		
			
	}
		
	jQuery('#we-are-working-on-it-link').click(function() {
	   if (jQuery('#we-are-working-on-it').is(":hidden"))
	   {
	        jQuery('#we-are-working-on-it').slideDown("slow");
	   } else {
	        jQuery('#we-are-working-on-it').slideUp("slow");
	   }
	   return false;
	});
	
 });
 

