$(document).ready(function() 
{
	
	
	
	
	
	
	
	
	
	$('#menu ul').hide();
	$('#menu li a').click(function() 
	{
		if($(this).next("ul").length > 0)
		{
			if($(this).parent().hasClass("selected"))
			{
				
				$("#menu li").removeClass("selected");
				$(this).next("ul").slideUp('normal');
			}
			else
			{
				
				$(this).parent().addClass("selected");
				$(this).next("ul").slideDown('normal');
				

			}
			
			return false;
		}
	});
	
	
	
	if($('#menu li').hasClass("selected"))
		{
		
		//var bla = $('#menu li').hasClass("selected");
			
			$('ul#menu li.selected a').next("ul").show();
		}
	
			$("a[rel=lytebox[gal]]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});	
			$('a[rel*=lightbox]').fancybox();
			$('a[rel*=other-views]').fancybox();		
});

function changeQTY(product) {
	//alert("test");
	var redirect;
	var product;
	var info;
	redirect = document.getElementById('aantal_' + product).value;
	info = document.getElementById('info_' + product).value;
	document.location.href = "/Shop/winkelwagentje/update/" + redirect + "/" + info + "/";
}
