
/*--Определение двайса--*/
    var state = {
        _device: "",
        _mobInit: function(){
            mobInit();
        },
        _descInit: function() {
            descInit();
        },
    };
    (function( $ ) {
        $.fn.getDevice = function(braikPoint) {
            Object.defineProperty(state, "device", {
                get: function() {
                    return this._device;
                },
                set: function(value) {
                    this._device = value;
                    if(value == "desctop"){
                        state._descInit();
                    } else if (value == "mobile"){
                        state._mobInit();
                    }
                }
            });
            $(this).on("resize load", function(){
                if($(this).width() < braikPoint && state.device != "mobile"){
                    state.device = "mobile";
                } else if ($(this).width() > braikPoint && state.device != "desctop") {
                    state.device = "desctop";
                }
            });
        };
    })(jQuery);
    $(window).getDevice(768);
    function mobInit(){
        //Инициализация плагинов для телефона
    }
    function descInit() {
//Для десктопа
    }