var $j = jQuery.noConflict();

$j(document).ready(function(){
	
	//primaryNav Dropdowns
	$j('#primary-nav>li').hoverIntent(primaryNavConfig);
	
	$j('#banner-home #banner-wrap').easySlider({
		prevId: 'prevBtn',
		nextId: 'nextBtn',
		auto: true,
		continuous: true,
		pause: 4000	
	});

/* !Email a Friend Social Button ============================== */

$j(".socialForm").colorbox({width:"35%", height:"85%", iframe:true});

	
	// clear input on focus
 	var currentValue = '';
	$j('#ajaxSearch_input, #quick-contact input, #quick-contact textarea').focus(function(){	
		currentValue = $j(this).val();		
		(!$j(this).attr('title')) ? $j(this).attr('title', currentValue) : '' ;
		if($j(this).val() == $j(this).attr('title')){
			$j(this).val(''); 
		}
	}).blur(function(){
		if($j(this).val()==''){
			$j(this).val($j(this).attr('title'));
			currentValue = '';
		}
	});


});

//primaryNav Hover Intent Configuration
var primaryNavConfig = {    
     sensitivity: 10,     
     interval: 100,  
     over: primaryOver,   
     out: primaryOut,
     timeout: 250  
};

function primaryOver(){$j(this).find(">ul").slideDown('fast');  $j(this).addClass("hover"); }
function primaryOut(){$j(this).find(">ul").hide('fast');  $j(this).removeClass("hover"); }

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");


}

