//Equal Columns-----------------------------------------------------------------//
jQuery(document).ready(function(){
	jQuery('.column').equalHeight();
	jQuery('.column_2').equalHeight();
	jQuery('.column_3').equalHeight();
});

// make sure the jQuery is pointing to JQuery and not some other library

(function(jQuery){
	// add a new method to JQuery
	jQuery.fn.equalHeight = function() {
		// find the tallest height in the collection
		// that was passed in (.column)
		var tallest = 0;
		this.each(function(){
			thisHeight = jQuery(this).height();
			if( thisHeight > tallest)
				tallest = thisHeight;
		});

		// set each items height to use the tallest value found
		return this.each(function(){
			jQuery(this).height(tallest);
		});
	}
})(jQuery);


//jQuery Innerfade-----------------------------------------------------------//
jQuery(document).ready(
	function(){
		jQuery('#innerfade').innerfade({
			animationtype: 'fade',
			speed: 750,
			timeout: 10000,
			type: 'random',
			containerheight: '250px'
		});
	});
	
//Clear Text----------------------------------------------------------------//
function clearText(field){

if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;

}

// jQuery Validation ------------------------------------------//
//jQuery(document).ready(function(){
  //  jQuery("form").validate();
//});
//

/*
 * this will jewel is the terrace tie in
 */
(function($) { 
	$(document).ready(function() { 
		$("#searchForm").terraceSearch({
			// This needs to be the right location
			terrace: 'listings.remaxbangor.com'
		});
	});
})(jQuery);

