BN.namespace("cookies");BN.cookies.Cookie=new Class({options:{expires:null,path:"/",secure:false},initialize:function(A,B){var C=this;this._value=$.cookie(A);this._data={};this._name=A;this.options.domain="."+BN.core.getDomain();if(B!==undefined){this.options.expires=B}if(this._value!==null){$.each(this._value.split("&"),function(D,F){var E=F.split("~");if(E.length!==2){E=F.split("=")}if(E.length===2){C._data[E[0]]=decodeURIComponent(E[1])}})}},remove:function(){this.options.expires=-1;$.cookie(this._name,null,this.options)},getValue:function(){return this._value},getValueFromMap:function(A){return this._data[A]},setValue:function(A){this._value=A.toString().trim();$.cookie(this._name,encodeURIComponent(A),this.options)},setValueInMap:function(B,C){this._data[B]=C.toString().trim();var A=[];$.each(this._data,function(D,E){A.push(D+"~"+encodeURIComponent(E))});$.cookie(this._name,A.join("&"),this.options)}});BN.namespace("cookies");BN.cookies.PermanentCookie=new Class({Extends:BN.cookies.Cookie,_CURRENCY:"CURR",_CONTEXT_NAME:"CONTEXT-NAME",_CURRENCY_SYMBOL:"CURR_SYM",_VERSION:"ver",_CURRENT_VERSION:"1",initialize:function(){var A=365*10;this.parent("bnper",A);this._upgrade()},_upgrade:function(){if(this.getVersion()!==this._CURRENT_VERSION){this.setValueInMap(this._VERSION,this._CURRENT_VERSION)}},getCurrencyCode:function(){return this.getValueFromMap(this._CURRENCY)},setCurrencyCode:function(A){this.setValueInMap(this._CURRENCY,A)},getContextName:function(){return this.getValueFromMap(this._CONTEXT_NAME)},setContextName:function(A){this.setValueInMap(this._CONTEXT_NAME,A)},getCurrencySymbol:function(){var A=this.getValueFromMap(this._CURRENCY_SYMBOL);if(A!==undefined&&A.length>2){A=A+" "}return A},setCurrencySymbol:function(A){this.setValueInMap(this._CURRENCY_SYMBOL,A)},getVersion:function(){return this.getValueFromMap(this._VERSION)}});
