
(function (_0x1454x1) {
    _0x1454x1['fn']['parallaxSlider'] = function (_0x1454x2) {
        var _0x1454x3 = _0x1454x1['extend']({}, _0x1454x1['fn']['parallaxSlider']['defaults'], _0x1454x2);
        return this['each'](function () {
            var _0x1454x4 = _0x1454x1(this),
                _0x1454x5 = _0x1454x1['meta'] ? _0x1454x1['extend']({}, _0x1454x3, _0x1454x4['data']()) : _0x1454x3;
            var _0x1454x6 = _0x1454x1('.pxs_slider', _0x1454x4),
                _0x1454x7 = _0x1454x6['children'](),
                _0x1454x8 = _0x1454x7['length'],
                _0x1454x9 = _0x1454x1('.pxs_next', _0x1454x4),
                _0x1454xa = _0x1454x1('.pxs_prev', _0x1454x4),
                _0x1454xb = _0x1454x1('.pxs_bg1', _0x1454x4),
                _0x1454xc = _0x1454x1('.pxs_bg2', _0x1454x4),
                _0x1454xd = _0x1454x1('.pxs_bg3', _0x1454x4),
                _0x1454xe = 0,
                _0x1454xf = _0x1454x1('.pxs_thumbnails', _0x1454x4),
                _0x1454x10 = _0x1454xf['children'](),
                _0x1454x11, _0x1454x12 = _0x1454x1('.pxs_loading', _0x1454x4),
                _0x1454x13 = _0x1454x1('.pxs_slider_wrapper', _0x1454x4);
            var _0x1454x14 = 0,
                _0x1454x15 = _0x1454x13['find']('img');
            _0x1454x15['each'](function () {
                var _0x1454x16 = _0x1454x1(this);
                _0x1454x1('<img/>')['load'](function () {
                    ++_0x1454x14;
                    if (_0x1454x14 == _0x1454x8 * 2) {
                        _0x1454x12['hide']();
                        _0x1454x13['show']();
                        var _0x1454x17 = _0x1454x6['find']('img:first')['width']();
                        _0x1454x25(_0x1454x6, _0x1454x7, _0x1454x8, _0x1454xb, _0x1454xc, _0x1454xd, _0x1454x17, _0x1454x9, _0x1454xa);
                        var _0x1454x18 = _0x1454x17 / (_0x1454x8 + 1);
                        _0x1454x10['each'](function (_0x1454x19) {});
                        _0x1454x23(_0x1454x10['eq'](0));
                        _0x1454x9['bind']('click', function () {
                            ++_0x1454xe;
                            if (_0x1454xe >= _0x1454x8) {
                                if (_0x1454x5['circular']) {
                                    _0x1454xe = 0;
                                } else {
                                    --_0x1454xe;
                                    return false;
                                };
                            };
                            _0x1454x23(_0x1454x10['eq'](_0x1454xe));
                            _0x1454x1c(_0x1454xe, _0x1454x6, _0x1454xd, _0x1454xc, _0x1454xb, _0x1454x5['speed'], _0x1454x5['easing'], _0x1454x5['easingBg'], _0x1454x5['animDone']);
                        });
                        _0x1454xa['bind']('click', function () {
                            --_0x1454xe;
                            if (_0x1454xe < 0) {
                                if (_0x1454x5['circular']) {
                                    _0x1454xe = _0x1454x8 - 1;
                                } else {
                                    ++_0x1454xe;
                                    return false;
                                };
                            };
                            _0x1454x23(_0x1454x10['eq'](_0x1454xe));
                            _0x1454x1c(_0x1454xe, _0x1454x6, _0x1454xd, _0x1454xc, _0x1454xb, _0x1454x5['speed'], _0x1454x5['easing'], _0x1454x5['easingBg'], _0x1454x5['animDone']);
                        });
                        _0x1454x10['bind']('click', function () {
                            var _0x1454x1a = _0x1454x1(this);
                            _0x1454x23(_0x1454x1a);
                            if (_0x1454x5['auto']) {
                                clearInterval(_0x1454x11);
                            };
                            _0x1454xe = _0x1454x1a['index']();
                            _0x1454x1c(_0x1454xe, _0x1454x6, _0x1454xd, _0x1454xc, _0x1454xb, _0x1454x5['speed'], _0x1454x5['easing'], _0x1454x5['easingBg'], _0x1454x5['animDone']);
                        });
                        if (_0x1454x5['auto'] != 0) {
                            _0x1454x5['circular'] = true;
                            _0x1454x11 = setInterval(function () {
                                _0x1454x9['trigger']('click');
                            }, _0x1454x5['auto']);
                        };
                        _0x1454x1(window)['resize'](function () {
                            _0x1454x1b = _0x1454x1(window)['width']();
                            _0x1454x25(_0x1454x6, _0x1454x7, _0x1454x8, _0x1454xb, _0x1454xc, _0x1454xd, _0x1454x17, _0x1454x9, _0x1454xa);
                            _0x1454x1c(_0x1454xe, _0x1454x6, _0x1454xd, _0x1454xc, _0x1454xb, 1, _0x1454x5['easing'], _0x1454x5['easingBg']);
                        });
                    };
                })['error'](function () {
                    alert('here');
                })['attr']('src', _0x1454x16['attr']('src'));
            });
        });
    };
    var _0x1454x1b = _0x1454x1(window)['width']();
    var _0x1454x1c = function (_0x1454xe, _0x1454x6, _0x1454xd, _0x1454xc, _0x1454xb, _0x1454x1d, _0x1454x1e, _0x1454x1f, _0x1454x20) {
            var _0x1454x21 = parseInt(-_0x1454x1b * _0x1454xe);
            _0x1454x6['stop']()['animate']({
                left: _0x1454x21 + 'px'
            }, _0x1454x1d, _0x1454x1e, function () {
                var _0x1454x22 = _0x1454x6['children']()['eq'](_0x1454xe);
                if (_0x1454x20) {
                    _0x1454x20['apply'](this, [_0x1454x22]);
                };
            });
            _0x1454xd['stop']()['animate']({
                left: _0x1454x21 / 2 + 'px'
            }, _0x1454x1d, _0x1454x1f);
            _0x1454xc['stop']()['animate']({
                left: _0x1454x21 / 4 + 'px'
            }, _0x1454x1d, _0x1454x1f);
            _0x1454xb['stop']()['animate']({
                left: _0x1454x21 / 8 + 'px'
            }, _0x1454x1d, _0x1454x1f);
        };
    var _0x1454x23 = function (_0x1454x24) {
            _0x1454x24['siblings']()['removeClass']('selected');
            _0x1454x24['addClass']('selected');
        };
    var _0x1454x25 = function (_0x1454x6, _0x1454x7, _0x1454x8, _0x1454xb, _0x1454xc, _0x1454xd, _0x1454x17, _0x1454x9, _0x1454xa) {
            var _0x1454x26 = _0x1454x1b * _0x1454x8;
            _0x1454x6['width'](_0x1454x26 + 'px');
            _0x1454x7['width'](_0x1454x1b + 'px');
            _0x1454xb['width'](_0x1454x26 + 'px');
            _0x1454xc['width'](_0x1454x26 + 'px');
            _0x1454xd['width'](_0x1454x26 + 'px');
        };
    _0x1454x1['fn']['parallaxSlider']['defaults'] = {
        auto            : 5200,
        speed           : 1600,
        easing          : 'jswing',
        easingBg        : 'jswing',
        circular        : true,
        thumbRotation   : true,
        animDone: null
    };
})(jQuery);
