// 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); }
			});
		});
	}
// Pixastic for jQuery

function saturate(img) {
		var img2 = Pixastic.process(img, "desaturate");
		img2.onmouseover = function() {
			Pixastic.revert(this);
		}
}

$(document).ready(function(){

// png voor IE
		$('body').pngFix();

// dotted linkline
		$('a').focus(function() {this.blur();});

// formval joe!
//		$('#name, #email, #www').toggleVal();

// a img hover
		/*$('a img').hover(function(){
			$(this).stop().animate({'opacity':.6},200);
		}, function(){
			$(this).stop().animate({'opacity':1},200,
				function() {
					if ($.browser.msie)
						this.style.removeAttribute('filter');
				}
			);
		});*/

// center img in div
		/* $('.scroll-pane li img').each(function(){
				var imgH = $(this).height();
				var imgW = $(this).width();
				var divH = $(this).parent('div').height();
				var divW = $(this).parent('div').width();
				if(imgH > divH){
					$(this).css({'margin-top':(divH-imgH)/2});
				};
				if(imgW > divW){
					$(this).css({'margin-left':(divW-imgW)/2});
				};
		}); */

// form als t-shirt
		$('label.hidden').hide();

// fancybox
$(".fancybox").fancybox({
		'transitionIn'	: 'fade',
		'transitionOut'	: 'fade',
		'speedIn'	: 600, 
		'speedOut'	: 200
	});

// fancybox video...
$("a.fancyvideo").live('click',function() {
		$.fancybox({
                        'overlayOpacity': 0.7,
                        'overlayColor'  : '#000',
			'padding'	: 0,
			'margin'	: 0,
			'autoScale'	: false,
			'showCloseButton': true,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'		: this.title,
			'width'		: 600,
			'height'	: 339,
			'href'		: this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1'),
			'type'		: 'swf'

		});
		return false;
	});


$(".fancyframe").fancybox({
		'width'		: '60%',
		'height'	: '60%',
		'autoScale'     : false,
		'transitionIn'	: 'fade',
		'transitionOut'	: 'fade',
		'type'		: 'iframe',
		'speedIn'	: 600, 
		'speedOut'	: 200
	});


	});
