Cufon.replace('h5, h6, .sidebar h2, .nav ul li a.head, .grid-2 h1, .slide-text-1 span, .slide-text-2 span, .slide-text-3 span, .slide-text-3 a, .slide-text-1 span, .slide-text-2 span, .sidebar-head-title h1', { hover: true, fontFamily: 'Avenir LT Std 750'});
Cufon.replace('h1, .post h2, .post h1, .info-blue h1, .sidebar-blue-text, .event-slider h4, .has-info-box, .post-text .right-sidebar h5, .event-titles li a,  .options-area h2, .options-box li .right-col-title span, .subcl_title span, .subc_title span, .subcr_title span, .sub_left_title span, .sub_center_title span, .sub_right_title span, .options-box li .left-col-title span, .provider-box h2, .event-join h2, .dex-box h2, .dex-box-area h2, .post-event h2, .event-box h2', { hover: true, fontFamily: 'Avenir LT Std 550'});

//Cufon.replace('.post-event h2, .event-box h2', { hover: true, fontFamily: 'AvenirRoman400'});

Cufon.replace('.sidebar-top-msg h2', { hover: true, fontFamily: 'Avenir LT Std 550'});
Cufon.replace('.title h1', { hover: true, fontFamily: 'Avenir LT Std 750'});

	$(function() {
	    $('a[href^=http]').click( function() {
	        window.open(this.href);
	        return false;
	    });
	});

	
function inputReseter(jqObj, iniVal){
  $(jqObj).focus(function(){
     value = $(this).val();
     if( value == iniVal ){
       $(this).val('');
     }else{
       // user has ented input, do nothing
     }
  });
  $(jqObj).blur(function(){
     if($(this).val() === ''){
       $(this).val(iniVal);
     }else{
       // user has ented input, do nothing
     }
  });
}
$(document).ready(function(){
$(".tabs").tabs(".lifestyle-slider > div.article1", {

 fadeOutSpeed: "slow",

 rotate: false

// use the slideshow plugin. It accepts its own configuration
}).slideshow();
						   
						   
	$(".quest:last-child").addClass("last-item");
	$(".gallery ul li:last-child").addClass("last-child");
	inputReseter($('#search'), 'Search');
	inputReseter($('.zip'), 'Enter zip code');
	inputReseter($('.dex-zip'), 'Enter zip code');
	inputReseter($('#address'), 'Enter address');
	inputReseter($('#city'), 'Enter city');
	inputReseter($('#zip'), 'Enter zip code');
	
	
		$("#menu ul li a").addClass("head");
		$("#menu ul li ul a").removeClass("head");
		heightul1=$('#menu li.green-cycle').height();
		heightul2=$('#menu li.community').height();
		heightul3=$('#menu li.action').height();
		$('#menu ul li.headlink').animate({ height:'41px' }, 0); 
		$('#menu ul li.green-cycle.current-item').animate({ height: heightul1 }, 0);	
		$('#menu ul li.community.current-item').animate({ height: heightul2 }, 0);	
		$('#menu ul li.action.current-item').animate({ height: heightul3 }, 0);			
		 
		$('#menu .green-cycle').hover(function() { 
			$('#menu ul li.green-cycle').stop().animate({ height:heightul1 }, 500); 
			$('#menu ul li.green-cycle.current-item').stop().animate({ height:heightul1 }, 500);  
		}, function() {  
			$('#menu ul li.green-cycle').stop().animate({ height:'41px' }, 500); 
			$('#menu ul li.green-cycle.current-item').stop().animate({ height:heightul1 }, 500);  			
		});
		
		$('#menu ul li.green-cycle').hover(function() {   
			$(this).stop().animate({ height:heightul1 }, { duration: 500, queue: false });
			$('#menu ul li.green-cycle.current-item').stop().animate({ height:heightul1 }, 500);  
			
		}, function() {
			$(this).stop().animate({ height:'41px' }, 500);
			$('#menu ul li.green-cycle.current-item').stop().animate({ height:heightul1 }, 500);  
		});
		
		
		$('#menu .community').hover(function() { 
			$('#menu ul li.community').stop().animate({ height:heightul2 }, 500); 
			$('#menu ul li.community.current-item').stop().animate({ height:heightul2 }, 500);  
		}, function() {  
			$('#menu ul li.community').stop().animate({ height:'41px' }, 500);  
			$('#menu ul li.community.current-item').stop().animate({ height:heightul2 }, 500);  
		});
		
		$('#menu ul li.community').hover(function() {   
			$(this).stop().animate({ height:heightul2 }, { duration: 500, queue: false });
			$('#menu ul li.community.current-item').stop().animate({ height:heightul2 }, 500);  
			
		}, function() {
			$(this).stop().animate({ height:'41px' }, 500);
			$('#menu ul li.community.current-item').stop().animate({ height:heightul2 }, 500);  
		});
		
		
		$('#menu .action').hover(function() { 
			$('#menu ul li.action').stop().animate({ height:heightul3 }, 500); 
			$('#menu ul li.action.current-item').stop().animate({ height:heightul3 }, 500);  			
		}, function() {  
			$('#menu ul li.action').stop().animate({ height:'41px' }, 500); 
			$('#menu ul li.action.current-item').stop().animate({ height:heightul3 }, 500);  	
		});
		
		$('#menu ul li.action').hover(function() {   
			$(this).stop().animate({ height:heightul3 }, { duration: 500, queue: false });
			$('#menu ul li.action.current-item').stop().animate({ height:heightul3 }, 500);  	
		
			
		}, function() {
			$(this).stop().animate({ height:'41px' }, 500);
			$('#menu ul li.action.current-item').stop().animate({ height:heightul3 }, 500);  	
		});

		$('.num').hover(function() {  
						$(".tabs").data("tabs").next();
			if( thisIsIe ){
			$(this).children('span').first().show();
			  }else{
				$(this).children('span').first().fadeIn('fast');
				}
			}, function() {
			if( thisIsIe ){
			
			$(this).children('span').first().hide();
			  }
				else{
			$(this).children('span').first().fadeOut('fast');
			}
			
		});
		

  });
  
$(function() { 

$("#accordion").tabs("#accordion div.answer", {tabs: 'h4', effect: 'slide', initialIndex: null});
});
$.tools.tabs.addEffect("slide", function(i, done) {

	// 1. upon hiding, the active pane has a ruby background color
	this.getPanes().slideUp().css({backgroundColor: 'transparent'});

	// 2. after a pane is revealed, its background is set to its original color (transparent)
	this.getPanes().eq(i).slideDown(function()  {
		$(this).css({backgroundColor: 'transparent'});

		// the supplied callback must be called after the effect has finished its job
		done.call();
	});
});




