(function(){jQuery.styleswitch={disable:function(Q,P){H(Q,true);K(P,Q,true);O(Q).each(function(){this.disabled=false;this.disabled=true});L(P);return this},enable:function(Q,P){H(Q,false);K(P,Q,false);O(Q).each(function(){this.disabled=true;this.disabled=false});L(P);return this},toggle:function(R,P){var Q=O(R);if(!Q.get(0)){return this}if(Q.get(0).disabled===true){jQuery.styleswitch.enable(R,P)}else{jQuery.styleswitch.disable(R,P)}return this},load:function(Q){Q=I(Q);var P=G(Q.name);C(P,Q);return this},reset:function(P){C(A,P)},removeCookie:function(){D()},isDisabled:function(Q){if(M[Q]!==undefined){return M[Q]}else{if(!O(Q).get(0)){return undefined}else{var P=O(Q).get(0);if(P.rel=="alternate stylesheet"){M[Q]=true}else{M[Q]=P.disabled===true}return M[Q]}}},setCookie:function(P){B=I(P)},getCookie:function(){return B}};var N="styleswitch";var B={name:"StyleSwitch",expires:14,path:"/",domain:window.location.hostname,secure:window.location.protocol=="https"};var O=function(P){return jQuery("link[@rel*=style][@title="+P+"]")};var H=function(R,P){if(A[R]===undefined){A[R]=jQuery.styleswitch.isDisabled(R);M[R]=A[R]}var Q=M[R];M[R]=P;jQuery(document).trigger(N,[R,P,Q])};var M={};var F={};var A={};var J=function(R){var Q=[];for(var P in R){if(R[P]){Q.push(P+"=1")}else{Q.push(P+"=0")}}return Q.join("&")};var G=function(U){if(!jQuery.cookie){return this}var T={};var R=jQuery.cookie(U);if(R){var Q=R.split("&");for(var S=0;S<Q.length;S++){var P=Q[S].split("=");T[P[0]]=P[1]=="1"}}return T};var L=function(P){if(P===false||!jQuery.cookie){return }P=I(P);jQuery.cookie(P.name,J(E(P)),P)};var D=function(P){if(P===false||!jQuery.cookie){return }P=I(P);jQuery.cookie(P.name,null,P)};var C=function(Q,P){for(var R in Q){if(Q[R]){jQuery.styleswitch.disable(R,P)}else{jQuery.styleswitch.enable(R,P)}}};var K=function(P,R,Q){P=I(P);if(!F[P.name]){F[P.name]={}}F[P.name][R]=Q};var E=function(P){P=I(P);if(!F[P.name]){return{}}return F[P.name]};var I=function(Q){var P={};jQuery.extend(P,B,Q);return P}})()