/**
 * Javascript init file
 * Initiates all javascript functionality used on this site
 *
 * @version 1.0
 * @copyright Sitemind Internet & Nieuwe Media, 18 February, 2010
 **/

/**
 * Cufon replacement
 **/
Cufon.replace('h1, h2');

$(document).ready(function(){
	
	/**
	 * Autoclear search field
	 */
	$("#q")
	.click(function() {
		if ($(this).val() == "Zoeken") $(this).val("");
	})
	.blur(function() {
		if ($(this).val() == "") $(this).val("Zoeken");
	});
	
	/**
	 * Homepage themeblocks
	 */
	if ($("#jongin-theme-youtube").length > 0){
		$("#jongin-theme-youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
	}
	
	
	if ($("#slider-holder").length > 0){
		$("#slider").easySlider({
			auto: true,
			continuous: true,
			speed: 700,
			pause: 5000,
			numeric: true,
			numericId: 'controls',
			prevText: 'Vorige',
			nextText: 'Volgende'
		});
	}
	
	/**
	 * Prettybox
	 */
	if($("a[rel^='prettyPhoto']").length) {
		$("a[rel^='prettyPhoto']").prettyPhoto({
			theme:'light_square',
			showTitle: false,
			allowResize: false
		});
	}
});

