
	// Tab activator product detail page
	$(function() {
				
		
		//  internal Product Browser; functions are called within the iframe.
		iframe_enlarge = function() {
		           
		   //check if Product Browser is closed
		   var iframe_width = 0;
		   iframe_width = $("#product_iframe").css("width");
	       	  		   
		   if (iframe_width == "276px")
		   {
		   	  $("#news").hide();
		   	  $("#product_iframe").animate({
          	      width: "740px"
         	   }, 500); 									
			}	
		};

        
		iframe_resize = function() {          
		    $("#product_iframe").css({
                width: "276px",
                height: "390px"
            });	 
			$("#news").show();		
		};
				
		$("pbdetail").hide();				
		
		
		// fix for external Product Browser (Lightbox). Blue arrow will be activated all the time  
		$(".LM_Level_b").click(
			function()
			{
				$(".LM_Level_b").removeClass("mark_menu_arrow");
				$(this).addClass("mark_menu_arrow");
			}		
		);
		
		
		// setup ul.tabs to work as tabs for each div directly under div.panes
		//$("ul.tabs").tabs("div.panes > div");
		
		$("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: null});
	
		$.tools.tabs.addEffect("slide", function(i, done) {
 
		    // fix for the featured video picture
			this.getPanes().slideUp(function()  {
				if ( $('.playVideoFeature').length )	
				$('.playVideoFeature').css({position: "static"});	
				$('.playVideoFeature .picZoom').hide();			
				done.call();
			 }); 
		 
		 
			 // 2. after a pane is revealed, its background is set to its original color (transparent)
			 // fix for the featured video picture
			 this.getPanes().eq(i).slideDown(function()  {							
				if ( $('.playVideoFeature').length )	
				$('.playVideoFeature').css({position: "relative"});	
				$('.playVideoFeature .picZoom').show();	
				done.call();				
				});
		 });
	});
	


