var _active = -1;
var bg = "";
var bg_alt = "";
var _ie = document.all;

jQuery.noConflict(); /* jQuery statt $ - wegen prototype */

jQuery(document).ready(function(){

jQuery(".hover").hide();


jQuery("#menu").find("ul").find("li:not(.break)").hover( /* HOVER */
	function() {
		jQuery("img.hover").stop(false,true);
		jQuery(this).css("background","none");
		
		bg = jQuery(this).find("img.hover").attr("src");
		bg = bg.substring(0,bg.length-6) + ".png";
		
		/*if(!_ie) jQuery(this).find("img.hover").fadeIn(150);
		else */jQuery(this).find("img.hover").show();
		
	
	},
	function() {
		if(_active == jQuery(this).attr("id"))
			jQuery(this).find("img.hover").show();
		else {
			/*if(!_ie) jQuery(this).find("img.hover").fadeOut(150);	
			else */jQuery(this).find("img.hover").hide();
			jQuery(this).css("background","url("+bg+") no-repeat top left"); 
		}
	}
);


jQuery("#menu").find("ul").find("li:not(.break)").click( /* CLICK */
	function() {
		id = parseInt(jQuery(this).attr("id"));
		if(_active != id) {
			if(_active != -1) {
				_activeAlt = "#"+_active;		
			
				bg_alt = jQuery(_activeAlt).find("img.hover").attr("src");
				bg_alt = bg_alt.substring(0,bg_alt.length-6) + ".png"; 

				jQuery(_activeAlt).css("background", "url("+bg_alt+") no-repeat top left");
				jQuery(_activeAlt).find("img.hover").fadeOut(150);
			}
			jQuery(this).find("img.hover").show();
			_active = jQuery(this).attr("id");
		}
		
		if(id ==1)
			loadLineup();
		else
			loadContent(id);		
	}	
);

});