jQuery(document).ready(function(){

	//jQuery('#content img').hide();			

    jQuery('ul#subNav li a, #nav ul li a').click(function () { 	
		jQuery.cookie('position',null);					
	});
 
 	var cookieStatus = jQuery.cookie('position');
	var menu = jQuery('ul#subSubNav');
	var menuWidth = menu.outerWidth({ margin: true });
	var triggerLeft = jQuery('#trigger_left');
	var triggerRight = jQuery('#trigger_right');
 	
	if (cookieStatus=='onLeft') {
		menu.animate( { left: "-650px" }, 500);
		triggerLeft.show();
		triggerRight.hide();	
	} else {
		triggerLeft.hide();
	}

	triggerRight.click(function () { 								 
	  triggerLeft.show();											 
      menu.animate( { left: "-650px" }, 500);
	  jQuery.cookie('position','onLeft');
	  triggerRight.hide();	
    });

	triggerLeft.click(function () { 
	  triggerRight.show();
      menu.animate( { left: "0" }, 500);
	  jQuery.cookie('position',null);
	  triggerLeft.hide();
	  
    });
	
	if (menuWidth<750) {
			triggerRight.hide();
			triggerLeft.hide();
			jQuery('#slideMenu').css("margin-left","13px");
	} 
	
	
}); //Close document.ready

jQuery(window).bind('load', function() {					
	//jQuery('#content img').fadeIn('slow');
});
