$j(function() {
//Navitabs
$j("ul.sub_navi_tabs").tabs("div.sub_navi_panes > div", { initialIndex : 1 });
//Startscroller
$j(".startseite_scroller").scrollable({circular: true,mousewheel: false}).navigator({navi:".startseite_scroller_navi"}).autoscroll(7000);
//Warenkorb tooltip
$j(".tuete").each(function(index) {	
	// Edit links
	if(this.href)
	{
		// Remove href-Attributes
		$j(this).data('href', this.href).removeAttr('href');
		
		// Insert the href-Attributes again if clicked
		$j(this).click(function() {
			$j(this).attr('href', $j(this).data('href'));
		});
	}
});
$j(".tuete").tooltip({tipClass:'tooltip_warenkorb',position: 'bottom left',offset:[-5,65],delay:900,effect:'fade',fadeInSpeed:800,fadeOutSpeed:400});
//Top Nav Kategorien Tooltip
$j(".kategorien_tooltip_trigger").each(function(index) {	
	// Edit links
	if(this.href)
	{
		// Remove href-Attributes
		$j(this).data('href', this.href).removeAttr('href');
		
		// Insert the href-Attributes again if clicked
		$j(this).click(function() {
			$j(this).attr('href', $j(this).data('href'));
		});
	}
});
$j(".kategorien_tooltip_trigger").tooltip({tip:'.kategorien_tooltip',position: 'bottom right',relative:true,delay:900,effect:'fade',fadeInSpeed:800,fadeOutSpeed:400,offset:[0, -225]});
//Overlays
$j('a[rel]').overlay({mask: {color: '#000000',opacity: 0.5},closeOnClick: true});
//Produktbilder
$j("div.scroller_produkt").scrollable({size:1,clickable:false,mousewheel: false}).navigator({navi:".entries"}).find("img").each(function(index) {$j(this).overlay({
			target: '#box',mask: { color: '#000000',opacity: 0.5},
onLoad: function() {
				$j("#images_gross").data("scrollable").seekTo(index, 0);
			}
		});
	});
$j("#images_gross").scrollable({mousewheel: false}).navigator({navi:"#box .navi"});
//Single Article Tabs
$j("ul.tabs_artikel").tabs("div.panes > div");
//Main Nav aktiv
$j("#navbar").find("a[href='"+window.location.pathname+"']").each(function(){
$j(this).addClass("active")
});
//Top 10 aktiv
$j(".top10").find("a[href='"+window.location.pathname+"']").each(function(){
$j(this).addClass("level1active_link")
});
//Fehler / Hinweis Overlay
$j('.plentyErrorBox').overlay({load:true,mask: {color: '#000000',opacity: 0.5},closeOnClick: true});
$j('.plentyMessageBox').overlay({load:true,mask: {color: '#000000',opacity: 0.5},closeOnClick: true});
});
