function init()
{
	jQuery("input[type=text]").click(function(){jQuery(this).select()});
	
	jQuery(jQuery("#menu li")[0]).css({ backgroundImage:'none', paddingLeft:'0'});
	jQuery(jQuery("#menu li ul li a")[0]).css('borderLeft','0px none');
	jQuery(jQuery("#subnav li a")[0]).css('borderLeft','0px none');
	
	navInit();
}

function navInit()
{
    jQuery('#menu').children('li').each(function(i) {
        if (jQuery(this).children("a").attr('class').indexOf('active') < 0) {
            jQuery(this).hover(function() {
                jQuery(this).addClass('hover');
                if (jQuery(this).attr('class').indexOf('hover') >= 0) jQuery(this).children("a").children("img").attr("src", jQuery(this).children("a").children("img").attr("src").split('.')[0] + '_on.png');
            }, function() {
                jQuery(this).removeClass("hover");
                jQuery(this).children("a").children("img").attr("src", jQuery(this).children("a").children("img").attr("src").split('_on')[0] + '.png');
            });
        }
        else {
            jQuery(this).hover(function() {
                jQuery(this).addClass('hover');
            }, function() {
                jQuery(this).removeClass("hover");
            });
        }
    });
}

jQuery(document).ready(init);  

function Display(display, divExpand, divCorappse, divHide)
{
	if (display)
	{
		$(divExpand).hide();
		$(divCorappse).show();
		$(divHide).show();
	}
	else
	{
		$(divExpand).show();
		$(divCorappse).hide();
		$(divHide).hide();
	}
}
