<!--
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
} // onclick="bookmarksite(document.title,document.location);return false;"

// toggle open close button
function toggle_visibility(id) {
   var e = document.getElementById(id);
   if(e.style.display == 'none')
	  e.style.display = 'block';
   else
	  e.style.display = 'none';
}

// droplist changer
function display(obj,id1,id2) {
	txt = obj.options[obj.selectedIndex].value;
	document.getElementById(id2).style.display = 'none';
	if ( txt.match(id1) ) {
		document.getElementById(id2).style.display = 'none';
	}
	if ( txt.match(id2) ) {
		document.getElementById(id2).style.display = 'block';
	}
} //  onchange="display(this,'','');"

// addthis customizer
var addthis_config = {ui_cobrand:"Chesapeake Care", ui_use_addressbook:"true", data_track_clickback:"true"}

// jquery
$(document).ready(function(){
	// color every other row
	$('.grid tr:odd').addClass('odd');
	// save onstate
	loc = location.href.substring(7);
	loc = loc.substring(loc.indexOf("/"));
	var i = loc.indexOf("#");
	if (i > -1) loc = loc.substring(0, i);
	var i = loc.indexOf("?");
	if (i > -1) loc = loc.substring(0, i);
    if (loc == '/' && !($("#nav a[href='" + loc + "']").length)) loc = "/index.php";
	$("#topnav a[href='" + loc + "']").addClass('on');
	// preload images
	$.fn.preload = function() {
		this.each(function(){
			$('<img/>')[0].src = this;
		});
	}
	$(['']).preload();
	// placeholder
	if(!$.support.placeholder) {
	  var active; 
	  try { 
	  	active = document.activeElement; 
	  } catch(e) { 
	  	active = $('body');
	  }
      $("input:text").add("textarea").focus(function () {
         if ($(this).attr('placeholder') != '' && $(this).attr('placeholder') != undefined && $(this).val() == $(this).attr('placeholder')) {
            $(this).val('').removeClass('hasPlaceholder');
         }
      }).blur(function () {
         if ($(this).attr('placeholder') != '' && $(this).attr('placeholder') != undefined && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) {
            $(this).val($(this).attr('placeholder')).addClass('hasPlaceholder');
         }
      });
      $("input:text").add("textarea").blur();
      $(active).focus();
      $("form:eq(0)").submit(function() {
         $(":text.hasPlaceholder").add("textarea.hasPlaceholder").val('');
      });
	}
});
