"use strict";
(function ($) {
    $.account_menu = function (element, options) {
        let defaults = {
        };
        let plugin = this;
        plugin.settings = {};
        let $element = $(element);
        plugin.init = function () {
            plugin.settings = $.extend({}, defaults, options);
            var url      = window.location.search + '&';
            let $a = $element.find('a.list-group-item');
            $.each($a, function (index, item) {
                let href = $(item).attr('href');
                if(href.indexOf(url) > -1) {
                    $(item).addClass('active')
                }
            })
        };
        plugin.example_function = function () {
        };
        plugin.init();
    };
    $.fn.account_menu = function (options) {
        return this.each(function () {
            if (undefined === $(this).data('account_menu')) {
                let plugin = new $.account_menu(this, options);
                $(this).data('account_menu', plugin);
            }
        });
    }
})(jQuery);
