/**
 *
 * Copyright (c) 2007 Tom Deater (http://www.tomdeater.com)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

(function($) {
	/**
	 * equalizes the heights of all elements in a jQuery collection
	 * thanks to John Resig for optimizing this!
	 * usage: $("#col1, #col2, #col3").equalizeCols();
	 */

	$.fn.equalizeCols = function(){
		var height = 0,
			reset = $.browser.msie && $.browser.version < 7 ? "1%" : "auto";

		return this
			.css("height", reset)
			.each(function() {
				height = Math.max(height, this.offsetHeight);
			})
			.css("height", height)
			.each(function() {
				var h = this.offsetHeight;
				if (h > height) {
					$(this).css("height", height - (h - height));
				};
			});

	};

})(jQuery);

/*******************************************************************************

	CSS on Sails Framework
	Title: 
	Author: XHTMLized (http://www.xhtmlized.com/)
	Date: April 2011

*******************************************************************************/

$(document).ready(function() {
	//Slideshow Functionality
	$('#content .slideshow2 div').cycle({
		timeout: 0,
		fx: 'fade',
		pager: '#content .slideshow2 ul',
		pagerAnchorBuilder: function(idx, slide) {
			return '#content .slideshow2 ul li:eq(' + idx + ') a';
		}
	});
	$('#banner').cycle({
		fx: 'fade',
		timeout: 5000,
		speed: 1000
	});
});

