
	// jquery scripts
	$(document).ready(function () {

		// lightbox laten werken
		$('a.lightbox').lightBox();
		
		// slideshow
		$('#slideshow').cycle({ 
		    fx:    'fade', 
		    speed:  5000,
		    pause: 	1 
		 });	

         $(".tooltip-target").ezpz_tooltip({
            stayOnContent: true,
            contentPosition: 'rightStatic',
            showContent: function(content) {
                content.fadeIn('slow');
            },
            hideContent: function(content) {
                // if the showing animation is still running, be sure to stop it
                // and clear the animation queue. otherwise, repeatedly hovering will
                // cause the content to blink.
                content.stop(true, true).fadeOut('slow');
            }
        });
	

	$(function(){

            $("ul.dropdown li").hover(function(){
            
                $(this).addClass("hover");
                $('ul:first',this).css('visibility', 'visible');
            
            }, function(){
            
                $(this).removeClass("hover");
                $('ul:first',this).css('visibility', 'hidden');
            
            });
            
            $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

        });
  
	});	



	
	// voor het gebruik van exotische font gebruiken we Cufon
	// Cufon('h1')('h2')('#mainmenu ul li a')('#submenu ul li a');	
	
	
	// validatie functies
	function postcodeCheck(postcode) {
		var result 	= false;
		var filter  = /^[0-9]{4}[ A-Za-z]{2,3}$/;
		
		if ((postcode.length) > 0) {
			if (filter.test(postcode)) {
				result = true;
			}
		}
		return result
	}	

	function emailCheck(addres) {
		
		var result 	= false;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		
		if ((addres.length) > 0) {
			if (filter.test(addres)) {
				result = true;
			}
		}
		return result;
	}
	
	function notEmpty(str) {
		
		var result 	= false;
		//var filter  = /^[a-zA-Z0-9_\-,\.\'']{255}$/;
		
		if ((str.length) > 0) {
			//if (filter.test(str)) {
				result = true;
			//}
		}
		return result;
	}	
	
	function isDate(date) {
		
		var result 	= false;
		var filter  = /^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/;
		
		if ((date.length) > 0) {
			if (filter.test(date)) {
				result = true;
			}
		}
		return result;
	}	

	// velden aanduiden of ze verplicht zijn
	function outlineInput(id, status){
		if(status){
			$('#'+id).addClass('outline');
			$('#'+id).focus();
		} else {
			$('#'+id).removeClass('outline');
		}
	}	

    // -- start video -------------------------------------------------------------------------------
    // jquery scripts
    $(document).ready(function () {

        // als er een videoplayer container is, mag de player worden aangeroepen.
        if ( $("#videoplayerSmall").length > 0) {
            sHeight = '200';
            sWidth = '278';
            
            createPlayer(sInitialVideo, sHeight, sWidth, 'Small');
        }
        
        if ($("#videoplayerLarge").length > 0) {
            sHeight = '400';
            sWidth = '588';
        
            createPlayer(sInitialVideo, sHeight, sWidth, 'Large'); 
        
            // de clipselector/playlist
            $("#clipselector").easySlider({
                prevText: ' &laquo; vorige clips ',
                nextText: ' volgende clips &raquo; '
            });      
        }
    });

    // player object aanmaken en plaatsen
    function createPlayer(sFile, sHeight, sWidth, sSize) {
    
        var sUrl = 'http://dev.eye-c.nl/johnmedley.nl/';  
    
        if(sFile == undefined || sFile == ''){
            sFile = sInitialVideo;
        } else {
            sFile = sFile;
        }
        
        var flashvars = {
            file: sFile,
            autostart:"false"
            //skin: sUrl + "swf/skins/skinname.zip"
        }
        
        var params = {
            allowfullscreen:"true", 
            allowscriptaccess:"always",
            wmode: "transparent"
        }
        var attributes = {
            id:"player1",  
            name:"player1"
        }                                                          
        swfobject.embedSWF(sUrl +"swf/player.swf", "videoplayer"+sSize, sWidth, sHeight, "9.0.115", false, flashvars, params, attributes);
    }

    // video wijzigen
    function changeVid(mediaURL) {
        var player = document.getElementById("player1");
        
        player.sendEvent("LOAD", mediaURL);
    }
    // -- eind video -------------------------------------------------------------------------------	

   
