jQuery().ready(function(){
						
		//cycle plugin: http://malsup.com/jquery/cycle/int2.html of http://malsup.com/jquery/cycle/more.html?v2.23
		if ( $('#slideshow').length ) {
			$("#slideshow").cycle({ 
			random:        1,      // true for random, false for sequence (not applicable to shuffle fx) 
			fx:           'fade',  // name of transition effect (or comma separated names, ex: fade,scrollUp,shuffle) 
			timeout:       8000,   // milliseconds between slide transitions (0 to disable auto advance) 
			speed:         800,    // speed of the transition (any valid fx speed value) 
			pager:         "#nav",// selector for element to use as pager container 
			pagerClick:    null,  // callback fn for pager clicks:  function(zeroBasedSlideIndex, slideElement) 
			pagerEvent:   'click',// name of event which drives the pager navigation 
			fit:           1,     // force slides to fit container 
			sync:          1, 	  // By setting the sync option to false you can get some interesting twists on your transitions. 
			pause:         1,     // true to enable "pause on hover" 
			pauseOnPagerHover: 1, // stop slideshow when pagers are being hovered
			autostop:      0,     // true to end slideshow after X transitions (where X == slide count) 
			autostopCount: 0,     // number of transitions (optionally used with autostop to define X)  
			slideExpr:     "div", // all content of div#slider is a slide. but not the pager
			fastOnEvent:   0,   // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
			cleartype:     1 // enable cleartype corrections 
			});
		}


		if ( $('#rotator').length ) {
			$("#rotator").cycle({ 
			fx:           'scrollUp',  // name of transition effect (or comma separated names, ex: fade,scrollUp,shuffle) 
			timeout:       8000,   // milliseconds between slide transitions (0 to disable auto advance) 
			speed:         800,    // speed of the transition (any valid fx speed value) 
			pager:         "#navRotator",// selector for element to use as pager container 
			pagerClick:    null,  // callback fn for pager clicks:  function(zeroBasedSlideIndex, slideElement) 
			pagerEvent:   'click',// name of event which drives the pager navigation 
			fit:           1,     // force slides to fit container 
			sync:          1, 	  // By setting the sync option to false you can get some interesting twists on your transitions. 
			pause:         1,     // true to enable "pause on hover" 
			pauseOnPagerHover: 1, // stop slideshow when pagers are being hovered
			autostop:      1,     // true to end slideshow after X transitions (where X == slide count) 
			autostopCount: 1,     // number of transitions (optionally used with autostop to define X)  
			slideExpr:     "div", // all content of div#slider is a slide. but not the pager
			fastOnEvent:   0,   // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
			cleartype:     1 // enable cleartype corrections 
			});
		}

						
		//FORM : http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/
		$('form').jqTransform({imgPath:'jqtransformplugin/img/'});
		
		
		// FILE TYPE: http://www.appelsiini.net/projects/filestyle
		 /*$("input[type=file]").filestyle({ 
		image: "../assets/images/choose-file.gif",
		imageheight : 31,
		imagewidth : 82,
		width : 230,
		});*/
		$("input[type=file]").addClass('btnBrowse');
		
		

	//http://jqueryui.com/download
	$(function() {
		var icons = {
			header: "ui-icon-circle-arrow-e",
			headerSelected: "ui-icon-circle-arrow-s"
		};
		$( "#accordion" ).accordion({
			icons: icons
		});
		$( "#toggle" ).button().toggle(function() {
			$( "#accordion" ).accordion( "option", "icons", false );
		}, function() {
			$( "#accordion" ).accordion( "option", "icons", icons );
		});
	});
	
	
	//bigTarget
	if ( $('.wrapBigTargets').length ) {
	$(".wrapBigTargets h3 a").bigTarget({
	hoverClass: 'bigTargetHover', // CSS class applied to the click zone onHover
	clickZone : 'div:eq(0)' // jQuery parent selector
	});
	}
	
	
	if ( $('.idTargetOcmw').length ) {
	$(".idTargetOcmw a").bigTarget({
	hoverClass: 'pointer', // CSS class applied to the click zone onHover
	clickZone : 'div:eq(0)' // jQuery parent selector
	});
	}
	
	if ( $('.boxNewsItem').length ) {
	$(".boxNewsItem h2 a").bigTarget({
	hoverClass: 'boxNewsItemHover', // CSS class applied to the click zone onHover
	clickZone : 'div:eq(0)' // jQuery parent selector
	});
	}
	
	if ( $('.dateBig').length ) {
	$(".dateBig dt a").bigTarget({
	hoverClass: 'blueHover', // CSS class applied to the click zone onHover
	clickZone : 'div:eq(0)' // jQuery parent selector
	});
	}
	
	
	// INFOBOX
	$.fx.speeds._default = 700;
	$(function() {
		$( "#dialog" ).dialog({
			autoOpen: false,
			show: "fade",
			hide: "puff",
			modal: true
		});

		$( ".idOpener" ).click(function() {
			$( "#dialog" ).dialog( "open" );
			return false;
		});
	});
	
	//AUTOFILL SEARCH
	$(function() {
		var availableTags = [
			"OCMW",
			"Woonbegeleiding",
			"Welzijnsbureau",
			"Lokale dienstencentra",
			"Dienstverlenende diensten of een langer woord",
			"Wooncentra",
			"Zorgcentra",
			"Seniorenwoning",
		];
		$( ".idSearchfield" ).autocomplete({
			source: availableTags
		});
	});


	
	//navTop
	//http://www.sohtanaka.com/web-design/examples/mega-dropdowns/#
	function megaHoverOver(){
		$(this).find(".sub").stop().fadeTo('fast', 1).show();
			
		//Calculate width of all ul's
		(function($) { 
			jQuery.fn.calcSubWidth = function() {
				rowWidth = 0;
				//Calculate row
				$(this).find("ul").each(function() {					
					rowWidth += $(this).width(); 
				});	
			};
		})(jQuery); 
		
		if ( $(this).find(".row").length > 0 ) { //If row exists...
			var biggestRow = 0;	
			//Calculate each row
			$(this).find(".row").each(function() {							   
				$(this).calcSubWidth();
				//Find biggest row
				if(rowWidth > biggestRow) {
					biggestRow = rowWidth;
				}
			});
			//Set width
			$(this).find(".sub").css({'width' :biggestRow});
			$(this).find(".row:last").css({'margin':'0'});
			
		} else { //If row does not exist...
			
			$(this).calcSubWidth();
			//Set Width
			$(this).find(".sub").css({'width' : rowWidth});
			
		}
	}
	
	function megaHoverOut(){ 
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  $(this).hide(); 
	  });
	}


	var config = {    
		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 100, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 500, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};

	$("ul#topnav li .sub").css({'opacity':'0'});
	$("ul#topnav li").hoverIntent(config);


	
		

		
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
});// doc.ready



