bricksf = {};

bricksf.clickClear = function(elem) {
	//alert(elem.value);
};

bricksf.gmtOffset = function() {
	//domain = document.location.replace([document.location]
	var d = new Date();
	$.cookie('gmtOffset', d.getTimezoneOffset()/-60, {expires: 30, path: '/', domain: '.' + this.rootDomain()});
};

bricksf.rootDomain = function(domain) {
	if (!domain) domain = document.domain;
	tld = '.' + document.domain.replace(/([a-z1-9-]+\.)+/i,"");
	root_domain = document.domain.substr(0,document.domain.length - tld.length);
	if ((sub_pos = root_domain.lastIndexOf('.')) > 0) {
		root_domain = root_domain.substr(sub_pos+1);
	}
	return root_domain + tld;
};
