﻿$(document).ready(function() {

    $("#language ul").hover(function() {

        $("#language li.first").addClass("firstShow");
        $("#language li").show("fast");
    }, function() {
    $("#language li.first").removeClass("firstShow");
        $("#language li:gt(0) ").hide("fast");
    });

    $("#topnav a.search").click(function() {
        if ($("#topnav a.search").hasClass("hover")) {
            $("#topnav a.search").removeClass("hover");
        }
        else {
            $("#topnav a.search").addClass("hover");
        }
        $("#search").toggle();


    });

    //    $("#search").hover(function() {
    //        $("#search").toggle(true);
    //        $("#topnav a.search").addClass("hover");
    //    }, function() {
    //    $("#search").toggle(false); $("#topnav a.search").removeClass("hover");
    //    });
});

function OpenWindow(address, heigth, width, title) {
    var winl = (screen.width - width) / 2;
    var wint = (screen.height - heigth) / 2;
    var options = "width=" + width;
    options += ",height=" + heigth;
    options += ",top=" + wint;
    options += ",left=" + winl;
    options += ",location=yes,toolbar=yes, menubar=yes, scrollbars=1, resizable";

    window.open(address, title, options);
}   