var getCookie = (function(){
var cookie = document.cookie, objCookie;
return function (){
if ( objCookie && cookie == document.cookie ) {
return objCookie;
}
cookie = document.cookie;
objCookie = {};
var arrCookie = cookie.split(/;\s*/);
for ( var i = arrCookie.length; i--; ) {
var arr = arrCookie[i].split("=");
var name = arr.shift();
var value = arr.join("=");
objCookie [ decodeURIComponent(name) ] = decodeURIComponent(value);
}
return objCookie;
};
})()