Cufon.replace('.free_utility-list .row .text h2, #header #main-nav li .top-level a, #rotator .title, #rotator p, #rotator a, #home-blocks .block .text h2, #features-block #features-interior .title', { fontFamily: 'Myriad Pro', hover: true });

$(function() {
	
	// misc styles
	$('#footer .links .link-list:last').css('margin-right','0');
	$('#solutions ul li:last').css('border-bottom','0');
	$('#home-blocks .block:last').css('background','none');
	$('#features-block #features-interior .feature .content ul li:last').css('margin-right','0');
	//$('#breadcrumb-container #breadcrumb ul li:not(:last)').after('<li class="divider">|</li>');
	$('#left-nav > ul li:last').addClass('last');
	$('#main-nav ul li:last').addClass('last');
	$('.thumbnail-list .row:last').css('border','0');
	$('ul.dropdown.products li:first').css('border','0');
	$('ul.dropdown.products li:last').css('border-left','2px solid #fff');
	
	
	// main nav
	$('#header ul#utility-nav > li:not(:last)').after('<li class="divider">|</li>');
	$('#header ul#main-nav > li:last').css('background','none').addClass('last');
	$('#header ul#main-nav > li').hover(function () {
		
		if ($(this).children().hasClass('dropdown')) {
		
			$(this).prev().css('padding-right','0');
			$(this).prev().children(':first-child').css('border-right','1px solid #efeeee');
			$(this).css({'background':'none','border-bottom':'1px solid #fff'});
			$(this).children(':first-child').css({'border-right':'1px solid #efeeee','padding-right':'37px','background':'#fff'});
		
		}
		
		$(this).children(':first-child').css('color','#6a0c29');
		$(this).find('.arrow').attr('src', 'http://www.kratosnetworks.com/assets/images/arrow-down-maroon.png');
		$(this).find('ul').css('display','block');

	},function () {
		
		$(this).prev().css('padding-right','1px');
		$(this).prev().children(':first-child').css('border-right','none');
		$(this).css({'background':'none','border-bottom':'1px solid #efeeee'});
		
		if(!$(this).hasClass('last')) {
			$(this).css('background','url(http://www.kratosnetworks.com/assets/images/bg-nav-off.png) top right no-repeat');
		}
		
		if($(this).hasClass('active')) {
			$(this).children(':first-child').css('background','url(http://www.kratosnetworks.com/assets/images/bg-nav-on.png) repeat-x');
		}
		
		$(this).children(':first-child').css('color','#333');
		$(this).children(':first-child').css({'border-right':'0','padding-right':'38px'});
		$(this).find('.arrow').attr('src', 'http://www.kratosnetworks.com/assets/images/raquo.png');
		$(this).find('ul').css('display','none');
		
	});
	
	
	// sub tabs
	/*$('.sub-tabs li').click(function(){
		
		var index = $('.sub-tabs li').index(this) + 1;
		
		$('.sub-tabs li').each(function() {
    		$(this).removeClass('active');
		});
		
		$(this).addClass('active');
		$('.gallery .top-cap')[0].className = $('.gallery .top-cap')[0].className.replace(/\btab-[0-9]?\b/g, '');
		$('.gallery .top-cap').addClass('tab-'+index);
								 
	});*/
	
	$("div.select-box select").change(function() {
		window.location.href = $(this).val();
	});
	
	// product selector
	$('#product-selector table tr td:first-child').css('width','359px');
	$('#product-selector table tr td:last-child, #product-selector table th:last-child').css({'width':'130px','border-right':'0','text-align':'center'});
	$('#product-selector table tr td:nth-child(2n), #product-selector table tr th:nth-child(2n)').css('text-align','center');
	$('#product-selector table tr:even:not(:first)').css('background', '#f6f6f6');
	$('#product-selector table tr:odd').css('background', '#eaeaea');
	
	// validation
	$("#leadForm").validate();
	
	
});

