( function ($) {

	$(init);


	function init() {
		var playerSplash, player;
		
		$('#menu_level1 > ul > li').bind('hover', function() {
			var el = $(this),
				sub = el.children('ul');
				
			if (!sub.length) {
				return;
			}
			if (el.hasClass('open')) {
				$('#menu_level1 li.open').each(function() {
					var el = $(this);
					el.removeClass('open').css('height', '34px');
				});
			} else {
				el.addClass('open');
			}
			
		});

		player = $('#video-highlight');

		if (player.length) {
			$('#video-highlight-hide-player').bind('click', function (e) {
				e.preventDefault();
				$('#video-highlight').hide();
				$('#video-highlight-hide-player').hide();
				$('#video-highlight-splash > img:first').fadeIn();
				$('#video-highlight-play').fadeIn();
			});
			$('#video-highlight-play').bind('click', function (e) {
				e.preventDefault();
				$('#video-highlight').fadeIn();
				$('#video-highlight-splash > img:first').fadeOut();
				$(this).fadeOut();
				$('#video-highlight-hide-player').show();
			});
		}
	}

} )(jQuery);
