| | 14 | jQuery(document).ready(function(jQuery){ |
| | 15 | |
| | 16 | jQuery(".bloc a").hover(function() { jQuery(this).fadeTo(500, 1); }, function() { jQuery(this).fadeTo(500, 0.75); }); |
| | 17 | var sidemenu = jQuery.cookie('side-menu'); |
| | 18 | var isdisplayed; |
| | 19 | // if cookie says the menu is hiding, keep it hidden! |
| | 20 | if (sidemenu == 'hiding') { |
| | 21 | jQuery("#subcontent").css({'margin-left' : '0'}); |
| | 22 | isdisplayed=false; |
| | 23 | } |
| | 24 | if (sidemenu == 'showing') { |
| | 25 | jQuery("#subcontent").css({'margin-left' : '20em'}); |
| | 26 | isdisplayed=true; |
| | 27 | } |
| | 28 | // creates a variable with the contents of the cookie side-menu |
| | 29 | jQuery("#menuswitcher").click(function(){ |
| | 30 | if (jQuery("#menubar").is(":hidden") || isdisplayed==false ) { |
| | 31 | jQuery("#subcontent").css({'margin-left' : '20em'}); |
| | 32 | isdisplayed=true; |
| | 33 | } else { |
| | 34 | jQuery("#subcontent").css({'margin-left' : '0'}); |
| | 35 | isdisplayed=false; |
| | 36 | } |
| | 37 | }); |