jQuery.cookie = function (key, value, options){ if (_AN_Read_length('length', arguments) > 1 && (value === null || typeof value !== "object")) { options = jQuery.extend({ } , options); if (value === null ) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } return (_AN_Write_cookie('cookie', document, false , [encodeURIComponent(key), '=', options.raw? String(value): encodeURIComponent(String(value)), options.expires? '; expires=' + options.expires.toUTCString(): '', options.path? '; path=' + options.path: '', _AN_Read_domain('domain', options)? '; domain=' + _AN_Read_domain('domain', options): '', options.secure? '; secure': ''] .join(''))); } options = value || { } ; var result, decode = options.raw? function (s){ return s; } : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(_AN_Read_cookie('cookie', document)))? decode(result[1]): null ; } ;