$(document).ready(function(){

	$(document).pngFix();

	$("#searchNav .tab").click(function(){
		if(!$(this).hasClass('active'))
		{
			var relBlockId = $(this).parent().children().removeClass('active').end().end().addClass('active').attr('rel');
			$("#searchContent > div").removeClass('active').filter(relBlockId).addClass('active');
		}
	})

	$("a.doc, a.xls, a.pdf, a.rar").addClass("inlineBlock");

	$("#content table tr:even").addClass("even");

	$(".rightBlock .announceItems > .announceItem:last-child").addClass("last");

	var placeholderCheck = document.createElement('input');
	if(!('placeholder' in placeholderCheck))
	{
		$("input[placeholder], textarea[placeholder]").each(function(){
			$(this).val($(this).attr('placeholder'));
		})
		$("input[placeholder], textarea[placeholder]").bind({
			focus: function () {
				if($(this).val() == $(this).attr("placeholder"))
					$(this).val("");
			},
			blur: function () {
				if($(this).val() == "")
					$(this).val($(this).attr("placeholder"));
			}
		});
	}
    
    $("#topMenu .menuItem").bind({
        mouseenter: function(){     
            $($(this).attr('rel')).show();
        },
        mouseleave: function(){
            $($(this).attr('rel')).hide();
        }
    });
    
    $("#aboutRegistrationLink").click(function(event){
        $("#aboutRegistration").slideToggle();
        event.preventDefault();
    })

});
