//Front end Java Script File

// Global Variables 
var globalErr 			= 1;  // Contact Form Validation 
var SearchType 			= "partial"; //exact, whole, partial - Search method
//var searchDisplayType  	= "newpage"; // overlay =  below search textbox , newpage = on to the same page
var searchDisplayDivId = (searchDisplayType	=="overlay")?"search_dropdown":"content";//search_dropdown = overlay below search textbox , content = same page

var pager1 = new Pager('overlaySearchResultId', 3); // initialize, the Overlay Search Pagination
jQuery(document).ready(function() 
{

	
	 //displaying login form when login is clicked on opdrachtgevers
	    jQuery("#login_button").click(function(){
	        jQuery(".content_container").css("display", "none");
	        jQuery(".login_form").css("display", "block");
	        
	    });
// Enable Pretty Photo effect for Images 
//		jQuery("a[rel^='prettyPhoto']").prettyPhoto
//				({    
//					animationSpeed: 'normal', 		/* fast/slow/normal */
//					padding: 40, 					/* padding for each side of the picture */
//					opacity: 0.35, 					/* Value betwee 0 and 1 */
//					showTitle: false, 				/* true/false */
//					allowresize: false, 			/* true/false */
//					counter_separator_label: ' of ', /* The separator for the gallery counter 1 "of" 2 */
//					theme: 'light_rounded' 			/* light_rounded / dark_rounded / light_square / dark_square */
//				});
//			
	   
	// getting the header image fade effect
	if(document.getElementById("header_images"))
	{
		if(jQuery("#header_images img").length>1)
		{
//			alert(jQuery("#header_images img").length);
			jQuery('#header_images').cycle({ 
				fx:     'fade', //cover,scrollVert,uncover
			    timeout: 1000, 
			    random: true
			});
		}
	} 
	
	
	// getting the header image fade effect
	if(document.getElementById("left_images"))
	{
		if(jQuery("#left_images img").length>1)
		{
//			alert(jQuery("#header_images img").length);
//			jQuery('#left_images').cycle({ 
//				fx:     'fade', //cover,scrollVert,uncover
//			    timeout: 1000,
////			    speed:2000,
//			    random: true
//			});
		}
	} 
	
$("li > ul").hide();
	$("ul > li").hover(function()
	{
    jQuery(this).children("ul").show();
    },
    function()
    {
    jQuery(this).children("ul").hide();
    });	
	   		
});
