﻿$(document).ready(function () {

	$('#ctl00_Banners_ctl00_ListDialog1 img').addClass('banner_img');

    $('.nav ul li a').each(function (index) {
        navText = $(this).text();
        $(this).html('<span class="spacer"></span><span>' + navText + '</span>');
    });

    $('.nav ul li a').click(function () {
        $(this).parent('li').addClass('selected');
        $(this).parent('li').siblings().removeClass('selected');
    });
	
    

    var config = {
        sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
        interval: 0, // number = milliseconds for onMouseOver polling interval    
        over: expandMenu, // function = onMouseOver callback (REQUIRED)    
        timeout: 300, // number = milliseconds delay before onMouseOut    
        out: collapseMenu // function = onMouseOut callback (REQUIRED)    
    };

    //$(".nav ul li").hoverIntent(config);

    function expandMenu() {
        jQuery(this).find("> ul").show();
    }

    function collapseMenu() {
        jQuery(this).find("> ul").hide();
    }

	$('.boxes').each(function(){
		var tallest = 0;

		$(this).children().each(function(i){
			if (tallest < $(this).height()) {
				tallest = $(this).height();
			}
		});
			
		$(this).children().css({'height': tallest});
	});

	
});
