$(document).ready(function(){

	// Banner Rotator
	$('#topbanner-slider').nivoSlider({
		effect:'random',
		animSpeed:500,
		pauseTime:7500
	});

	// Carousel
	$("#carousel").featureCarousel({
		autoPlay: 6000,
		trackerIndividual: false,
		trackerSummation: false
	});

	// Colorbox
	$("a[rel='termszoom']").colorbox({iframe: true, innerWidth: 520, innerHeight: 570});
	$("#webshop_payment_window").colorbox({iframe: true, innerWidth: 450, innerHeight: 350});

	// Opacity settings
	$(".links a").fadeTo(0, 0.1);
	$(".links a").hover(function(){
		$(this).stop().animate({opacity:1.0},{queue:false,duration:300});
	}, function() {
		$(this).stop().animate({opacity:0.1},{queue:false,duration:300});
	});

	$(".copyright a").fadeTo(0, 0.1);
	$(".copyright a").hover(function(){
		$(this).stop().animate({opacity:1.0},{queue:false,duration:300});
	}, function() {
		$(this).stop().animate({opacity:0.1},{queue:false,duration:300});
	});

	$(".facebook").fadeTo(0, 0.1);
	$(".facebook").hover(function(){
		$(this).stop().animate({opacity:1.0},{queue:false,duration:300});
	}, function() {
		$(this).stop().animate({opacity:0.1},{queue:false,duration:300});
	});

	$(".addthis").fadeTo(0, 0.1);
	$(".addthis").hover(function(){
		$(this).stop().animate({opacity:1.0},{queue:false,duration:300});
	}, function() {
		$(this).stop().animate({opacity:0.1},{queue:false,duration:300});
	});

	// Products effects
	$('.products_element_pricing').has('span.price_basket').hover(function(){
		$("span.price", this).stop().animate({left:'-228px'},{queue:false,duration:250});
		$("span.price_basket", this).stop().animate({left:'0'},{queue:false,duration:250});
	}, function() {
		$("span.price", this).stop().animate({left:'0px'},{queue:false,duration:250});
		$("span.price_basket", this).stop().animate({left:'228px'},{queue:false,duration:250});
	});

	// Categories settings
	$("#categories").find("ul.dropdown").each(function (){
		if ($.trim($(this).text()) == ""){
			$(this).remove();
		}
		else {
			$(this).hide();
		}
	});
	$("li.button1").children("ul.dropdown").show();
	$("li.button1").parents("ul.dropdown").show();

});
