﻿$(document).ready(function() {
$("img[src$=png], .enter, .search, .redbutton div").pngfix();
	
	$('.top-menu .item:not(.sel)').hover(function() {
		$(".text", this).addClass("text-sel");
		$(".left", this).addClass("left-sel");
		$(".right", this).addClass("right-sel");
	}, function() {
		$(".text", this).removeClass("text-sel");
		$(".left", this).removeClass("left-sel");
		$(".right", this).removeClass("right-sel");
	});
	$(".top-menu .item:not(.sel)").click(function() { window.location = $("a", this).attr("href"); });

	$(".mainmenu .item:not(.item-sel)").hover(function() { $(this).addClass("item-sel"); }, function() { $(this).removeClass("item-sel"); });

	var menu = $('input[defaultText], textarea[defaultText]');
	menu.each(function() {
		var obj = $(this);
		obj.val(obj.attr("defaultText"));
	});
	menu.focus(function(event) {
		var obj = $(this)
		if (obj.val() == obj.attr("defaultText")) obj.val('');
	});
	menu.blur(function(event) {
		var obj = $(this)
		if (!obj.val()) obj.val(obj.attr("defaultText"));
	});

	$(".enter a").click(function() { if ($(".enter-form").css("display") == "none") $(".enter-form").slideDown("normal"); else $(".enter-form").slideUp("normal"); })

});

