/* ArtlogicCMS - Resources functions */

(function($) {

    window.resources = {

        init: function() {
            this.records_el = $('#resources');
            this.professional_user_type = this.records_el.attr('data-professional_user_type');
            if (this.professional_user_type) {
                $('.tag-professional-' + this.professional_user_type).addClass('active_profession');
            }

            // submit button...
            $('#res_sf_submit a').click(function() {
                $('#resources_search_form').submit();
                return false;
            });

            // reset button...
            $('#res_sf_clear a').click(function() {
                $('#res_sf_search').val('').select();
                $('.res_sf_row select').val('');
                return false;
            });

        }

    };

    $(document).ready(function() {
        window.resources.init();
    });

})(jQuery);
