
jQuery.fn.exists = function() {
	return jQuery(this).length > 0; 
}

function Middle_Fit() {
	
	$('#content .content-body-middle').css('width', $('#content').outerWidth(true) - $('#content .sidebar-right').outerWidth(true) - $('#content .sidebar-left').outerWidth(true) -5 );
}

jQuery(function($){

	if($("input[type='text']").exists()) {
		$("input[type='text']").toggleVal();
	}
	
	$('#content .form-create-account .input-text-wrapper input:not(.focus)').focus(function() {
		$(this).addClass('focus');
	});
	
	$('#content .form-create-account .input-text-wrapper input:not(.focus)').blur(function() {
		$(this).removeClass('focus');
	});
		

	$('#header .bar ul.menu li:last-child a').css({
		'border-right': 'none'
	})
	
	$('#content .form-create-account .input-submit-wrapper input').hover(
		function() { $(this).addClass('hover') },
		function() { $(this).removeClass('hover') }
	);
	
	Middle_Fit();
});

$(window).resize(function(e) {
	Middle_Fit();
});

