var TMI = {	
	domReady : (function() {
		jQuery(function() {
			TMI.domReady = true;
		});
		return false; 
	})(),
	
	beget : function(o) {
		var F = function() {
		};
		F.prototype = o;
		return new F();
	},
	
	writeCookie : function(name, value, days, path) {
		var date = new Date(), expiry;
		expiry = (days) ? date.setTime(date.getTime() + days * 8.64e7).toGMTString() : '';
		path = path || '/';
		document.cookie = [name + '=' + value, 'expires=' + expiry, 'path=' + path].join('; ');
		return this.readCookie(name);
	},
		
	readCookie : function(name) {
		var nameEQ = name + "=", ca = document.cookie.split(';'), c;
		for(var i = 0; i < ca.length; i++) {
			c = ca[i];
			if(c.charAt(0) === ' '){
				c = c.substring(1, c.length);
			}
			if(c.indexOf(nameEQ) === 0) {
				return unescape(c.substring(nameEQ.length, c.length));
			}
		}
		return null;
	},
	
	deleteCookie : function(name) {
		return this.writeCookie(name, '', - 1);
	}
};
