// JavaScript Document

$(document).ready(function() {
	//Left thumbnail slider
  	$('.btn-holder-left-small').bind('mouseover', moveBoxLS);
	  function moveBoxLS(e) {
		e.preventDefault();
		$('.btn-holder-left-small').unbind();
		if($(".nav-left-small").css('left') == "-55px") {
			$('.move-btn-left-small').css('backgroundPosition','bottom right');
			$('.move-btn-right-small').css('backgroundPosition','bottom left');
			//Slides the left photoslider on screen
			$('.nav-left-small').animate({ left: '+=80px' }, 200, function() {
				$('.btn-holder-left-small').bind('mouseover', moveBoxLS);
		    });
			$('.nav-right-small').animate({ right: '+=80px' }, 200, function() {
		    });
		} else {
			$('.move-btn-left-small').css('backgroundPosition','bottom left');
			$('.move-btn-right-small').css('backgroundPosition','bottom right');
			//Slides the left photoslider off screen
			$('.nav-left-small').animate({ left: '-=80px' }, 200, function() {
				$('.btn-holder-left-small').bind('mouseover', moveBoxLS);
			});
			$('.nav-right-small').animate({ right: '-=80px' }, 200, function() {
			});
		}
	}
	
	//Right thumbnail slider
	$('.btn-holder-right-small').bind('mouseover', moveBoxRS);
	  function moveBoxRS(e) {
		e.preventDefault();
		$('.btn-holder-right-small').unbind();
		if($(".nav-right-small").css('right') == "-55px") {
			$('.move-btn-right-small').css('backgroundPosition','bottom left');
			$('.move-btn-left-small').css('backgroundPosition','bottom right');
			//Slides the right photoslider on screen
			$('.nav-right-small').animate({ right: '+=85px' }, 200, function() {
				$('.btn-holder-right-small').bind('mouseover', moveBoxRS);
			});
			$('.nav-left-small').animate({ left: '+=80px' }, 200, function() {
			});
		} else {
			$('.move-btn-right-small').css('backgroundPosition','bottom right');
			$('.move-btn-left-small').css('backgroundPosition','bottom left');
			//Slides the right photoslider off screen
			$('.nav-right-small').animate({ right: '-=85px' }, 200, function() {
				$('.btn-holder-right-small').bind('mouseover', moveBoxRS);
		    });
			$('.nav-left-small').animate({ left: '-=80px' }, 200, function() {	
			});
		}
	}
		
	//Content Dropdown	
	$('.dropdown-btn').click(function() {
		if($(".content").css('display') == 'block') {
			 $('.dropdown-btn').css('backgroundPosition','-52px -14px');
			 //Makes the content columns fade away
			 $(".content").animate({ opacity: 0 }, 200, function() {
				$('.content').css('display','none');												
			 });
		} else {
			 //brings the content columns back
			 $('.content').css('display','block');
			 $('.dropdown-btn').css('backgroundPosition','0px -14px');
			 $(".content").animate({ opacity: 1 }, 200, function() {												
			 });
		}
	});
	
	//Photo slider menu
	$(".photo-slider-menu li").click(function(e){  
	    switch(e.target.id){  
             case "binnen":  
                 //change status &amp;amp;amp; style menu  
                 $("#binnen").addClass("active");  
                 $("#buiten").removeClass("active");  
                 $("#omgeving").removeClass("active");  
             break;  
             case "buiten":  
                 //change status &amp;amp;amp; style menu  
                 $("#binnen").removeClass("active");  
                 $("#buiten").addClass("active");  
                 $("#omgeving").removeClass("active");  
             break;  
             case "omgeving":  
                 //change status &amp;amp;amp; style menu  
                 $("#binnen").removeClass("active");  
                 $("#buiten").removeClass("active");  
                 $("#omgeving").addClass("active");  
             break;  
         }  
         //alert(e.target.id);  
         return false;  
     });

});
