(function($){
	
	function initPage() {
		$('#nav li:last, .foot-nav li:last').addClass('last');
		fixNav('#nav', 0);
		fixNav('.foot-nav', 1);
	}
	
	function fixNav(selector, diff) {
		var pl = $(selector).css('padding-left').split('p');
		var pr = $(selector).css('padding-right').split('p');
		var pad = Math.round(($(selector).innerWidth() - pl[0] - pr[0] - $(selector + ' ul').width())/($(selector + ' li').length-1)) - diff;
		$(selector + ' li').each(function() {
			if($(this).hasClass('last') == false) {
				$(this).css('padding-right', pad);
			}
		});
	}	
	
	$(function() {
		$('.blink').focus(function() {
			if(this.value == this.title) {
				this.value = ''
			}
		}).blur(function() {
			if(this.value == '') {
				this.value = this.title
			}
		});
		
		if($.browser.webkit) {
			$('#nav li:last').css({
				'margin-left': '-1px',
				'position': 'relative'
			});
		}
		
		$('.footer-txt .footer_font ul li:not(:last)').addClass('footer_li');
		$('.footer-txt .footer_font ul li.footer_li span').html('  |  ');

		initPage();
	});
	
})(jQuery)

