/**
 * custom.js
 *
 * 1Serpent
 * Design, Development and Managed Hosting
 * http://1serpent.com/
 *
 * Adds some magic to our pretty stuff.
 */

jQuery(document).ready(function($) {

	// Hide noscript
	$('#noscript').hide();

	// Drop-down menu navigation fix
	$("ul.menu > li").hover(function() {
		$(this).addClass("sp_hover");
	}, function() {
		$(this).removeClass("sp_hover");
	});

	// Front page tabs
	$('.sp_tabs_container').tabs({
		fx: {
			duration: 'normal',
			height: 'toggle'
		}
	});

	// Equal height
	function equalHeight(group) {
		var tallest = 0;
		group.each(function() {
			var thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	}

	equalHeight( $("#content, #sidebars") );
	equalHeight( $("#sp_network_area .site_box") );

});
