var category= "";


$(function(){ 
	      $(".ov").each(function(index){ 
	    	  var $this = $(this); 
		      if ($this.parent().attr("id") != category) {
		         if(index > 0) $this.next().hide();
		      } 
		  }); 


		  $(".accordion").click(function(){ 
			  var name = $(this).attr("name");
		      var f = $.cookie(name);
		      if (f==0) {
		    	  $.cookie(name, '1',{ expires: 1, path: "/"});
		      } else {
		    	  $.cookie(name, '0',{ expires: 1, path: "/"});
		      }
		      $("#tog > h3").each(function(){ 
		    	  if (name == $(this).next().attr("id"))
		    	  $(this).next().slideToggle('fast');
		      }); 
		return false;
	  }); 
}); 

  function perfectAccordion(str){ 
      var f = $.cookie(str);
      if (f == 1) {
	       $("#" + str).hide();
      }
  };
