/*	MOEBELMARKT.TV Javascript APP */


$j(document).ready(function(){

	$j.hl = false;
	
	$j("img.preview").mouseover(function(){
		if($j.hl == false)
		{
			$j(this).animate({
				opacity: 0.5
			}, 300);
			$j.hl = true;
		}
	});
	
	$j("img.preview").mouseout(function(){
		$j(this).animate({
			opacity: 1
		}, 300);
		$j.hl = false;
	});
	
	$j('.slideshow').cycle({

		fx: 'fade',
		pause: 1

	});
	
	
	// Category Tabs
	$j(".tab_content").hide();
	
	if(startTab != false)
	{
		$j("ul.tabs li." + startTab).addClass("active").show(); 
		$j("#" + startTab).show();
	} 
	else 
	{
		$j("ul.tabs li:first").addClass("active").show(); 
		$j(".tab_content:first").show();
	}
	
	// On Click Event
	$j("ul.tabs li").click(function() {

		$j("ul.tabs li").removeClass("active");
		$j(this).addClass("active"); 
		$j(".tab_content").hide();

		var activeTab = $j(this).find("a").attr("href"); 
		$j(activeTab).fadeIn();
		return false;
	});



	// Neu
	$j("#tab133 ul").simplecarousel({
        width: 160,
        height: 180,
        visible: 5,
        next: $j('#tab133 .next'),
        prev: $j('#tab133 .prev')
    });
    
    // Nachrichten
    $j("#tab129 ul").simplecarousel({
        width: 160,
        height: 180,
        visible: 5,
        next: $j('#tab129 .next'),
        prev: $j('#tab129 .prev')
    });
    
    // Interviews
    $j("#tab130 ul").simplecarousel({
        width: 160,
        height: 180,
        visible: 5,
        next: $j('#tab130 .next'),
        prev: $j('#tab130 .prev')
    });
    
    // Messen
    $j("#tab3 ul").simplecarousel({
        width: 160,
        height: 180,
        visible: 5,
        next: $j('#tab3 .next'),
        prev: $j('#tab3 .prev')
    });
    
    // Fremdbeitraege
    $j("#tab131 ul").simplecarousel({
        width: 160,
        height: 180,
        visible: 5,
        next: $j('#tab131 .next'),
        prev: $j('#tab131 .prev')
    });

	// Produktpraesentationen
	$j("#tab132 ul").simplecarousel({
        width: 160,
        height: 180,
        visible: 5,
        next: $j('#tab132 .next'),
        prev: $j('#tab132 .prev')
    });
	

});


