function jQueryextendedjsoncookieUtils()
{}
jQueryextendedjsoncookieUtils.corewritefunction=function(argss)
{var name=argss[0];var value=argss[1];document.cookie=name+'='+encodeURIComponent(value)+'; path=/';}
jQueryextendedjsoncookieUtils.removeCookie=function(argss)
{var cookiename=argss[0];varcookievalue=jQueryextendedjsoncookieUtils.getCookieValueDecoded(argss)
if(varcookievalue!=undefined)
{document.cookie=cookiename+'=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/';}}
jQueryextendedjsoncookieUtils.writeEmptyCookie=function(argss)
{var cookiename=argss[0];document.cookie=cookiename+'=; path=/';}
jQueryextendedjsoncookieUtils.writeCookie=function(argss)
{jQueryextendedjsoncookieUtils.corewritefunction(argss);}
jQueryextendedjsoncookieUtils.getCookieValue=function(argss)
{var cookiename=argss[0];var fullcookievalue=jQueryextendedjsoncookieUtils.getFullCookie(argss);if(fullcookievalue==undefined)
{return undefined;}
return fullcookievalue.substring(cookiename.length+1);}
jQueryextendedjsoncookieUtils.getCookieValueDecoded=function(argss)
{var cookievalue=jQueryextendedjsoncookieUtils.getCookieValue(argss);if(cookievalue==undefined){return undefined;};return decodeURIComponent(cookievalue);}
jQueryextendedjsoncookieUtils.getFullCookie=function(argss)
{var cookiename=argss[0];var cookieValue=undefined;var componentValueOutput=undefined;if(document.cookie&&document.cookie!='')
{var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++)
{var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,cookiename.length+1)==(cookiename+'='))
{componentValueOutput=cookie;break;}}}
return componentValueOutput;}
jQueryextendedjsoncookieUtils.setExtendedAttributes=function(argss)
{var cookiename=argss[0];var extendedattributesarray=argss[1];var cookvalue=jQueryextendedjsoncookieUtils.getCookieValueDecoded(argss);var argstopass=Array(cookiename,cookvalue,extendedattributesarray);jQueryextendedjsoncookieUtils.corewritefunction(argstopass);}
jQueryextendedjsoncookieUtils.getCookieVariable=function(argss)
{var cookiename=argss[0];var variablename=argss[1];var cookvalue=jQueryextendedjsoncookieUtils.getCookieValueDecoded(argss);if(cookvalue!=''&&cookvalue!=undefined)
{jsonoutput_eval=jQuery.evalJSON(cookvalue);return jsonoutput_eval[variablename];}
return undefined;}
jQueryextendedjsoncookieUtils.setCookieVariable=function(argss)
{var cookiename=argss[0];var variablename=argss[1];var variablevalue=argss[2];var jsonoutput=undefined;var cookvalue=jQueryextendedjsoncookieUtils.getCookieValueDecoded(Array(cookiename));if((cookvalue==undefined)||(cookvalue==''))
{jQueryextendedjsoncookieUtils.writeEmptyCookie(Array(cookiename));var variableunique=new Object();variableunique[variablename]=variablevalue;var chainejsonencoded=jQuery.toJSON(variableunique);var argstopass=new Array();argstopass.push(cookiename);argstopass.push(chainejsonencoded);jQueryextendedjsoncookieUtils.writeCookie(argstopass);}
else
{jsonoutput_eval=jQuery.evalJSON(cookvalue);jsonoutput_eval[variablename]=variablevalue;var chainejsonencoded=jQuery.toJSON(jsonoutput_eval);var argstopass=new Array();argstopass.push(cookiename);argstopass.push(chainejsonencoded);jQueryextendedjsoncookieUtils.writeCookie(argstopass);}}
jQuery.extendedjsoncookie=function()
{var chain="jQueryextendedjsoncookieUtils.";var internalargs=new Array();for(var i=0;i<arguments.length;i++)
{var thisarg=arguments[i];if(i==0)
{chain=chain+thisarg;}
else
{internalargs.push(thisarg);}}
return eval(chain)(internalargs);};
