function newWindow(url) {	window.open(url);	}

var binds = {
	'a.newWindow' : function(element) {
		element.onclick = function() {
			newWindow(this.href);
			return false;
		}
		
		element.onkeypress = function() {
			newWindow(this.href);
			return false;
		}
	},
	
	'#s' : function(element) {
		element.onmouseover = function() {
			hiLiteSearch(this);
		}
		
		element.onfocus = function() {
			window.elFocus = this.id;
			hiLiteSearch(this);
		}
		
		element.onmouseout = function() {
			loLiteSearch(this);
		}
		
		element.onblur = function() {
			window.elFocus = null;
			loLiteSearch(this);
		}
	},
	
	'#searchSubmit' : function(element) {
		element.onmouseover = function() {
			hiLiteSearch($('s'));
		}
		
		element.onmouseout = function() {
			loLiteSearch($('s'));
		}	
	},
	
	'#w3xhtml' : function(element) {
		element.onmouseover = function() {
			this.src = '/wp-content/themes/serberus/images/w3c_xhtml11.gif';
		}
		
		element.onmouseout = function() {
			this.src = '/wp-content/themes/serberus/images/w3c_xhtml11_off.gif';
		}
	},
	
	'#w3css' : function(element) {
		element.onmouseover = function() {
			this.src = '/wp-content/themes/serberus/images/w3c_css.gif';
		}
		
		element.onmouseout = function() {
			this.src = '/wp-content/themes/serberus/images/w3c_css_off.gif';
		}
	},
	
	'#nameTxt' : function(element) {
		element.onfocus = function() {
			this.style.backgroundColor = '#343434';
		}
		
		element.onblur = function() {
			if (this.value == "")
				this.style.backgroundColor = '#212121';
		}
	},
	
	'#emailTxt' : function(element) {
		element.onfocus = function() {
			this.style.backgroundColor = '#343434';
		}
		
		element.onblur = function() {
			if (this.value == "")
				this.style.backgroundColor = '#212121';
		}
	},
	
	'#message' : function(element) {
		element.onfocus = function() {
			this.style.backgroundColor = '#343434';
		}
		
		element.onblur = function() {
			if (this.value == "")
				this.style.backgroundColor = '#212121';
		}
	},
	
	'#contactForm' : function(element) {
		element.onsubmit = function() {
			$("contactSubBtn").value		= "Please wait...";
			$("contactSubBtn").disabled = true;
		}
	}
	
};

Behaviour.register(binds);