
/* Main Menu   -----------------------------------------------------------*/

jQuery(document).ready(function(){

/* k menu  */
	k_menu(); // controls the dropdown menu

});

function k_menu()
{
	// k_menu controlls the dropdown menus and improves them with javascript
	
	jQuery(".nav a").removeAttr('title');
	jQuery(" .nav ul ").css({display: "none"}); // Opera Fix

	
	//smooth drop downs
	jQuery(".nav li").each(function()
	{	
		
		var $sublist = jQuery(this).find('ul:first');
		
		jQuery(this).hover(function()
		{	
			$sublist.stop().css({overflow:"hidden", height:"auto", display:"none", paddingTop:30}).slideDown(400, function()
			{
				jQuery(this).css({overflow:"visible", height:"auto"});
			});	
		},
		function()
		{	
			$sublist.stop().slideUp(400, function()
			{	
				jQuery(this).css({overflow:"hidden", display:"none"});
			});
		});	
	});
}


/* Search Tooltip   -----------------------------------------------------------*/
/* hover fade functions */
function fade_hover() {
	jQuery('.fade_hover').hover(
		function() {
				jQuery(this).stop().animate({opacity:0.4},400);
			},
			function() {
				jQuery(this).stop().animate({opacity:1},400);
		});

}
jQuery(document).ready(function() {
	if(!jQuery.browser.msie){
		}   fade_hover();

	//site search tooltip
	jQuery("#search").tooltip({ effect: 'slide' , relative: true, offset: [70, -47]});
	
		jQuery('.agent_contact .agent-popup').hide();
	
		jQuery('.one_third .agent_contact span').hover(function(){
			
			jQuery('.agent_contact .agent-popup').toggle();
		});
	
});



/* Quick Search   -----------------------------------------------------------*/
$(document).ready(function(){

	$(".quick_button").click(function(){
		$("#quick_search").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	 
});

/* Inner Fade   -----------------------------------------------------------*/
$(document).ready(function() {

$('.image_fade').hover(function() {
	$(this).stop().animate({"opacity" : .7});									
}, function(){
	$(this).stop().animate({"opacity" : 1});	
});
});


