﻿//justify width
$(document).ready(function() {
    var max = 0;
    $("label").each(function(){
        if ($(this).width() > max)
            max = $(this).width();    
    });
    $("label").width(max);
});
//highlight inputs


//$(document).ready(function(){
	//$("input").focus(function() {
	//	$(this).parents().filter("li").addClass("curFocus")
	//});
	//$("input").blur(function() {
	//	$(this).parents().filter("li").removeClass("curFocus")
	//});
//});


$(document).ready(function(){
	$('input[type="text"]').focus(function() {
		$(this).removeClass("w_auto").addClass("w_auto_focus")
	});
	$('input[type="text"]').blur(function() {
		$(this).removeClass("w_auto_focus").addClass("w_auto")
	});
	
	
	
	$('input[type="text"]').focus(function() {
		$(this).parent("div").removeClass("w_span_auto").addClass("w_span_auto_focus")
	});
	$('input[type="text"]').blur(function() {
		$(this).parent("div").removeClass("w_span_auto_focus").addClass("w_span_auto")
	});
	

	$('textarea').focus(function() {
		$(this).removeClass("w_auto").addClass("w_auto_focus")
	});
	$('textarea').blur(function() {
		$(this).removeClass("w_auto_focus").addClass("w_auto")
	});
	
		


	

	$('select').focus(function() {
		$(this).removeClass("w_auto_select").addClass("w_auto_select_focus")
	});
	$('select').blur(function() {
		$(this).removeClass("w_auto_select_focus").addClass("w_auto_select")
	});
	
	
	
	$('select').focus(function() {
		$(this).parent("div").removeClass("w_span_auto_select").addClass("w_span_auto_select_focus")
	});
	$('select').blur(function() {
		$(this).parent("div").removeClass("w_span_auto_select_focus").addClass("w_span_auto_select")
	});


	
	
	
	
	
	
	
	
	
	$("input").focus(function() {
		$(this).parents().filter("li").addClass("liFocus")
	});
	$("input").blur(function() {
			$(this).parents().filter("li").removeClass("liFocus")
	});

	
		$("select").focus(function() {
		$(this).parents().filter("li").addClass("liFocus")
	});
	$("select").blur(function() {
			$(this).parents().filter("li").removeClass("liFocus")
	});

	$("textarea").focus(function() {
		$(this).parents().filter("li").addClass("liFocus")
	});
	$("textarea").blur(function() {
			$(this).parents().filter("li").removeClass("liFocus")
	});

	
});
