/*****************************************************************************
 *
 *  Copyright            : Copyright (C) Morgen32
 *  Email                : info @ morgen32.nl
 *	
 *  
 *  Disclaimer:
 *	Niets uit dit script mag zonder toestemming van de maker van deze
 *	scripting gekopieerd, of doorverkocht worden aan derden. De maker van deze
 *	scripting blijft ten alle tijden copyright op dit product houden. De 
 *	scripting is ter beschikking gesteld door Morgen32.
 *	Dit programma is GEEN vrije software, en mag niet worden doorverkocht en/
 * 	of gewijzigd worden tenzij de eigenaar toestemming hiervoor heeft verleend
 *
 *****************************************************************************/

$(document).ready(function(){
	
	var left = $("#menu .active").offset().left - $("#menu").offset().left +1;
	var width = $("#menu .active").width();
	$("#follower").css({marginLeft: left, width: width});
	
	$("#menu li.main").hover(
		function(){
			var left = $(this).offset().left - $("#menu").offset().left +1;
			var width = $(this).width();
			$("#follower").stop(true,false).animate({marginLeft: left, width: width},500);
			//animate({marginLeft: 0, width: "100%", opacity: 0},100).
			//var height = ($(this).find('li').size() * 30);
			//$(this).stop(true).find('ul').animate({height: height},200);
			$(this).find('ul').show();
		},
		function(){
			var left = $("#menu .active").offset().left - $("#menu").offset().left +1;
			var width = $("#menu .active").width();
			$("#follower").stop(true,false).animate({marginLeft: left, width: width},500);
			
			//$(this).stop(true).find('ul').animate({height: 0},200);
			$(this).find('ul').hide();
		}
	);
	
	//$("#product_slideshow ul").cycle({timeout: 2000});

	$('#product_carousel ul').jcarousel({
		auto: 3,
		wrap: 'circular'
	});
	
	$('#product_carousel a').lightBox();
	
	$('#actionorder').val('order');
	$('#actioncontact').val('contact');
	
});
