jQuery(function(){
	jQuery('.hs-btn').click(function(){
		if(jQuery(this).find('span').hasClass('minus')){
			//close
			if(jQuery(this).hasClass('hs-last')){
				jQuery(this).addClass('round-bot');
			}
			jQuery(this).find('span').removeClass('minus').addClass('plus');;
			jQuery(this).next('ul.hs-list').slideUp(300);
		} else {
			//open
			if(jQuery('.minus').length > 0){
				jQuery('.minus').parent().parent().find('ul.hs-list').slideUp(300);
				jQuery('.minus').removeClass('minus').addClass('plus');
			}
			if(jQuery(this).hasClass('hs-last')){
				jQuery(this).removeClass('round-bot');
			} else {
				if(!jQuery('.hs-last').hasClass('round-bot')){
					jQuery('.hs-last').addClass('round-bot');
				}
			}
			jQuery(this).find('span').removeClass('plus').addClass('minus');
			jQuery(this).next('ul.hs-list').slideDown(300);
		}
		return false;
	});
	jQuery('#he-cta').click(function(){
		jQuery(this).hide();
		jQuery('#home-exp-block').css({
			backgroundColor:'#fafafa'
		});
		jQuery('#home-exp-block').animate({
			width:'415px',
			height:'230px'
		}, 200, function(){
			jQuery('#home-exp-block').css({
				backgroundColor:''
			});
			jQuery('#he-cta-content').show();
		});
		return false;
	});
	jQuery('#he-close').click(function(){
		jQuery('#he-cta-content').hide();
		jQuery('#home-exp-block').css({
			backgroundColor:'#fafafa'
		});
		jQuery('#home-exp-block').animate({
			width:'144px',
			height:'40px'
		}, 200, function(){
			jQuery('#home-exp-block').css({
				backgroundColor:''
			});
			jQuery('#he-cta').show();
		});
		return false;
	});
});
