var stored="";$(function(){stored=$.cookie("stored");$(".sortable").sortable({connectWith:".sortable",stop:function(){update()}});$(".sortable").disableSelection();stored&&load()}); function load(){var e=stored.split("||"),c=$(e).length,a=e.join(",").split(","),d=$(a).length,b=$(".sortable li"),h=[],j=$(b).length;$.each(b,function(){h[this.id]=$(this).html()});for(b=b=0;b<c;b++){var i="";if(j!=d){var f=$("#ul"+b+" li");$.each(f,function(){$.inArray(this.id,a)<0&&(i+='<li id="'+this.id+'">'+$(this).html()+"</li>",++d)})}$("#ul"+b).html("");for(var f=e[b].split(","),k=$(f).length,g=0,g=0;g<k;g++)h[f[g]]&&$("#ul"+b).append('<li id="'+f[g]+'">'+h[f[g]]+"</li>");i&&$("#ul"+b).append(i)}} function update(){var e=0,c=[];$.each($("ul.sortable"),function(){var a=[];$.each($("#ul"+e+" li"),function(){a.push(this.id)});c[e]=a;++e});c=c.join("||");$.cookie("stored",c,{expires:9999})} jQuery.cookie=function(e,c,a){if(typeof c!="undefined"){a=a||{};if(c===null)c="",a.expires=-1;var d="";if(a.expires&&(typeof a.expires=="number"||a.expires.toUTCString))typeof a.expires=="number"?(d=new Date,d.setTime(d.getTime()+a.expires*864E5)):d=a.expires,d="; expires="+d.toUTCString();var b=a.path?"; path="+a.path:"",h=a.domain?"; domain="+a.domain:"",a=a.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(c),d,b,h,a].join("")}else{c=null;if(document.cookie&&document.cookie!=""){a= document.cookie.split(";");for(d=0;d<a.length;d++)if(b=jQuery.trim(a[d]),b.substring(0,e.length+1)==e+"="){c=decodeURIComponent(b.substring(e.length+1));break}}return c}};
