// Initialize jQuery

jQuery(document).ready(function($){
	$(".menu_holder").hoverIntent(
		function() { // the mouseOver function
			$('ul.the_menu').slideDown('medium');
		},
		function() { // the mouseOut function
			$('ul.the_menu').slideUp('medium');
		}
	);

	$("ul#menu > li").hoverIntent({
	     sensitivity: 3,
	     interval: 300,
	     over: mouseover,
	     timeout: 300,
	     out: mouseout
	});
	function mouseover( ) { $('ul:eq(0)', this).stop(true, true).slideDown('medium'); }
	function mouseout( ) {
		var $this = $(this);
		var hasclass = $this.hasClass('current_page_ancestor');
		hasclass = hasclass || $this.hasClass('current_page_item');

		if ( ! hasclass) {
			$('ul:eq(0)', this).stop(true, true).slideUp('medium');
		}
	}

	$("li.link_box").hoverIntent(
		function() { // the mouseOver function
			$('ul.drop', this).slideDown('medium');
		},
		function() { // the mouseOut function
			$('ul.drop', this).slideUp('medium');
		}
	);

	$("li.link_box_fast").hoverIntent(
		function() { // the mouseOver function
			$('ul.drop_fast', this).slideDown('medium');
		},
		function() { // the mouseOut function
			$('ul.drop_fast', this).slideUp('medium');
		}
	);

	$("li.link_box_slow_last").hoverIntent(
		function() { // the mouseOver function
			$('ul.drop_slow', this).slideDown('medium');
		},
		function() { // the mouseOut function
			$('ul.drop_slow', this).slideUp('medium');
		}
	);

	$("li.link_box_slow").hoverIntent(
		function() { // the mouseOver function
			$('ul.drop_slow', this).slideDown('medium');
		},
		function() { // the mouseOut function
			$('ul.drop_slow', this).slideUp('medium');
		}
	);

	$("li.link_box_all_last").hoverIntent(
		function() { // the mouseOver function
			$('ul.drop_slow', this).slideDown('medium');
		},
		function() { // the mouseOut function
			$('ul.drop_slow', this).slideUp('medium');
		}
	);

	// for the image scroller on the home page //
	$('#home_pics')
	.cycle({
	    fx:     'fade',
	    speed:  'slow',
	    timeout: 7000,
			pager:  '#sections',
			    pagerAnchorBuilder: function(idx, slide) {
			        // return selector string for existing anchor
			        return '#sections li:eq(' + idx + ') a';
			    }
	});



// FLASH
// http://jquery.lukelutman.com/plugins/flash/example-basic.html

	/*$('#id').flash({
		src: 'folder/file.swf',
		width: 300,
		height: 300
	},
	{
		version: 8
	});*/

// OVERLABEL
// http://scott.sauyet.com/Javascript/Demo/Overlabel/

	/*$("label.overlabel").overlabel();*/

// NEWS TICKER
// http://www.texotela.co.uk/code/jquery/newsticker/

	/*$("#ul_id").newsticker();*/

// EQUAL HEIGHTS
// http://www.filamentgroup.com/examples/equalHeights/
	/*$('.container').equalHeights();*/

// LOCALSCROLL
// http://demos.flesler.com/jquery/localScroll/

	/*$.localScroll({
		offset:-10,
		easing:'easeInOutQuad'
	});*/

});

// SIFR
// http://jquery.thewikies.com/sifr/

	/*$(function () {

		// define the path to find fonts
		$.sifr({path:'js/sifr'});

		// h1
		$('h1').sifr({
			font:'quicksand',
			color:'#fff',
			offsetLeft:-3
		});

	});*/





















