$(document).ready(function() {

	// png fix (IE 5.5 e 6)
	if (document.all && document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule) {
		document.styleSheets[0].addRule('img', 'behavior: url("../includes/iepngfix.htc")');
	}
	
	$('form.InnerLabelInputs').each(function() {
		$(this).find('input[type=text],input[type=password]').each(function () {
			if($(this).val()) {
				var original_val = $(this).val();
				$(this).focus(function() { if ($(this).val() == original_val) $(this).val(''); });
				$(this).blur(function()  { if (!$(this).val())                $(this).val(original_val); });
			}
		});
	});
	
	$('input[name=username]').keypress(function(e) { if (e.keyCode == 13) doLogin(); });
	$('input[name=password]').keypress(function(e) { if (e.keyCode == 13) doLogin(); });
	
});