/*
Part of Worst-navigation-panel mod
by PolarFox aka Psc | http://unlogic.info | Build: 1
*/

jQuery(document).ready(function(){    
jQuery(".wnh_dc").css("display","none");
	
jQuery('.wnh_btn').click(function() {
 var t = jQuery(jQuery(this).next(".wnh_dc")).css("display") == "none" ? "1" : "0";
 jQuery.cookie("whn_id"+jQuery(this).attr("wnb_for"), t, { expires: 90, path: '/'});
  jQuery(this).next(".wnh_dc").slideToggle("normal");
});

jQuery(".wnh_btn").each(function (i) {
if( jQuery.cookie(("whn_id"+jQuery(this).attr("wnb_for"))) == "1"){
jQuery(this).next(".wnh_dc").slideDown("fast");
}
});


})//onready

/*
http://plugins.jquery.com/project/Cookie
*/
jQuery.cookie=function(c,d,a){if(typeof d!='undefined'){a=a||{};if(d===null){d='';a.expires=-1}var f='';if(a.expires&&(typeof a.expires=='number'||a.expires.toUTCString)){var b;if(typeof a.expires=='number'){b=new Date();b.setTime(b.getTime()+(a.expires*24*60*60*1000))}else{b=a.expires}f='; expires='+b.toUTCString()}var j=a.path?'; path='+(a.path):'';var k=a.domain?'; domain='+(a.domain):'';var l=a.secure?'; secure':'';document.cookie=[c,'=',encodeURIComponent(d),f,j,k,l].join('')}else{var g=null;if(document.cookie&&document.cookie!=''){var h=document.cookie.split(';');for(var e=0;e<h.length;e++){var i=jQuery.trim(h[e]);if(i.substring(0,c.length+1)==(c+'=')){g=decodeURIComponent(i.substring(c.length+1));break}}}return g}};  
