/*...........................................    

   General functions

...........................................*/	

jQuery.fn.toggleText = function(a, b) {
	return this.each(function() {
		jQuery(this).text(jQuery(this).text() == a ? b : a);
	});
};

jQuery.fn.equalHeights=function() {
	var maxHeight=0;
	this.each(function(){
		if (this.offsetHeight>maxHeight) {maxHeight=this.offsetHeight;}
	});
	this.each(function(){
		$(this).height(maxHeight + "px");
		if (this.offsetHeight>maxHeight) {
			$(this).height((maxHeight-(this.offsetHeight-maxHeight))+"px");
		}
	});
};



$(document).ready(function(){


		
			
/*...........................................    

   keyboard bindings

...........................................*/	
	
	document.onkeydown = function(e){ 	
		if (e == null) { // ie
			keycode = event.keyCode;
		} else { // mozilla
			keycode = e.which;
		}
		
		if(keycode == 37){ // freccia indietro
			
		
		} else if(keycode == 39){ // freccia avanti 
	
			
		} else if(keycode == 81){ // Q indietro
			
			
		} else if(keycode == 87){ // W	avanti
	
			
		} else if(keycode == 69){ // E
	
			
		} else if(keycode == 82){ // R
	
			
		} else if(keycode == 40){ //freccia giu
	
			
		} else if (keycode == 38){ //freccia su
	
			
		}
	//alert(keycode);
	};

});
