var $j = jQuery.noConflict();

$j(document).ready(function(){
    
     $j('table:not(".normal") tr:even').addClass('even');
    
    //primaryNav Dropdowns
	$j('#primary-nav>li').hoverIntent(primaryNavConfig);
	
	// clear input on focus
 		$j('#search-input').focus(function() {
			if ($j(this).val() == $j(this)[0].defaultValue) $j(this).val('');
		}).blur(function() {
			if ($j(this).val() == '') $j(this).val($j(this)[0].defaultValue);
	});
		  
   //end clear focus
	
	// Form Validation
	// $j('#contactForm').validationEngine();
	// $j('#quick-contact').validationEngine();
	
	$j('input[type="file"]').attr('size', '14');
	
	if ($j("#rivet-config #step2 .active").length > 0){
	
			$j("#rivet-config #progress-bar").css('backgroundPosition', 'left -20px');
			$j("#rivet-config #steps #step2 .section").not(".active").hide();
	 		$j("#rivet-config #steps #step1").hide();
	 		$j("#rivet-config #steps #step2").fadeIn();
	 		
	} else {
		
	 	$j("#rivet-config #steps").children(":not(#step1)").hide();
	 	
	 	$j("#rivet-config #steps #step1 a").click(function(e){
	 	
	 		e.preventDefault();
	 		rfqName = $j(this).attr('rel');
	 		$j("#rivet-config #progress-bar").css('backgroundPosition', 'left -20px');
	 		$j("#rivet-config #steps #step2 .section").not("#"+rfqName).hide();
	 		$j("#rivet-config #steps #step1").hide();
	 		$j("#rivet-config #steps #step2").fadeIn();
	 		
	 	});
	 	
	 	
 	
 	}
/* !Email a Friend Social Button ============================== */
$j(".socialForm").colorbox({width:"300px", height:"600px", iframe:true});


});

//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").fadeOut('fast');  $j(this).removeClass("hover"); }
