﻿/*
*	Heart of Florida Regional Medical Center
*	Copyright © 2009, McMurry Inc.
*	http://www.mcmurry.com
*
*	Base Javascript
*
*/
$(function() {
	$('#header #search input').focus(function() {
		$(this).filter(function() {
			return $(this).val() == '' || $(this).val() == 'Search by keyword';
		}).val('').addClass('focus');
	}).blur(function() {
		$(this).filter(function() {
			return $(this).val() == '';
		}).val('Search by keyword').removeClass('focus');
	});

	$('#menu ul li').hoverIntent(dPanel);
	$('#menu a').removeAttr('title');
	// Remove Current Section Dropdowns
	$('.root #header #menu ul #li_home .subnav, .about #header #menu ul #li_about_us .subnav, .physicians #header #menu ul #li_find_a_physician .subnav, .services #header #menu ul #li_our_services .subnav, .patients #header #menu ul #li_patient_visitors .subnav, .calendar #header #menu ul #li_news_events .subnav, .careers #header #menu ul #li_career_center .subnav, .locations #header #menu ul #li_maps_directions .subnav').remove();
});
var dPanel = { interval: 100, sensitivity: 10, over: addPanel, timeout: 100, out: removePanel };
function addPanel() { $($(this).find('div.subnav')).slideDown('fast'); $(this).addClass('hover'); }
function removePanel() { $($(this).find('div.subnav')).slideUp('fast'); $(this).removeClass('hover'); }
