var rules = {
	'div#warnJS' : function(element){
		element.style.display='none';
	},
	'.imgMO' : function(element){
		element.onmouseover = function () {
			imgMO(this);
		}
		element.onmouseout = function () {
			imgMO(this);
		}	
	},
	'input' : function(element){
		element.onmouseover = function () {
		}
		element.onmouseout = function () {
			if (!this.hasFocus)	
				this.style.backgroundColor='#FFFFFF';
		}
		element.onfocus = function () {
			this.hasFocus = true;
		}
		element.onblur = function () {
			this.style.backgroundColor='#FFFFFF';
			this.hasFocus = false;
		}		
	},	
	'textarea' : function(element){
		element.onmouseover = function () {
		}
		element.onmouseout = function () {
			if (!this.hasFocus)	
				this.style.backgroundColor='#FFFFFF';
		}
		element.onfocus = function () {
			this.hasFocus = true;
		}
		element.onblur = function () {
			this.style.backgroundColor='#FFFFFF';
			this.hasFocus = false;
		}		
	},	
	'.frmField' : function(element){
		element.onfocus = function () {
			if (!this.cleared) 
				clearField(this); 
			this.cleared=true;
			//this.style.backgroundColor = '#ffffff';
		}	
		element.onblur = function () {
			resetField(this);
			//this.style.backgroundColor = 'transparent';
		}
	},	
	'div#page .overview_list' : function(element){
		initTransition(element);
	},	
	'ul#imgPager li' : function(element){
		element.onclick = function () {
			doTransitionOnce(this);
			return false;
		}
	},	
	'ul.nav_normal li' : function(element){
		element.onmouseenter = function () {
			this.addClassName('hover');		
		}
		element.onmouseleave = function () {
			ob1 = this;
			setTimeout(
				function () {
					ob1.removeClassName('hover');	
				}
			,100);
		
		}		
	},	
	'div#cart' : function(element){
		new Ajax.Updater({ success: element }, "store/index.php?route=module/cart/callback", { method:"get",evalScripts:true,onComplete:function (req) {} });		
	}/*,	
	'ul.content_image li' : function(element){
		element.onclick = function () {
			var tmpArr = this.parentNode.getElementsByTagName('li');
			var tmp = false;

			for (i=0;i<tmpArr.length;i++) {
				if (!tmpArr[i].style.opacity || tmpArr[i].style.opacity>0) {
					if (tmpArr[i+1])
						tmp = tmpArr[i+1];
					else	
						tmp = tmpArr[0];
				}	
			}

			if (tmp)
				doTransitionOnce($('img_'+tmp.id.split('_')[1]));
			return false;
		}
	}*/
};
for (selector in rules){
	Behavior.register(selector,rules[selector]);
}
