<!--
	$(function(){

		$(".lightbox a, a.lightbox").lightBox();
		
				
		if($("#homelightbox").length > 0) {
			$("#homelightbox").show().click();
		}

//		if(pg + "" == "index.html") {
			
//		alert(pg + "-" + dealer);
		
/*		if(dealer + "" == "1") {
				$("#menu ul li ul").eq(0).show();
			
		} else {
			*/
			
			pg = pg.replace("lijst","overzicht");
	//		alert(pg);
			
			if($("a[href='" + pg + "']").length > 0) {
				//alert(pg);
				//alert($("a[href='" + pg + "']").parents("ul").length)
				$("a[href='" + pg + "']").parents("ul").show();
				$("a[href='" + pg + "']").parents("ul").show();
				//$("a[href='" + pg + "']").parents("li").show();
				$("a[href='" + pg + "']").parent("li").children("ul").eq(0).show();
				$("a[href='" + pg + "']").parents("li").addClass("actief");
				$("a[href='" + url + "']").parents("ul").show();
				$("a[href='" + url + "']").parent("li").children("ul").eq(0).show();
				$("a[href='" + url + "']").parents("li").addClass("actief");
			} 
			
			/*else {
				//$("#menu ul li ul").eq(0).slideDown();										 
			}
		} 
			*/
		
		$("#menu ul li a").click(function(){ 
			//alert("lel");0										  
			/*										  
			var sGo = $(this).attr("class");
			var aantal = $(this).parent("li").find("ul").length
			if(aantal == 0 || sGo == "go") {
				return true;
			} else {
				$("#menu ul li ul").slideUp();										 
				$(this).parents("li").find("ul").eq(0).slideDown();
				return false;
			}
			*/
			return true;
		});	
		
		$(".zoeken input").focus(function(){
			if($(this).val() + "" == "zoeken...") {
				$(this).val("");	
			}
		});
		
		$(".item").click(function(){
			var href = $(this).attr("href");
			if(href.substr(0,1) + "" == "/") href = href.substr(1,1000);
			if(href + "" !== "") {
				document.location.href = href;
				return false;
			} else {
				return true;			
			}
		});

		$(".dofoto").click(function(){
			var foto = $(this).attr("href");
			$("#zoom1").attr("href",foto);
			var src = $(this).find("img").attr("src");
			src = src.replace("70","300");
			src = src.replace("90","400");
			//$(".thumbs").append(src);
			$("#zoom1 img").attr("src",src)
			$("#zoom1").CloudZoom();
			return false;
		});			   

		
		$(".input").focus(function(){
			var orig = $(this).attr("orig");
			var val = $(this).val();
			//alert(orig + "-" + val);
			if(orig + "" == val + "") {
				$(this).val("");	
			}
		});
		
		$(".tabs ul li a").click(function(){
			var href = $(this).attr("href");
			$(".tabs_inhoud > div").hide();
			$("#" + href).show();
			$(".tabs ul li").removeClass("actief");
			$(this).parents("li").addClass("actief");
//			alert(href);
			return false;							   
		});
		
		$("#slider").sudoSlider({
			controlsShow : false,
			auto: true,
			pause: 3200,
			continuous: true
		});

		if($("#showcase").length > 0) {
			
			/*
			$("#showcase").awShowcase(
			{
				content_width:			765,
				content_height:			100,
				hundred_percent:		false,
				auto:					false,
				interval:				3000,
				continuous:				true,
				loading:				true,
				tooltip_width:			200,
				tooltip_icon_width:		32,
				tooltip_icon_height:	32,
				tooltip_offsetx:		18,
				tooltip_offsety:		0,
				arrows:					true,
				buttons:				false,
				btn_numbers:			true,
				keybord_keys:			true,
				mousetrace:				false,
				pauseonover:			true,
				transition:				'vslide', 
				transition_delay:		300,
				transition_speed:		500,
				show_caption:			'onhover', 
				thumbnails:				false,
				thumbnails_position:	'outside-last', 
				thumbnails_direction:	'vertical', 
				thumbnails_slidex:		0, 
				dynamic_height:			true,
				speed_change:			true,
				viewline:				false
			});*/
			
			$("#showcase li").eq(0).show();
			
			$("#showcase").sudoSlider({
				vertical: true										  
			});
		}
		
		$.each($("#email-form input[type=text], #email-form textarea"),function(){
			var orig = $(this).val();			
			$(this).attr("orig",orig);
		});
	
		$("#email-form input[type=text], #email-form textarea").focus(function(){
			var orig = $(this).attr("orig");
			if($(this).val() + "" == orig + "") {
				$(this).val("");
			}
		});
	
		$("#email-form input[type=text], #email-form textarea").blur(function(){
			var orig = $(this).attr("orig");
			if($(this).val() + "" == "") {
				$(this).val(orig);
			}
		});
	
		$("#email-form").submit(function(){
			var controle = true;
			var strFout = "";
			
			$.each($("#email-form .verplicht"),function(){
				$(this).removeClass("fout");
				if($(this).val() == "" || $(this).val() + "" == $(this).attr("orig")) {
					controle = false;
					strFout = strFout += $(this).attr("fout") + "\n";
					$(this).addClass("fout");
				}
			});
	
			if(!controle) alert(strFout);
	
			if(controle) {
				var email = $("#email-form .email").val();
				if(isValidEmailAddress(email)) {
					controle = true;
				} else {	
					controle = false;
					$("#email-form .email").addClass("fout");
					alert("E-mail is niet geldig");							
				}
			}
		
			return controle;
		});
		
	
		$("#nieuwsbrief").submit(function(){
			var controle = true;
			var strFout = "";
			
			$.each($("#nieuwsbrief .verplicht"),function(){
				$(this).removeClass("fout");
				if($(this).val() == "" || $(this).val() + "" == $(this).attr("orig")) {
					controle = false;
					strFout = strFout += $(this).attr("fout") + "\n";
					$(this).addClass("fout");
				}
			});
	
			if(!controle) alert(strFout);
	
			if(controle) {
				var email = $("#nieuwsbrief .email").val();
				if(isValidEmailAddress(email)) {
					controle = true;
				} else {	
					controle = false;
					$("#email-form .email").addClass("fout");
					alert("E-mail is niet geldig");							
				}
			}
		
			return controle;
		});
				
		
		$(".printpg, .printIt").click(function(){
			window.print();									 
			return false;							 
		});
		
		function isValidEmailAddress(elementValue){
			var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
			return emailPattern.test(elementValue);
		}				
		
	});
-->
