code: function(name, value, expires, path, domain, secure) {
  		var d = new Date();
  
  		if ( typeof(expires) == 'object' && expires.toGMTString ) {
  			expires = expires.toGMTString();
  		} else if ( parseInt(expires, 10) ) {
  			d.setTime( d.getTime() + ( parseInt(expires, 10) * 1000 ) ); // time must be in miliseconds
  			expires = d.toGMTString();
  		} else {
  			expires = '';
  		}
  
  		document.cookie = name + "=" + encodeURIComponent(value) +
  			((expires) ? "; expires=" + expires : "") +
  			((path) ? "; path=" + path : "") +
  			((domain) ? "; domain=" + domain : "") +
  			((secure) ? "; secure" : "");
  	}
docs: Set a cookie.
  
  The 'expires' arg can be either a JS Date() object set to the expiration date (back-compat)
  or the number of seconds until expiration