function initScrollPane() {
	$('#scroll-content').jScrollPane({
		showArrows: true,
		scrollbarWidth: 9,
		scrollbarMargin: 0
	});
}

function initSelectbox() {
	$('select').each(function() {
		$(this).selectbox();
	});
}

function initSlideMenu() {
	$("#winkelmandje").css("height", "40px");

	$(".topMenuAction").click( function() {	   
		if( $("#openCloseIdentifier").is(":visible") ) {
			//$("#winkelmandje").css("height", "460px");
			$("#winkelmandje").css("height", "210px");
			$("#slideMenu").animate({
				marginTop: "0px"
			}, 460);
			$("#topMenuImage").html('<img src="' + devpath + 'images/layout/btnWinkelmandjeClose.png" alt="sluiten" />');
			$("#openCloseIdentifier").hide();
		}
		else {
			$("#slideMenu").animate({
				marginTop: -($("#slideMenu").height() - 29)
			}, 0);
			$("#topMenuImage").html('<img src="' + devpath + 'images/layout/btnWinkelmandjeOpen.png" alt="openen" />');
			$("#openCloseIdentifier").show();
			$("#winkelmandje").css("height", "40px");
		}
	});
}

function initPrijsSlider(min, max, values) {
	$("#prijs-slider").slider({
		range: true,
		min: min,
		max: max,
		values: values,

		slide: function(event, ui) {
			document.getElementById("prijslaag").innerHTML = ui.values[0];
			document.getElementById("prijshoog").innerHTML = ui.values[1];
		},

		stop: function(event, ui) { // Selectie gemaakt? Dan verzenden we 't formulier
			$('#slider_min').val(ui.values[0]);
			$('#slider_max').val(ui.values[1]);
			$('#zoekFilter').submit();
		}
	});
}


function initScrollTo() {
	// scroll ...
	$.scrollTo.defaults.axis = 'y';
	$('#scrollUp').click(function() {
		$('#content_placeholder').stop().scrollTo('-=173', 800, {'easing':'swing'});
	});
	$('#scrollDown').click(function() {
		$('#content_placeholder').stop().scrollTo('+=173', 800, {'easing':'swing'});
	});
}


// input velden...
function clearText(theField) {
	if( theField.defaultValue == theField.value ) theField.value = '';
}

function addText(theField) {
	if( theField.value == '' ) theField.value = theField.defaultValue;
}

