var te = { };												//global namespace

// spotlight menu
$(document).ready(function() {
	/**
	* for each menu element, on mouseenter, 
	* we enlarge the image, and show both sdt_active span and 
	* sdt_wrap span. If the element has a sub menu (sdt_box),
	* then we slide it - if the element is the last one in the menu
	* we slide it to the left, otherwise to the right
	*/
/*	$('#sdt_menu > li').bind('mouseenter',function(){
		$('#content, #header, #footer')
			.stop(true)
			.animate({
				'opacity':'0.6'
			},400);
	}).bind('mouseleave',function(){
		$('#content, #header, #footer')
			.stop(true)
			.animate({
				'opacity':'1.0'
			},400);
	});*/
	
	$("a[rel='gallery']").colorbox({transition: 'fade', overlayClose: false});
	$("a[rel='map']").colorbox({transition: 'fade', iframe:true, innerWidth:'95%', innerHeight:'95%' });
	$(".equipment").colorbox({transition: 'fade', iframe:true, innerWidth:'98%', innerHeight:'98%' });

	$('#serviceinfo').accordion({
		/*event: 'mouseover',*/
		icons: false,
		autoHeight: false,
		navigation: true
	});
	$('#marketinfo').accordion({
		/*event: 'mouseover',*/
		icons: false,
		autoHeight: false,
		navigation: true
	});
	$('#solutionsinfo').accordion({
		/*event: 'mouseover',*/
		icons: false,
		autoHeight: false,
		navigation: true
	});
	/*$('#manufacturersinfo').accordion({
		autoHeight: false,
		navigation: true
	});*/
	
	/*$("#player").jPlayer( {
		ready: function () {
		  $(this).jPlayer("setMedia", {
			wav: "media/background_sound/4342__Corsica_S__C_S_8.wav" // Defines the m4v url
		  }).jPlayer("play"); // Attempts to Auto-Play the media
		},
		supplied: "wav",
		volume: 0.05,
		//solution: "flash", //TODO test this later
		swfPath: "script/jplayer"
	});*/
});

$(window).load(function() {
		$('#serviceinfo').accordion("resize");
		$('#marketinfo').accordion("resize");
		$('#solutionsinfo').accordion("resize");

		/*if( $(location).attr('href').indexOf('index.html') !== -1 ){
			$('#logo1').delay(500).fadeIn(4000,'easeOutExpo',
				function(){
					$('#logo1').attr('src','image/background/logo_teav_large_bevel5_drop8.png');
				}
			);
			$('#connector1').delay(700).animate(	{left: '0px'}	,4000,'easeOutExpo');
			$('#board1').delay(500).animate(		{top: '0px'}	,4000,'easeOutExpo');
			$('#connector2').delay(600).animate({right: '0px'},4000,'easeOutExpo');
		}*/
});

