$(document).ready(function() {
	if ($('#bottom').length > 0) {	
		$('#bottom').children('div.box:first').addClass('first');
		$('#bottom').children('div.box:last').addClass('last');
		var w = $('#bottom').width();
		var h = $('#bottom').height();
		var bxc = $('#bottom').children('div.box').length;
		if (bxc <= 3) {
			$('#bottom').children('div.box').addClass('wide');
			var pad = 54;
		}else{
			$('#bottom').children('div.box').addClass('nwide');
			var pad = 34;
		}
		var wop = $('#bottom').children('div.box').length - 1;
		var bxw = (w - (pad * wop)) / bxc;
		$('#bottom').children('div.box').css({width: bxw+'px'});
	}
});

$(window).load(function() {
	$('#bottom').children('div.box').css({height: $('#bottom').height()+'px'});
});

$(document).ready(function () {
  $('.clearme').focus(function() {
    $(this).val("").addClass("changeme");
  });
  
  
  //Get Li Counts
  li_cnt = $("#menu-sub-menu>li").length; 
  
  //$("#menu-sub-menu>li:lt("+(li_cnt-1)+")").addClass("first_child") ; 
  $("#menu-sub-menu>li").each(function(){$(this).css("paddingRight", "4px").css("paddingLeft", "2px")}) ; 
  $("#menu-sub-menu>li:lt("+(li_cnt-1)+")").each(function(){ $(this).after("<li style=' color:#222;  padding-left:3px; padding-right:3px;  margin:0px'>||</li>") ;}); 
  $("#menu-main-nav-menu").parent().parent().after("<div class='clear' style='height:1px;'></div>"); 
  
  //$("#menu-sub-menu>li:lt("+(li_cnt-1)+")").hover(function(){$(this).css("textDecoration", "underline")}); 

});
