function setSearchPosition(){
	
	if($(this).scrollTop() > 230){
		position = $(this).scrollTop();
	} else {
		position = 256;
	}

	//$('#wo-menu').css('top', position   + "px"); 	
	
	/*
	$('#wo-menu').stop();
	
	$('#wo-menu').animate({
		top: position + "px"
	}, 1000);
	*/
	
}

function fotoSlider_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });
};

function setCarouselState(carousel){
	jQuery('.jcarousel-control a').removeClass("active");
	jQuery(".jcarousel-control a:eq("+ (carousel.first-1) +")").addClass("active");
	
	jQuery('.jcarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('.jcarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
}


$(document).ready(function(){
	
	/* SCROLL DE ZOEKFUNCTIE */
	setSearchPosition()
	
	$(window).scroll(function() { 
		setSearchPosition()
	});
	
	$('#banner-home ul').cycle({ 
		fx:    'fade', 
		speed:  3500 
	});
	
	$('#banner-detail ul').cycle({ 
		fx:    'fade', 
		speed:  3500 
	});
	
	$('#fotoslider').jcarousel({
		scroll: 1,
		buttonNextHTML: null,
        buttonPrevHTML: null,
		initCallback: fotoSlider_initCallback,
		itemLoadCallback: setCarouselState
	});
	
	$('#nvm ul').cycle({ 
		fx:    		'scrollHorz', 
		next:   	'#nvm-next', 
		prev:   	'#nvm-prev', 
		pause: 		1, 
		speed:  	1500, 
		speedIn:	500, 
		speedOut:	500, 
		timeout:	6500
	});

});
