// form-value
jQuery.fn.toggleVal = function(focusClass) {
	this.each(function() {
		$(this).focus(function() {
			// clear value if current value is the default
			if($(this).val() == this.defaultValue) { $(this).val(""); }
			
			// if focusClass is set, add the class
			if(focusClass) { $(this).addClass(focusClass); }
		}).blur(function() {
			// restore to the default value if current value is empty
			if($(this).val() == "") { $(this).val(this.defaultValue); }
			
			// if focusClass is set, remove class
			if(focusClass) { $(this).removeClass(focusClass); }
		});
	});
}
// jcarousel
function mycarousel_initCallback(carousel)
{

// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
};

$(document).ready(function(){

// dotted border removert
	$('a').focus(function() {this.blur();});
	
// neukende IE insect
	$(document).pngFix();

// plaatjes-die-heul-link-zijn fadert
	$('a.linkimage img').hover(
		function(){
			$(this).stop().animate({"opacity": .67});
	}, function(){
			$(this).stop().animate({"opacity": 1});
	});
// link naar nieuwe pagina forceerdert
$('a[rel="external"]').click(function(){
	this.target = "_blank";
});
// nav toggle
	$('#nav_wrapper').css('top','-236px');
	$('#nav_wrapper div h1').click(
			function(){
				var position = $("#nav_wrapper").position();
				var topPos = '';
				if (position.top == 0) {
					topPos = '-236'
				} else {
					topPos = 0
				};
				$('#nav_wrapper').animate({'top': topPos},300);
			}
	);
// nav hovers
	$('#nav div:not(.active) ul li a').css({'color':'#FFF'});
	$('#nav div:not(.active)').hover(
		function(){
			$(this).css({'background':'#FFF'}).find('a').css({'color':'#131313'});
	}, function(){
			$(this).css({'background':'none'}).find('a').css({'color':'#FFF'});
	});
//raarrrrr
	$('input[type="hidden"]').addClass('hidden');
	$('input[type="submit"]').css('width','auto');
});