/*! * Furatto v3.0.2 (http://icalialabs.github.io/furatto/) * Copyright 2014-2014 Icalia Labs * Licensed under MIT (https://github.com/IcaliaLabs/furatto/blob/master/LICENSE) */ /*! * Furatto v3.0.2 (http://icalialabs.github.io/furatto/) * Copyright 2014-2014 Icalia Labs * Licensed under MIT (https://github.com/IcaliaLabs/furatto/blob/master/LICENSE) */ window.Furatto = { name: 'Furatto', version: '1.0.0' }; $('.alert .close').each(function() { return $(this).click(function(e) { e.preventDefault(); return $(this).parent().fadeOut(); }); }); var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; (function($, window) { Furatto.Modal = (function() { function Modal(el, options) { this.hideOnDocumentClick = __bind(this.hideOnDocumentClick, this); this.hideOnEsc = __bind(this.hideOnEsc, this); this.show = __bind(this.show, this); this.init = __bind(this.init, this); this.options = $.extend({}, options); this.$el = $(el); this.modal = $(this.$el.data('target')); this.close = this.modal.find('.modal-close'); this.transition = this.$el.data('transition') || "1"; this.theme = this.$el.data('theme') || "default"; this.modal.addClass("modal-effect-" + this.transition); this.modal.addClass("" + this.theme); } Modal.prototype.init = function() { var _this = this; this.$el.click(this.show); return this.close.click(function(ev) { ev.stopPropagation(); return _this.hide(); }); }; Modal.prototype.show = function(ev) { if (this.$el.is('div')) { this.$el.addClass('modal-show'); } else { this.modal.addClass('modal-show'); } $('.modal-overlay').addClass('modal-show-overlay'); $('body').bind('keyup', this.hideOnEsc); return $('body').bind('click', this.hideOnDocumentClick); }; Modal.prototype.hideOnEsc = function(event) { if (event.keyCode === 27) { return this.hide(); } }; Modal.prototype.hideOnDocumentClick = function(event) { if ($(event.target).is('.modal-overlay')) { return this.hide(); } }; Modal.prototype.hide = function() { $('.modal-overlay').removeClass('modal-show-overlay'); if (this.$el.is('div')) { this.$el.removeClass('modal-show'); } else { this.modal.removeClass('modal-show'); } $('body').unbind('keyup', this.hideOnEsc); return $('body').unbind('click', this.hideOnDocumentClick); }; return Modal; })(); $.fn.modal = function(option) { return this.each(function() { var $this, data, options; $this = $(this); data = $this.data('modal'); options = $.extend({}, $this.data(), typeof option === 'object' && option); if (!data) { $this.data('modal', (data = new Furatto.Modal(this, options))); } if (typeof option === 'string') { return data[option](); } }); }; Furatto.Modal.version = "1.0.0"; $(document).ready(function() { var elementToAppend; if ($('.off-screen').length > 0) { elementToAppend = $('.off-screen'); } else { elementToAppend = $('body'); } elementToAppend.append('
'); return $('[data-furatto="modal"]').each(function() { var modal; modal = $(this); return modal.modal('init'); }); }); return $(document).on('click', '[data-furatto="modal"]', function(e) { var $this; $this = $(this); return $this.modal('init'); }); })(window.jQuery, window); var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = [].slice; (function($, window, document) { "use strict"; var pluginName; pluginName = 'responsiveNavBar'; Furatto.ResponsiveNavBar = (function() { function ResponsiveNavBar(el, a, options) { this.el = el; this.closeNavbar = __bind(this.closeNavbar, this); this.openNavbar = __bind(this.openNavbar, this); this.toggleNavbar = __bind(this.toggleNavbar, this); this._initEvents = __bind(this._initEvents, this); this.navbarElements = $('.navigation-bar ul:not(.brand-section)'); this.$el = $(this.el); this._initEvents(); } ResponsiveNavBar.prototype._initEvents = function() { var _this = this; return $('.navigation-bar .menu-toggle').on('touchstart click', function(e) { e.preventDefault(); return _this.toggleNavbar(); }); }; ResponsiveNavBar.prototype.toggleNavbar = function() { return this.$el.toggleClass('opened'); }; ResponsiveNavBar.prototype.openNavbar = function() { return this.$el.addClass('opened'); }; ResponsiveNavBar.prototype.closeNavbar = function() { return this.$el.removeClass('opened'); }; return ResponsiveNavBar; })(); $.fn[pluginName] = function(a, options) { var args, _; _ = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return this.each(function() { var plugin; plugin = $.data(this, "plugin_" + pluginName); if (!plugin) { return $.data(this, "plugin_" + pluginName, new Furatto.ResponsiveNavBar(this, a, options)); } else if ((plugin[_] != null) && $.type(plugin[_]) === 'function') { return plugin[_].apply(plugin, args); } }); }; $('.navigation-bar').responsiveNavBar(); return Furatto.ResponsiveNavBar.version = "1.0.0"; })(jQuery, window, document); var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = [].slice; (function($, window, document) { "use strict"; var closest, defaults, getLevelDepth, hasParent, isFromMobile, pluginName; pluginName = 'offScreen'; defaults = { type: 'overlap', levelSpacing: 40, backClass: 'navigation-back' }; getLevelDepth = function(level, id, waypoint, cnt) { if (cnt == null) { cnt = 0; } if (level.id.indexOf(id) >= 0) { return cnt; } if ($(level).hasClass(waypoint)) { ++cnt; } return level.parentNode && getLevelDepth(level.parentNode, id, waypoint, cnt); }; hasParent = function(e, id) { var el; if (!e) { return false; } el = e.target || e.srcElement || e || false; while (el && el.id !== id) { el = el.parentNode || false; } return el !== false; }; closest = function(e, classname) { if ($(e).hasClass(classname)) { return e; } return e.parentNode && closest(e.parentNode, classname); }; isFromMobile = function() { var check; check = false; (function(a) { if (/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) { return check = true; } })(navigator.userAgent || navigator.vendor || window.opera); return check; }; Furatto.OffScreen = (function() { function OffScreen(el, a, options) { this.el = el; this.openMenu = __bind(this.openMenu, this); this._closeMenu = __bind(this._closeMenu, this); this.resetMenu = __bind(this.resetMenu, this); this._setupLevelBack = __bind(this._setupLevelBack, this); this._setupLevelsClosing = __bind(this._setupLevelsClosing, this); this._hideOnDocumentClick = __bind(this._hideOnDocumentClick, this); this._hideOnEsc = __bind(this._hideOnEsc, this); this._setupMenuItems = __bind(this._setupMenuItems, this); this._bindEvents = __bind(this._bindEvents, this); this._shouldPreventOffScreenMenuFromOpening = __bind(this._shouldPreventOffScreenMenuFromOpening, this); this.options = $.extend({}, defaults, options); this.open = false; this.level = 0; this.wrapper = document.getElementById('off-screen'); this.levels = Array.prototype.slice.call(this.el.querySelectorAll('div.off-screen-level')); this._setLevels(); this.menuItems = Array.prototype.slice.call(this.el.querySelectorAll('li')); this.levelBack = Array.prototype.slice.call(this.el.querySelectorAll('.navigation-back')); this.eventType = isFromMobile() ? 'touchstart' : 'click'; $(this.el).addClass("off-screen-" + this.options.type); this.trigger = document.getElementById('trigger'); if ($(window).width() <= 768) { this._bindEvents(); } this._shouldPreventOffScreenMenuFromOpening(); } OffScreen.prototype._setLevels = function() { var level, _i, _len, _ref, _results; _ref = this.levels; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { level = _ref[_i]; _results.push(level.setAttribute('data-level', getLevelDepth(level, this.el.id, 'off-screen-level'))); } return _results; }; OffScreen.prototype._shouldPreventOffScreenMenuFromOpening = function() { var _this = this; return $(window).resize(function() { _this.resetMenu(); if ($(window).width() >= 768) { return _this.trigger.removeEventListener(_this.eventType); } else { return _this.trigger.addEventListener(_this.eventType, function(event) { event.stopPropagation(); event.preventDefault(); if (_this.open) { return _this.resetMenu(); } else { _this.openMenu(); return document.addEventListener(_this.eventType, function(event) { if (_this.open && !hasParent(event.target, _this.el.id)) { return bodyClickBinding(_this); } }); } }); } }); }; OffScreen.prototype._bindEvents = function() { var bodyClickBinding, _this = this; bodyClickBinding = function(el) { _this.resetMenu(); return el.removeEventListener(_this.eventType, bodyClickBinding); }; this.trigger.addEventListener(this.eventType, function(event) { event.stopPropagation(); event.preventDefault(); if (_this.open) { return _this.resetMenu(); } else { _this.openMenu(); return document.addEventListener(_this.eventType, function(event) { if (_this.open && !hasParent(event.target, _this.el.id)) { return bodyClickBinding(document); } }); } }); this._setupMenuItems(); this._setupLevelsClosing(); return this._setupLevelBack(); }; OffScreen.prototype._setupMenuItems = function() { var _this = this; return this.menuItems.forEach(function(el, i) { var subLevel; subLevel = el.querySelector('div.off-screen-level'); if (subLevel) { return el.querySelector('a').addEventListener('click', function(event) { var level; event.preventDefault(); level = closest(el, 'off-screen-level').getAttribute('data-level'); if (_this.level <= level) { event.stopPropagation(); $(closest(el, 'off-screen-level')).addClass('off-screen-level-overlay'); return _this.openMenu(subLevel); } }); } }); }; OffScreen.prototype._hideOnEsc = function(event) { if (event.keyCode === 27) { return this.resetMenu(); } }; OffScreen.prototype._hideOnDocumentClick = function(event) { return this.resetMenu(); }; OffScreen.prototype._setupLevelsClosing = function() { var levelEl, _i, _len, _ref, _results; _ref = this.levels; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { levelEl = _ref[_i]; _results.push(levelEl.addEventListener(this.eventType, function(event) { var level; event.stopPropagation(); level = levelEl.getAttribute('data-level'); if (this.level > level) { this.level = level; return this._closeMenu(); } })); } return _results; }; OffScreen.prototype._setupLevelBack = function() { var _this = this; return this.levelBack.forEach(function(el, i) { return el.addEventListener(_this.eventType, function(event) { var level; event.preventDefault(); level = closest(el, 'off-screen-level').getAttribute('data-level'); if (_this.level <= level) { event.stopPropagation(); _this.level = closest(el, 'off-screen-level').getAttribute('data-level') - 1; if (_this.level === 0) { return _this.resetMenu(); } else { return _this._closeMenu(); } } }); }); }; OffScreen.prototype.resetMenu = function() { this._setTransform('translate3d(0,0,0)'); this.level = 0; $(this.wrapper).removeClass('off-screen-pushed'); this._toggleLevels(); this.open = false; return $(document).unbind('keyup', this._hideOnEsc); }; OffScreen.prototype._closeMenu = function() { var translateVal; translateVal = this.options.type === 'overlap' ? this.el.offsetWidth + (this.level - 1) * this.options.levelSpacing : this.el.offsetWidth; this._setTransform("translate3d(" + translateVal + "px, 0, 0"); return this._toggleLevels(); }; OffScreen.prototype.openMenu = function(subLevel) { var level, levelFactor, translateVal, _i, _len, _ref; ++this.level; levelFactor = (this.level - 1) * this.options.levelSpacing; translateVal = this.options.type === 'overlap' ? this.el.offsetWidth + levelFactor : this.el.offsetWidth; this._setTransform('translate3d(' + translateVal + 'px,0,0)'); if (subLevel) { this._setTransform('', subLevel); _ref = this.levels; for (_i = 0, _len = _ref.length; _i < _len; _i++) { level = _ref[_i]; if (level !== subLevel && !$(level).hasClass('off-screen-level-open')) { this._setTransform("translate3d(-100%, 0, 0) translate3d(" + (-1 * levelFactor) + "px, 0, 0)", $(level)); } } } if (this.level === 1) { $(this.wrapper).addClass('off-screen-pushed'); this.open = true; } if (subLevel) { $(subLevel).addClass('off-screen-level-open'); } else { $(this.levels[0]).addClass('off-screen-level-open'); } $(document).bind('keyup', this._hideOnEsc); return $(document).on('touchstart', this._hideOnDocumentClick); }; OffScreen.prototype._toggleLevels = function() { var level, _i, _len, _ref, _results; _ref = this.levels; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { level = _ref[_i]; if (level.getAttribute('data-level') >= this.level + 1) { $(level).removeClass('off-screen-level-open'); _results.push($(level).removeClass('off-screen-level-overlay')); } else if (Number(level.getAttribute('data-level') === this.level)) { _results.push($(level).removeClass('off-screen-level-overlay')); } else { _results.push(void 0); } } return _results; }; OffScreen.prototype._setTransform = function(value, element) { if (element == null) { element = this.wrapper; } return $(element).css({ '-webkit-transform': value, '-moz-transform': value, '-o-transform': value, 'transform': value }); }; return OffScreen; })(); $.fn[pluginName] = function(a, options) { var args, _; _ = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return this.each(function() { var plugin; plugin = $.data(this, "plugin_" + pluginName); if (!plugin) { return $.data(this, "plugin_" + pluginName, new Furatto.OffScreen(this, a, options)); } else if ((plugin[_] != null) && $.type(plugin[_]) === 'function') { return plugin[_].apply(plugin, args); } }); }; $('.off-screen-navigation').offScreen(); $(document).click(function() { return $('.off-screen-navigation').offScreen('resetMenu'); }); return Furatto.OffScreen.version = "1.0.0"; })(jQuery, window, document); var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = [].slice; (function($, window, document) { "use strict"; var defaults, pluginName; pluginName = "responsiveTables"; defaults = { widthToCollapse: 768 }; Furatto.ResponsiveTables = (function() { function ResponsiveTables(el, a, options) { this.el = el; this._setCellHeights = __bind(this._setCellHeights, this); this._unsplitTable = __bind(this._unsplitTable, this); this._splitTable = __bind(this._splitTable, this); this._updateTables = __bind(this._updateTables, this); this._initResponsiveTables = __bind(this._initResponsiveTables, this); this.options = $.extend({}, defaults, options); this.$el = $(this.el); this.switched = false; this._initResponsiveTables(); } ResponsiveTables.prototype._initResponsiveTables = function() { var _this = this; $(window).on('load', this._updateTables); $(window).on('redraw', function() { _this.switched = false; return _this._updateTables(); }); return $(window).on('resize', this._updateTables); }; ResponsiveTables.prototype._updateTables = function() { var _this = this; console.log(this.options.widthToCollapse); if ($(window).width() <= this.options.widthToCollapse && !this.switched) { this.switched = true; this.$el.each(function(i, element) { return _this._splitTable($(element)); }); return true; } else if (this.switched && $(window).width() > this.options.widthToCollapse) { this.switched = false; return this.$el.each(function(i, element) { return _this._unsplitTable($(element)); }); } }; ResponsiveTables.prototype._splitTable = function(table) { var tableClone; table.wrap(""); tableClone = table.clone(); tableClone.find("td:not(:first-child), th:not(:first-child)").css("display", "none"); tableClone.removeClass("responsive"); table.closest(".table-wrapper").append(tableClone); tableClone.wrap(""); table.wrap(""); return this._setCellHeights(table, tableClone); }; ResponsiveTables.prototype._unsplitTable = function(table) { table.closest(".table-wrapper").find(".pinned").remove(); table.unwrap(); return table.unwrap(); }; ResponsiveTables.prototype._setCellHeights = function(table, tableClone) { var heights, tableRows, tableRowsCopy; tableRows = table.find('tr'); tableRowsCopy = tableClone.find('tr'); heights = []; tableRows.each(function(index) { var self, tableHeadersAndData; self = $(this); tableHeadersAndData = self.find('th, td'); return tableHeadersAndData.each(function() { var height; height = $(this).outerHeight(true); heights[index] = heights[index] || 0; if (height > heights[index]) { return heights[index] = height; } }); }); return tableRowsCopy.each(function(index) { return $(this).height(heights[index]); }); }; return ResponsiveTables; })(); $.fn[pluginName] = function(a, options) { var args, _; _ = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return this.each(function() { var plugin; plugin = $.data(this, "plugin_" + pluginName); if (!plugin) { return $.data(this, "plugin_" + pluginName, new Furatto.ResponsiveTables(this, a, options)); } else if ((plugin[_] != null) && $.type(plugin[_]) === 'function') { return plugin[_].apply(plugin, args); } }); }; Furatto.ResponsiveTables.version = "1.0.0"; return $(document).ready(function() { return $('table.responsive').responsiveTables(); }); })($, window, document); var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = [].slice; (function($, window, document) { "use strict"; var defaults, pluginName; pluginName = 'suraido'; defaults = { speed: 500, delay: 3000, pause: false, loop: false, enableKeys: true, enableDots: true, enableArrows: true, prev: '«', next: '»', fluid: true, starting: false, completed: false, easing: 'swing', autoplay: false, paginationClass: 'pagination', paginationItemClass: 'dot', arrowsClass: 'arrows', arrowClass: 'arrow' }; Furatto.Suraido = (function() { function Suraido(el, options) { var weakSelf, _this = this; this.el = el; this.prev = __bind(this.prev, this); this.next = __bind(this.next, this); this.stop = __bind(this.stop, this); this.play = __bind(this.play, this); this.to = __bind(this.to, this); this._createArrows = __bind(this._createArrows, this); this._createPagination = __bind(this._createPagination, this); this._enableBindKeys = __bind(this._enableBindKeys, this); this._enablesFluidBehavior = __bind(this._enablesFluidBehavior, this); this._enablesAutoPlay = __bind(this._enablesAutoPlay, this); this._setsMainElement = __bind(this._setsMainElement, this); this._setsItems = __bind(this._setsItems, this); this.$el = $(this.el); this.options = $.extend({}, defaults, options); this.itemsWrapper = this.$el.find('>ul'); this.maxSize = { width: this.$el.outerWidth() | 0, height: this.$el.outerHeight() | 0 }; weakSelf = this; this.items = $(this.itemsWrapper).find('>li').each(function(index) { var $this, height, width; $this = $(this); width = $this.outerWidth(); height = $this.outerHeight(); if (width > weakSelf.maxSize.width) { weakSelf.maxSize.width = width; } if (height > weakSelf.maxSize.height) { return weakSelf.maxSize.height = height; } }); this.itemsLength = this.items.length; this.currentItemIndex = 0; this.items.find('.caption').css({ width: "" + (100 / this.itemsLength) + "%" }); this._setsMainElement(); this.itemsWrapper.css({ position: "relative", left: 0, width: "" + (this.itemsLength * 100) + "%" }); this._setsItems(); if (this.options.autoplay) { this._enablesAutoPlay(); } if (this.options.enableKeys) { this._enableBindKeys(); } this.options.enableDots && this._createPagination(); this.options.enableArrows && this._createArrows(); if (this.options.fluid) { this._enablesFluidBehavior(); } if (window.chrome) { this.items.css('background-size', '100% 100%'); } if ($.event.special['swipe'] || $.Event('swipe')) { this.$el.on('swipeleft swiperight swipeLeft swipeRight', function(e) { if (e.type.toLowerCase() === 'swipeleft') { return _this.next(); } else { return _this.prev(); } }); } } Suraido.prototype._setsItems = function() { return this.items.css({ float: 'left', width: "" + (100 / this.itemsLength) + "%" }); }; Suraido.prototype._setsMainElement = function() { return this.$el.css({ width: this.maxSize.width, height: this.items.first().outerHeight(), overflow: 'hidden' }); }; Suraido.prototype._enablesAutoPlay = function() { var _this = this; return setTimeout(function() { if (_this.options.delay | 0) { _this.play(); if (_this.options.pause) { return _this.$el.on('mouseover, mouseout', function(event) { _this.stop(); return event.type === 'mouseout' && _this.play(); }); } } }, this.options.autoPlayDelay | 0); }; Suraido.prototype._enablesFluidBehavior = function() { var _this = this; return $(window).resize(function() { _this.resize && clearTimeout(_this.resize); return _this.resize = setTimeout(function() { var style, width; style = { height: _this.items.eq(_this.currentItemIndex).outerHeight() + 30 }; width = _this.$el.outerWidth(); _this.itemsWrapper.css(style); style['width'] = "" + (Math.min(Math.round((width / _this.$el.parent().width()) * 100), 100)) + "%"; return _this.$el.css(style, 50); }); }).resize(); }; Suraido.prototype._enableBindKeys = function() { var _this = this; return $(document).on('keydown', function(event) { switch (event.which) { case 37: return _this.prev(); case 39: return _this.next(); case 27 || 32: return _this.stop(); } }); }; Suraido.prototype._createPagination = function() { var html, _this = this; html = " "; return this._bindPagination(this.options.paginationClass, this.options.paginationItemClass, html); }; Suraido.prototype._createArrows = function() { var html; html = "