/*
* Dough, A Cookie Plugin for jQuery
* By: Nathan Searles, http://nathansearles.com
* Example: http://nathansearles.com/plugin/dough
* Version: 1.3
* Updated: June 14th, 2011
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(A){A.dough=function(B,I,F){F=A.extend({},A.dough.option,F);var J=F.expires;if(I===undefined){var E=document.cookie.match(B+"=([^;]*)(;|$)");if(E!=null){if(E[1][0]==="{"){return A.parseJSON(E[1]);}else{return E[1];}}else{return ;}}if(I=="remove"){J=-1;I="";}var K=B+"="+I;if(J){var D=new Date();D.setTime(D.getTime()+(J*24*60*60*1000));K+="; expires="+D.toUTCString();}if(F.path=="current"){K+=";";}else{K+="; path="+F.path+";";}if(F.domain){if(F.domain=="auto"){var H=window.location.hostname.match(/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/g),C="."+window.location.hostname;var G=H?H.toString():C.toString();K+="; domain="+G+";";}else{K+="; domain="+F.domain+";";}}if(F.secure){K+="; secure";}document.cookie=K;};A.dough.option={expires:false,path:"/",domain:false,secure:false};})(jQuery);
