$(document).ready(function() { 

		$('.equalHeight').equalHeight();	
		$('.equalHeight2').equalHeight();	
		$('.equalHeight3').equalHeight();	
		
		$('.clearVal').clearType();	
		
		
		$("#fader").children('.img').hide();
		$("#fader").children('.img:first').addClass('active').show();
		
		setInterval(function(){
			if ($("#fader").children('.active').next('.img').size() > 0)
				{
					$("#fader").children('.active').removeClass('active').fadeOut('slow').next('.img').addClass('active').fadeIn('slow');
				}
			else
				{
					$("#fader").children('.active').removeClass('active').fadeOut('slow');
					$("#fader").children('.img:first').addClass('active').fadeIn('slow');
				}
			}, 5000);
		
		
		
});

$.fn.equalHeight = function () {
		var height		= 0;
		var maxHeight	= 0;
	
		// Store the tallest element's height
		this.each(function () {
			height		= $(this).outerHeight();
			maxHeight	= (height > maxHeight) ? height : maxHeight;
		});
	
		// Set element's min-height to tallest element's height
		return this.each(function () {
			var t			= $(this);
			var minHeight	= maxHeight - (t.outerHeight() - t.height());
			var property	= $.browser.msie && $.browser.version < 7 ? 'height' : 'min-height';
	
			t.css(property, minHeight + 'px');
		});
	
	

};

$.fn.clearType = function () {
	var thisVal = $(this).val();
	$(this).focus(function() {
		if($(this).val()==thisVal){
			$(this).val('');
		}
	});
	$(this).blur(function() {
		if($(this).val()==''){
			$(this).val(thisVal);
		}					  
	});
	
};
