$(function() {


	// http://j.mp/jquery-target-blank
	$('a[href^="http://"]').attr({
		target: "_blank"
	});


	// Slideshow Using Cycle Plugin
	// $('#banner').cycle({
	// 	fx:     'fade',
	// 	speed:   1000,
	// 	timeout: 6000,
	// });
	
	$('#banner div').cycle({ 
	    fx: 'fade'
	});
	
	
	// 	Labelify
	$("#search-form input").labelify({
		text: "label"
	});
	
	
	// Hover Drop-Down - uses hoverintent
	var config = {    
         sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
         interval: 200,  // number = milliseconds for onMouseOver polling interval    
         over: doOpen,   // function = onMouseOver callback (REQUIRED)    
         timeout: 200,   // number = milliseconds delay before onMouseOut    
         out: doClose    // function = onMouseOut callback (REQUIRED)    
    };
    
    function doOpen() {
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    }
 
    function doClose() {
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    }

    $("ul.dropdown li").hoverIntent(config);
    
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" <span>&raquo;</span> ");


});
