function toggleSitemap()
{
	if(document.getElementById("sitemapwrapper").style.display == 'none')
		$("#sitemapwrapper").fadeIn("slow");
	else
		$("#sitemapwrapper").slideUp("slow");
}

function clearInput(inputValue) {
	if(document.getElementById("searchbox").value == inputValue)
	{
		document.getElementById("searchbox").value = '';
		document.getElementById("searchbox").style.color = "#000000";
	}
}

$(function() { 		
	$('#slideshow').cycle({ 
		fx:     'fade', 
		speed:  'slow', 	
		timeout: 2000, 			
		pager:  '#nav', 		
		pagerAnchorBuilder: function(idx, slide) { 			
			// return sel string for existing anchor 			
			return '#nav li:eq(' + (idx) + ') a'; 	
			} 	
		});  
		
		$('#direct').click(function() { 
			$('#nav li:eq(2) a').triggerHandler('click'); 	
			return false; 	
		}); 	 

		//$(".textcontent p > img").click(function() {
		//	tb_show($(this).attr("alt"), $(this).attr("src"), "");
		//});


		$(".textcontent p > img[class='right']").wrap("<span class='clickableright'></span>");
		$(".clickableright").append('<i class="showright"><!-- Vergroot afbeelding --></i>');
		
		$(".textcontent p > img[class!='right']").wrap("<span class='clickable'></span>");
		$(".clickable").append('<i class="show"><!-- Vergroot afbeelding --></i>');
		
		

		$(".clickableright").click(function() {
			var childimage = $(this).find(":nth-child(1)")
			tb_show(childimage.attr("alt"), childimage.attr("src"), "");
		});



		$(".productimages p > img[class!='right']").wrap("<span class='clickable'></span>");
		$(".clickable").append('<i class="show"><!-- Vergroot afbeelding --></i>');

		$(".clickable").click(function() {
			var childimage = $(this).find(":nth-child(1)")
			tb_show(childimage.attr("alt"), childimage.attr("src"), "");
		});
});

function redirect(url){
	if (url.match("http")) {
		//window.open(url);
		window.location = url;
	}
	else {
		window.location = url;
	}
}
