Cufon.replace('h2');
Cufon.replace('h4');


// flash video callback
function startFlashVideo(swfID){
	thisMovie(swfID).startFlashVideo();
}
function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
		} else {			
		return document[movieName];
	}
}


$(document).ready( function() {	

  // Primary Navigation
  $("#primnav_slide").hide();
  $('#primnav_wrap').hover(
    function() {
      $('.primnav').css("height","36px");
      //$("#home_content_wrap").stop().fadeTo("fast",0.33);
      $("#primnav_slide").stop().height('auto').slideDown(550);
    },
    function(){
      $("#primnav_slide").stop().slideUp(450, function(){
      $('.primnav').css("height", "23px");
      //$("#home_content_wrap").stop().fadeTo("fast",1.00)
      });
    }
  ); 
 
 // Top Search Field
 $("#top_search_input").focus(function() {          
		if (this.value==this.defaultValue) this.value='';
	 });  
	 $("#top_search_input").blur(function() {           
		if (this.value=='') this.value=this.defaultValue;
	 });  

  
  
  jQuery.fn.exists = function(){return jQuery(this).length>0;}

  if ($(".bookmark").exists()) {
	  // activate bookmark functionality
	  $(".bookmark").jFav();
  }
  
  
  	// IE6 select field overlapping bug
	jQuery.fn.activeXOverlap = function() { 
	
	    $(this).each(function(i){
	        var h   = $(this).outerHeight();
	        var w   = $(this).outerWidth();
	        var iframe  = '<!--[if IE 6]>' +
	                      '<iframe src="javascript:false;" style="height: ' +
	                      h +
	                      'px; width: ' +
	                      w +
	                      'px" class="selectOverlap">' +
	                      '</iframe>' +
	                      '<![endif]-->'
	        $(this).prepend(iframe);
	    });
	}
	
	$(function() {
		$('.ie6selectHover').activeXOverlap();
	});		
	
	
  

});

