jQuery.noConflict();
tb_init('a.thickbox, area.thickbox, input.thickbox');
// find header-menu-item-mid elements, then loop over each one and 
// add onmouseover and onmouseout event to change the background
onload = function() {
	$$("div.header-menu-item").each(
		function(s) {
			var divInside = s.down("div#header-menu-item-inside");
			
			s.onmouseover = function() {
				if(divInside != undefined) {
					if (divInside.hasClassName('header-menu-item-inside')) {
						divInside.className = 'header-menu-item-inside-selected';
					}
				}
				
			};

			s.onmouseout = function() {
				if(divInside != undefined) {
					if (divInside.hasClassName('header-menu-item-inside-selected') && divInside.hasClassName('active') != true) {
						divInside.className = 'header-menu-item-inside';
					}
				}
			};
		}
	);


	$$('ul.menu-body > li:nth-child(even)').each(
		function(s) {
			s.addClassName('alt');
		}
	);

	$$('ul.main-menu-body > li:nth-child(even)').each(
		function(s) {
			s.addClassName('alt');
		}
	);

	$('language-enabler').onchange = function(s) {
		document.location = $('language-enabler').value; 
	};

	
	jQuery.each(jQuery(".playlist-item"), 
		function() {
			Event.observe($(this.id), "click", function(e) {
				var obj = this;
				var flowplayer = $f(0);
				flowplayer.play(obj.href);
				Event.stop(e);
			});
		});
}; 