// General
$(document).ready(function(){
	$(".sub-menu.current").slideDown();

	$(".thumbs a, div#makeMeScrollable a, a.box, #nieuwe-werken a").lightBox();

	$("form input, textarea").not("[type=submit]").focus(function(){
	    placeholder = $(this).attr("title");
	    val = $(this).val().toLowerCase();
	    if(placeholder==val) {
	        $(this).val("");
	    }
	}).blur(function(){
	    if($(this).val()=="") {
	        placeholder = $(this).attr("title");
	        $(this).val(placeholder.toUpperCase());
	    }
	});

});

// Nieuws
$(document).ready(function(){var wrapper="slide_wrapper";var scrollInterval=10;var scrollPos=0;var scrollStep=10;var spotHeight=$("#scroll_top").height();var selectedGroup='';if($("#"+wrapper+" #scroll_vissible").height()>$("#"+wrapper+" #scroll_content").height()){$("#"+wrapper+" #scroll_bottom").hide();}
$("#"+wrapper+" #scroll_top").bind("mousemove",function(e){var mouseY=e.pageY;var wrapperOffset=$(this).offset();var offsetTop=wrapperOffset.top;var next=113-(mouseY-offsetTop);scrollPos=Math.round((next/spotHeight)*scrollStep);});$("#"+wrapper+" #scroll_top").bind("mouseover",function(e){var bottomInterval=setInterval(function(){if($("#scroll_vissible").scrollTop()>0){var down=$("#scroll_vissible").scrollTop()-scrollPos;$("#scroll_vissible").scrollTop(down);$("#"+wrapper+" #scroll_bottom").css('display','block');}else{$("#"+wrapper+" #scroll_top").css('display','none');$("#"+wrapper+" #scroll_bottom").css('display','block');}},scrollInterval);$(this).bind("mouseout",function(e){clearInterval(bottomInterval);});});$('#'+wrapper).bind('mousewheel',function(event,delta){event.preventDefault();scrollVar=Math.round(delta);var nextPos=$("#scroll_vissible").scrollTop()-(scrollVar*scrollStep);$("#scroll_vissible").scrollTop(nextPos);if($("#scroll_vissible").scrollTop()>0){$("#"+wrapper+" #scroll_top").css('display','block');$("#"+wrapper+" #scroll_bottom").css('display','block');}else{$("#"+wrapper+" #scroll_top").css('display','none');$("#"+wrapper+" #scroll_bottom").css('display','block');}});$("#"+wrapper+" #scroll_bottom").bind("mousemove",function(e){var mouseY=e.pageY;var wrapperOffset=$(this).offset();var offsetTop=wrapperOffset.top;var next=mouseY-offsetTop;scrollPos=Math.round((next/spotHeight)*scrollStep);});$("#"+wrapper+" #scroll_bottom").bind("mouseover",function(e){var bottomInterval=setInterval(function(){h=$("#scroll_content").height();scrollH=($("#scroll_vissible").scrollTop()+$("#scroll_vissible").height());if(scrollH<h){var down=$("#scroll_vissible").scrollTop()+scrollPos;$("#scroll_vissible").scrollTop(down);$("#"+wrapper+" #scroll_top").css('display','block');}else{$("#"+wrapper+" #scroll_top").css('display','block');$("#"+wrapper+" #scroll_bottom").css('display','none');}},scrollInterval);$(this).bind("mouseout",function(e){clearInterval(bottomInterval);});});});

// Mousewheel
/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 *
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);
