

			$('#informatiefotos').cycle({
				fx:     'fade',
				timeout: 6000,
				prev:   '#prev',
				next:   '#next',
				speed: 800
			});	
			$('#winkel_aanbiedingen').cycle({
				fx: 'fade',
				timeout: 5000,
				speed: 800
			});
			$('.topfoto').cycle({
				fx: 'scrollHorz',
				timeout: 4000,
				speed: 1200,
				next: '.next',
				prev: '.prev'
			});	
			$('.logobar').cycle({
				fx: 'scrollHorz',
				timeout: 4000,
				speed: 2000
			});				
			
	// product images new
	
			$('#prodpics').cycle({ 
				fx:     'fade', 
				speed:  'fast', 
				timeout: 0, 
				//next: '#prodpics img',
				pager:  '#nav', 
				pagerAnchorBuilder: function(idx, slide) { 
					// return selector string for existing anchor 
					return '#nav li:eq(' + idx + ') a'; 
				} 
			});
			

$(document).ready(function()
{

	// nieuwsbrief
	$(".nieuwsbrief input[name=mailinglist_email]").focus(function() {
		$(this).css("color", "#d10000");
		if ($(this).val() == "Uw e-mailadres") {
			$(this).val("");
		}
	});
	$(".nieuwsbrief input[name=mailinglist_email]").blur(function() {
		$(this).css("color", "#999999");
		if ($(this).val() == "") {
			$(this).val("Uw e-mailadres");
		}
	});
	
   $("input[name=betaalmethode]").change(function () {
      if ($(this).val() == "incasso") {
         $("#incasso_options").css("display", "block");
      } else {
         $("#incasso_options").css("display", "none");
      }
   });

	// font resizen
	
	originalFontSize = 16;
  
	$(".textresizer").click(function() {
		var textsize = $('html').css('font-size').replace("px", "");
		
		if (textsize > originalFontSize) {
			$('html').css('font-size', '1.0em');
            $.get("/includes/ajax_font.php", {size: "1.0em"});
		} else {
			$('html').css('font-size', '1.3em');
            $.get("/includes/ajax_font.php", {size: "1.3em"});
		}
	});	

	// menu collapse
	
	$(".submenu:not(.no_display)").hide();
	$(".knop").click(function()
	{
		//$(".submenu").slideUp(500);
		$(this).next(".submenu").slideToggle(500);
		
	});
	  
	/*$(".knop, .knop_zonder_sub").mouseover(function () {
	$(this).stop().animate({ marginLeft: "-10px", paddingRight: "10px" }, 100 );
	});
	$(".knop, .knop_zonder_sub").mouseout(function () {
	$(this).stop().animate({ marginLeft: "0px", paddingRight: "0px" }, 100 );
	});
   */	
	$(".product").mouseover(function () {
		$(this).find(".productimg").stop().animate({ opacity: "0.7" }, 500 );
		$(this).find(".view").css({ fontWeight: "bold" });
	});
	$(".product").mouseout(function () {
		$(this).find(".productimg").stop().animate({ opacity: "1" }, 500 );
		$(this).find(".view").css({ fontWeight: "normal" });
	});	
	
	


			
	//product images
	
/*
				
    var images = $(".productbigimg img");            
                
	if (images.length > 1) {
	   
    	$(".productbigimg img").each(function() {
    		var src = $(this).attr("src");
    		src = src.replace("resized", "small");
    		var div = $("<div></div>").appendTo("#productthumbs");
    		var img = $("<img></img>").appendTo(div);
    		$(img).attr("src", src);
    	});
    
    } else {
        $("#productthumbs").css({"display":"none"});
    }
	
	$("#productthumbs").css({
		"opacity": 0.5,
		"z-index": 20
	});
	$(".productbigimg, #productthumbs").hover(function() {
		//over
		$("#productthumbs").stop().animate({"opacity": 1}, 400);
	}, function() {
		//out
		$("#productthumbs").stop().animate({"opacity": 0.5}, 400);
	});
	
	
	$("#productthumbs div").hover(function() {
		var curent = $(this);
		var teller = 0;
		var item = 0;
	
		$("#productthumbs div").each(function() {
			if ($(curent).html() == $(this).html()) {
				item = teller;
			}
			teller++;
		});
		
		//var positionLeft = (item * 130) - 10; 
		var positionLeft = (item * 130) + 500; 
		
		$(this).css({
			backgroundImage: "url(/images/img_box.png)",
			backgroundPosition: "top left",
			width: "170px",
			height: "134px",
			paddingTop: "31px",
			marginTop: "-31px",
			paddingLeft: "10px",
			marginLeft: positionLeft + "px",
			zIndex: 25,
			position: "absolute",
			left: 0 //added to kill trip effect in IE7
		});
		$(this).next().css({marginLeft: "130px"});
	}, function() {
		$(this).css({
			backgroundImage: "none",
			width: "130px",
			height: "125px",
			paddingTop: "10px",
			marginTop: "0px",
			paddingLeft: "0px",
			marginLeft: "0px",
			zIndex: 20,
			position: "static"
		});
		$(this).next().css({marginLeft: "0px"});
	});
	
	$("#productthumbs div img").click(function() {
		var src = $(this).attr("src");
		src = src.replace("small", "resized");
        
		$(".productbigimg img").each(function() {
			if ($(this).attr("src").indexOf(src) > -1) {
				var obj = $(this).parent().clone();
				$(obj).prependTo($(".productbigimg"));
				$(this).remove();
			}
		});
	});

	*/
	
	//newspanel home
       $(".news_imgs").cycle({
            before: function(currSlideElement, nextSlideElement, options, forwardFlag) {
               goto_slide(nextSlideElement);
            },
            timeout: 6000
         });
         
         $(".btns a:not(.more)").hover(function() {
            $(".news_imgs").cycle('pause');
            
            var nr = $(this).parent().prevAll().length;
            $(".news_imgs").cycle(nr);
            goto_slide($(this).parent());
         }, function() {
            $(".news_imgs").cycle('resume');
         });
		 
		// fancybox
		
			$("a.fancybox").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none',
				'titlePosition'	: 'outside'
			});		
	
	
	
});	

      function goto_slide(nextSlideElement) {
         var nr = $(nextSlideElement).prevAll().length;
         $(".btns a").removeClass("on");
         $(".btns a:eq(" + nr + ")").addClass("on");
         $(".snippet div").css("display", "none");
         $(".snippet div:eq(" + nr + ")").css("display", "block");
      }

