aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/default/js/popupForm.js
blob: eb6d1ae203657e17d94c6519a22c8c324ef8463c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$(document).ready(function() {

    $("#search-form").hide();

    function closeSearch() {
        $("#search-form").toggle();
        $("#search").toggleClass("current");
        $("#search-arrow").toggleClass("arrow-down");
    }

    $("#search").click(function(){
        closeSearch();
        // if other popup is already shown
        if ($("#bagit-form").length != 0) {
            $("#bagit").removeClass("active-current");
            $('#content').removeClass("opacity03");
            $("#bagit").removeClass("current");
            $("#bagit-arrow").removeClass("arrow-down");
            $("#bagit-form").hide();
        }
        $('#searchfield').focus();
    });

    $("#search-form-close").click(function(){
        closeSearch();
    });


});