( function( $ ) {

    //search modal
    $('.search-toggle .genericon-search').click( function() {
        $('.search-wrapper').toggleClass('open-popup');
        $('.page-overlay').toggleClass('open-popup');
    });

    //off canvas
    $('.navigation-button .icon').click( function() {
        $('.off-canvas').toggleClass('open-popup');
        $('.page-overlay').toggleClass('open-popup');
        $('.navigation-button .icon').hide();
    });



    $('.page-overlay').click(function() {
        $('.search-wrapper').removeClass('open-popup');
        $('.page-overlay').removeClass('open-popup');
        $('.off-canvas').removeClass('open-popup');
        $('.navigation-button .icon').show();
    });

} )

(jQuery);