Cufon.replace('.slogan, #promoBar h2', { fontFamily: 'wsl' });

Cufon.replace('#menu li li a, .download li li a', { fontFamily: 'hmc', hover:{color: '#76ad1c'}});
Cufon.replace('#splashMenu li a', { fontFamily: 'hmc', hover: {color: '#96d22f'}});
Cufon.replace('h2.title, h3.title, #contactList h3', { fontFamily: 'hmc'});
Cufon.replace('.proDetail h3', { fontFamily: 'hmc', hover:{ color: '#76ad1c'}});
Cufon.replace('.tabList ul li a', { fontFamily: 'hmc', hover:{color: '#376216'}});
//Cufon.replace('.tabList li.active', { fontFamily: 'hmc', color: '#376216' });
Cufon.replace('h1.title, .colOne h3', { fontFamily: 'hlc'});

Cufon.replace('.colOne h3 em, #sidebar h2', { fontFamily: 'hlco'});
Cufon.replace('a.viewFull', { fontFamily: 'hlmco'});
Cufon.replace('.cTabs a', { fontFamily: 'hb', hover:{color: '#ffffff'}});
Cufon.replace('.bannerTxt h2, .learMore', { fontFamily: 'hbc', textShadow: '#8fa927 1px 1px'});
Cufon.replace('#colsBtm h2, #colsBtm2 h2, #colsBtm .colOne a.viewAll, #partners h2, #promoBar .submit span, .download a, #boxes li h3, #footerCols h2, .fBox h3, #contactForm button.submit, #proDocDownload a span', { fontFamily: 'hbc'});
Cufon.replace('#impLinks li a', { fontFamily: 'hbc'});
Cufon.replace('.callUs h1', { fontFamily: 'hmco', hover:{color: '#96d22f'}});

Cufon.replace('.bannerTxt h2 span', { fontFamily: 'mci', textShadow: '#8fa927 1px 1px' });
Cufon.replace('#splashMenu .label', { fontFamily: 'mbci', textShadow: '#8fa927 1px 1px' });
Cufon.replace('.callUs h1 span, .fBox h3 span', { fontFamily: 'mci'});
Cufon.replace('#boxes a.more', { fontFamily: 'mpi', textShadow: '#8fa927 1px 1px', hover:{textShadow: '#000000 1px 1px'}});
//$.noConflict();
jQuery(document).ready(function(){
	//var Sys;
	jQuery('#menu ul ul, .download ul ul, #splashMenu ul ul').css('display','block');
	jQuery('ul li:first-child').addClass("firstItem");
	jQuery('ul li:last-child').addClass("lastItem");
	jQuery('#impLinks li').hover(function(){
		jQuery(this).addClass('hover');
		Cufon.replace('#impLinks li.hover', { fontFamily: 'hbc', color: '#ffffff'});
		},function(){			
			jQuery(this).removeClass('hover');
			if(jQuery(this).hasClass('current'))
			Cufon.replace(this, { fontFamily: 'hbc', color: '#ffffff'});
			else
			Cufon.replace(this, { fontFamily: 'hbc', color: '#5f6062'});
		});
	var _fh = jQuery('#footerWrapper').height()+71;
	jQuery('#inner #wrapper, #innerDetail #wrapper').css({'padding-bottom':_fh+'px'});
	jQuery('#subMenu li a').wrapInner("<span class='out'><span class='in'></span></span>");
	jQuery('#splashMenu > ul').addClass("ul");
	jQuery('#splashMenu ul ul, #menu ul ul, .download ul ul').wrap("<div class='out'><div class='in'><div class='outer'><div class='inner'></div></div></div></div>");
	jQuery('#menu > ul > li > a, #splashMenu > ul > li > a, .download > ul > li > a').addClass("topLevel");
	jQuery('#menu li:has(ul), #splashMenu li:has(ul), .download li:has(ul)').addClass("parent");
	
	
	
	jQuery('#menu > ul > li').addClass("firstLevel");
	jQuery('#menu > ul > li > a').addClass("firstLevelLink");
	jQuery('#menu > ul > li.current_page_item:has(ul)').removeClass("current_page_item").addClass("current_parent_item");
	jQuery('#menu ul li a').each(function(){
		Cufon.replace('#menu ul li.current_page_ancestor a.firstLevelLink', { fontFamily: 'hmc', color: '#ffffff' });
		if(jQuery(this).parent().hasClass('current_page_item')){	
			jQuery(this).removeClass('firstLevelLink').addClass('currentLevelLink');
			Cufon.replace('#menu li.current_page_item a.currentLevelLink', {fontFamily: 'hmc', color: '#ffffff', hover:{color: '#ffffff'}});
		} else if(jQuery(this).parent().hasClass('current_parent_item')){	
			jQuery(this).removeClass('firstLevelLink').addClass('currentparentLevelLink');
			Cufon.replace('#menu li.current_parent_item a.currentparentLevelLink', {fontFamily: 'hmc', color: '#ffffff'});
			Cufon.replace('#menu li.current_parent_item a.currentparentLevelLinkHover', {fontFamily: 'hmc', color: '#ffffff'});
		} else if(jQuery(this).hasClass('firstLevelLink')) {
			Cufon.replace(this, {fontFamily: 'hmc', color: '#5f6062'});		
		} else if(jQuery(this).hasClass('firstLevelLinkHover')){
			Cufon.replace(this, {fontFamily: 'hmc', color: '#ffffff'});
		}
	});
	jQuery("input.submit, button.submit").hover(function () {
         jQuery(this).removeClass('submit').addClass('submitFocus');
    },function(){
		jQuery(this).removeClass('submitFocus').addClass('submit');
		});

	var config = {   
		sensitivity: 3, 
		interval: 0,  
		over: doOpen, 
		timeout: 100, 
		out: doClose  
	};

	function doOpen() {
		jQuery('div:first',this).stop(true, true).slideDown('fast');		
	}
	function doClose() {		
		jQuery('div:first',this).stop(true, true).slideUp('fast');
		
	}

	jQuery('#menu li, #splashMenu li, .download li.parent').hoverIntent(config);
	jQuery('#menu > ul > li').hover(function(){
	if(jQuery(this).hasClass('current_page_item')){	
		jQuery(this).find('.currentLevelLink').removeClass('currentLevelLink').addClass('currentLevelLinkHover');
	} else if(jQuery(this).hasClass('current_parent_item')){
		jQuery(this).find('.currentparentLevelLink').removeClass('currentparentLevelLink').addClass('currentparentLevelLinkHover');
		Cufon.replace('#menu li a.currentparentLevelLinkHover', { fontFamily: 'hmc', color: '#ffffff'});
	}else{
	
	}
	jQuery(this).removeClass('firstLevel').addClass("firstLevelHover");	
	jQuery(this).find('.firstLevelLink').removeClass('firstLevelLink').addClass("firstLevelLinkHover");	
	Cufon.replace('#menu li a.firstLevelLinkHover', { fontFamily: 'hmc', color: '#ffffff'});
	
	},function(){
		if(jQuery(this).hasClass('current_page_item')){	
		jQuery(this).removeClass('currentLevelLinkHover').addClass("currentLevelLink");	
	} else if(jQuery(this).hasClass('current_parent_item')){
		jQuery(this).find('.currentparentLevelLinkHover').removeClass('currentparentLevelLinkHover').addClass("currentparentLevelLink");
		Cufon.replace('#menu li.current_parent_item a.currentparentLevelLink', {fontFamily: 'hmc', color: '#ffffff'});	
	} else {
		jQuery(this).removeClass('firstLevelHover').addClass("firstLevel");	
	}
		jQuery(this).find('.firstLevelLinkHover').removeClass('firstLevelLinkHover').addClass("firstLevelLink");	
	if(jQuery(this).hasClass('current_page_item')){		
		Cufon.replace('#menu li.current_page_item a.firstLevelLink', { fontFamily: 'hmc', color: '#ffffff'});
	}else{
		Cufon.replace('#menu li a.firstLevelLink', { fontFamily: 'hmc', color: '#5f6062'});
	}
	jQuery(this).removeClass('firstLevelHover').addClass("firstLevel");
});

	jQuery('.tabs li').click(function(e){ 
		e.preventDefault(); 
		var _thislink = jQuery(this).find('a');
		jQuery(this).addClass('active').siblings('li').removeClass('active');
				
		var _index =  jQuery(this).index(); 
		jQuery('div.tabContent').hide().eq(_index).show(); 
	}).eq(0).click();
	jQuery(".cTabs li").click(function(c){ 
		c.preventDefault(); 
		var _thislink = jQuery(this).find('a');
		jQuery(this).addClass('active').siblings('li').removeClass('active');
				
		var _index =  jQuery(this).index(); 
		jQuery('div.locDetail').hide().eq(_index).show(); 
	}).eq(0).click();
	
	jQuery('.tabs li').click(function(){
		var _class = jQuery(this).attr("class");
		var _this = jQuery(this).find("a");
		var _newthis = jQuery(this).siblings().children("a");
		Cufon.replace(_this, {fontFamily: 'hmc',	color: '#376216'});
		Cufon.replace(_newthis, {fontFamily: 'hmc',	color: '#76ad1c'});
	});	
	jQuery('.cTabs li').click(function(){
		var _class = jQuery(this).attr("class");
		var _this = jQuery(this).find("a");
		var _newthis = jQuery(this).siblings().children("a");
		Cufon.replace(_this, {fontFamily: 'hb',	color: '#ffffff'});
		Cufon.replace(_newthis, {fontFamily: 'hb',	color: '#76ad1c'});
	});	
	
	jQuery('.instruction:empty').prev('.title').hide();
	jQuery('input[type="text"], textarea').each(function(){
	var default_value = this.value;
		jQuery(this).focus(function() {
			if(this.value == default_value) {
			this.value = '';
		}
		});
		jQuery(this).blur(function() {
				if(this.value == '') {
				this.value = default_value;
			}
		});
	});
	var c = setInterval( "slideSwitch()", 10000 );
	jQuery('#splashMenu > ul > li').hover(function(){ 
			clearInterval(c);
			var _index = jQuery(this).index(); 
			var active = jQuery('.banners li.active');
			var next = jQuery('.banners li').eq(_index);
   			active.addClass('last-active');
    	    next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 1000, function() {
            active.removeClass('active last-active');
        });			 
	},function(){ 
			c = setInterval( "slideSwitch()", 2000 );
	});
	jQuery('.tabs li').click(function(){
	jQuery('.tabContent .btns li').each(function(){
		var _dlink = jQuery(this).find('a').attr('href');
		if(_dlink=="http://"){
			jQuery(this).css("display","none");
			}
		});
		});
		jQuery('#proList .proDetail li').each(function(){
		var _dlink = jQuery(this).find('a').attr('href');
		if(_dlink=="http://"){
			jQuery(this).css("display","none");
			}
		});
		jQuery('#download table tr:even').addClass('altRow');
	jQuery('#download table tr:first-child').removeClass('altRow');
	jQuery('#download table tr td:first-child').addClass('catTitle');
	jQuery('#download table tr td ul').wrap('<div class="popWrap"><div class="popUp"><div></div></div></div>');
	jQuery('.td').hover(function(){
		jQuery(this).children('.popWrap').stop(true, true).fadeIn('medium');
		jQuery(this).find('.yes').removeClass('yes').addClass('yesHover');
		},function(){
			jQuery(this).children('.popWrap').stop(true, true).fadeOut('medium');
			jQuery(this).find('.yesHover').removeClass('yesHover').addClass('yes');
		});
});
function slideSwitch() {
    var active = jQuery('.banners li.active');
    if ( active.length == 0 ) active = jQuery('.banners li:last');
    var next =  active.next().length ? active.next() : jQuery('.banners li:first');
    active.addClass('last-active');
    next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 1000, function() {
    active.removeClass('active last-active');
    });
}

