/*
 *  (c) 2000-2013 deviantART, Inc. All rights reserved.
 */
window.Cookie={SIGNED_PREFIX:"__",default_options:{expires:0,path:"/",domain:"."+window.location.host.split(".").slice(-2).join(".")},get:function(e,i){var t=this._get_raw(e);if(void 0==t)return i;this._is_signed_value(t)&&(t=t.substr(this.SIGNED_PREFIX.length).split(";").slice(1).join(";"));try{t=JSON.parse(t)}catch(n){return i}return t},_get_raw:function(e,i){var t=RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)"),n=t.exec(document.cookie);return n?decodeURIComponent(n[1]):i},is_signed:function(e){return this._is_signed_value(this._get_raw(e))},_is_signed_value:function(e){return e&&e.substring&&e.substring(0,this.SIGNED_PREFIX.length)==this.SIGNED_PREFIX},set:function(e,i,t){if(t=jQuery.extend(this.default_options,t),this.is_signed(e))return!1;if(null===i&&(t.expires=-86400),"number"==typeof t.expires&&0!=t.expires){var n=t.expires,s=t.expires=new Date;s.setTime(s.getTime()+1e3*n)}return document.cookie=[encodeURIComponent(e),"=",encodeURIComponent(JSON.stringify(i)),t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}},window.DWait&&DWait.run("jms/lib/cookie.js");if(window.DWait){DWait.count()}