// JavaScript Document

var arr = [ "images/brandbox/stoombaden.jpg", 
 			"images/brandbox/tuinspa.jpg", 
			"images/brandbox/swimspa.jpg", 
			"images/brandbox/zonnebanken.jpg", 
			"images/brandbox/sauna.jpg",
			"images/brandbox/infrarood.jpg",
			"images/brandbox/diversen.jpg"];
			
var url  = ["stoombaden.php",
			"tuinspa.php",
			"swimspa.php",
			"zonnebanken-onze-visie.php",
			"sauna.php",
			"infrarood.php",
			"diversen.php"
			];

window.onload = function(){	
    jQuery.each(arr, function(i, val) {
	$('#item_0'+(i+1) + ' .image').css('background-image','url('+val+')');
	});
};
function brandbox(){
	jQuery.each(arr, function(i) {
		$('#item_0'+(i+1) + ' .image').hover( function () {
			 // mouse over
			 $(this).slideUp(400);
		  }, 
		  function () {
		     // mouse out
		   	$('#item_0'+(i+1)).mouseleave(function(){ $('#item_0'+(i+1) + ' .image').slideDown(200); });
		  });
	});
	jQuery.each(url, function(i, val) {
		$('#item_0'+(i+1) ).click( function () {
			window.location = val;
		});
	});
}
//shows current page open
function brandboxCurrent(_num){
	$('#item_0'+_num).unbind('hover');
	$('#item_0'+_num).slideUp(0);
}
//for menu animation brandbox
function brandboxSlideUp(_num){
	$('#item_0'+_num + ' .image').slideUp(400);
}
function brandboxSlideDown(_num){
	$('#item_0'+_num + ' .image').slideDown(200);
}


$(function() {
/* ONZE MERKEN SLIDER */

$("#merken_top").click(function(){   			
	$('#merken_logo').slideDown(2000);
	$('#merken_top').css('background-image','url("images/bg_merken.png")');
});

$("#merken_sluit").click(function () {
	$('#merken_logo').slideUp(2000);
	$('#merken_top').css('background-image','url("images/bg_merken_arrow.png")');
});

});
