function closeBoxy(){
    $('.boxy-wrapper').each(
        function (){ $(this).remove(); }
    )
    $('#screen').css('display', 'none');
}

function greyout(){
    $('#screen').css({'display': 'block', opacity: 0.7, 'width':'100%','height':$(document).height()});
}


$(function (){
	var found = false;
	$('#sub-nav a').each(function (){
		if( location.pathname + location.search == $(this).attr('href') ){
			$(this).addClass('active');
			found = true;
			return false;
		}
	})

	var found = false;
	$('#headernav a').each(function (){
		if( '/'+location.pathname.split('/')[1]+'/' == '/'+$(this).attr('href').split('/')[1]+'/' ){
            $(this).addClass('active');
			$(this).css({'color':"#FFF"});
			$(this).parent().parent().css({'background-color':'#C80000'});
			found = true;
			return false;
		}
	})
	
	var found = false;
	$('#top-nav a').each(function (){
		if( '/'+location.pathname.split('/')[1]+'/' == '/'+$(this).attr('href').split('/')[1]+'/' ){
			$(this).addClass('active');
			found = true;
			return false;
		}
	})
   
})

