jQuery(document).ready(function() {
    
	jQuery.fn.search = function() {
		return this.focus(function() {
			if( this.value == this.defaultValue ) {
				this.value = "";
			}
		}).blur(function() {
			if( !this.value.length ) {
				this.value = this.defaultValue;
			}
		});
	};
	
	
	jQuery(".email").search();
	
	jQuery.initialfeatureheight = jQuery('#featuredProducts').height();
	jQuery.initialspecialsheight = jQuery('#specials').height();
	
	
	jQuery('#specials').animate({opacity: 'toggle', height: 'toggle'}, 1);
	
	
  jQuery("#specialsbtn").click(function()
  {  
  	if (jQuery("#special").is('.inactive')) {
	 jQuery('#featuredProducts').animate({opacity: '0', height: '0'}, 500);
	 jQuery('#homepanels').animate({height: jQuery.initialspecialsheight}, 500);
	 jQuery('#specials').animate({opacity: '0', height: '0'}, 500)
	 .animate({opacity: '100', height: '100%'}, 500);
	 jQuery("#special").removeClass('inactive');
	 jQuery("#specials").addClass('activepanel');
	 jQuery("#feature").addClass('inactive');
	 jQuery("#featuredProducts").removeClass('activepanel');
	}
  });
  
  jQuery("#featuredbtn").click(function()
  {
	 if (jQuery("#feature").is('.inactive')) {
	 jQuery('#specials').animate({opacity: '0', height: '0'}, 500);
	 jQuery('#homepanels').animate({height: jQuery.initialfeatureheight}, 500);
	 jQuery('#featuredProducts').animate({opacity: '0', height: '0'}, 500)
	 .animate({opacity: '100', height: '100%'}, 500);
	 jQuery("#feature").removeClass('inactive');
	 jQuery("#featuredProducts").addClass('activepanel');
	 jQuery("#special").addClass('inactive');
	 jQuery("#specials").removeClass('activepanel');
	 }
  });


	 jQuery('a[href=http://www.webogroup.com/]').css('visibility','hidden');	
});
