{"version":3,"file":"jquery.sudoSlider.min.js","sources":["https:\/\/conalepvirtual.conalep.edu.mx\/theme\/academi\/amd\/src\/jquery.sudoSlider.js"],"sourcesContent":["\/**@preserve\n * Sudo Slider version 3.4.10 - jQuery plugin\n * Written by Erik Krogh Kristensen erik@webbies.dk.\n * http:\/\/webbies.dk\/SudoSlider\/\n *\n * Dual licensed under the MIT and GPL licenses.\n *\n * Based on EasySlider http:\/\/cssglobe.com\/easy-slider-17-numeric-navigation-jquery-slider\/\n * But bear little resemblance at this point.\n *\n * Built for jQuery library\n * http:\/\/jquery.com\n *\n *\/\n(function(factory) {\n \/\/ window\/root object.\n var root = (typeof self == 'object' && self.self == self && self) ||\n (typeof global == 'object' && global.global == global && global);\n\n \/\/ AMD.\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], function($) {\n factory($, root);\n });\n\n \/\/ CommonJS.\n } else if (typeof exports !== 'undefined') {\n var $ = require('jquery');\n factory($, root);\n\n \/\/ Finally, as a browser global.\n } else {\n factory(root.jQuery, root);\n }\n\n})(function ($, win) {\n \/\/ Saves space in the minified version.\n var undefined; \/\/ Makes sure that undefined really is undefined within this scope.\n var FALSE = false;\n var TRUE = true;\n\n \/\/ Constants.\n var PAGES_MARKER_STRING = \"pages\";\n var NEXT_STRING = \"next\";\n var PREV_STRING = \"prev\";\n var LAST_STRING = \"last\";\n var FIRST_STRING = \"first\";\n var ABSOLUTE_STRING = \"absolute\";\n var RELATIVE_STRING = \"relative\";\n var HIDDEN_STRING = \"hidden\";\n var SWING = \"swing\";\n var EMPTY_FUNCTION = function () { };\n var ANIMATION_CLONE_MARKER_CLASS = \"sudo-box\";\n var DIV_TAG = \"
\";\n var CSSVendorPrefix = getCSSVendorPrefix();\n var jWin = $(win);\n var doc = $(document);\n\n var TOUCHSTART = \"touchstart\";\n var TOUCHMOVE = \"touchmove\";\n var TOUCHCANCEL = \"touchcancel\";\n var TOUCHEND = \"touchend\";\n var MOUSEDOWN = \"mousedown\";\n var MOUSEMOVE = \"mousemove\";\n var MOUSEUP = \"mouseup\";\n var SLIDES_CONTAINER = \"slidesContainer\";\n var SUDO_DRAGGING_CLASS = \"sudoSlider-dragging\";\n\n $.fn.sudoSlider = function (optionsOrg) {\n \/\/ Defining the base element.\n var baseSlider = this;\n\n optionsOrg = $.extend(objectToLowercase(getDefaultOptions()), objectToLowercase(optionsOrg));\n if (CSSVendorPrefix === FALSE || !minJQueryVersion([1, 8, 0])) {\n optionsOrg.usecss = FALSE;\n }\n\n return this.each(function () {\n var init,\n fullyInitialized = FALSE,\n isSlideContainerUl,\n slidesContainer,\n slides,\n imagesInSlidesLoaded,\n totalSlides,\n currentSlide,\n previousSlide,\n clickable,\n currentlyAnimatingTowards,\n numericControls,\n numericContainer,\n destroyed,\n slideNumberBeforeDestroy = FALSE,\n controls,\n nextbutton,\n prevbutton,\n autoTimeout,\n autoOn,\n numberOfVisibleSlides,\n asyncDelayedSlideLoadTimeout,\n obj = $(this),\n finishedAdjustingTo = FALSE, \/\/ This variable tells if the slider is currently adjusted (height and width) to any specific slide. This is usefull when ajax-loading stuff.\n adjustingTo, \/\/ This one tells what slide we are adjusting to, to make sure that we do not adjust to something we shouldn't.\n adjustTargetTime = 0, \/\/ This one holds the time that the autoadjust animation should complete.\n currentlyAnimating = FALSE,\n currentAnimation,\n currentAnimationCallback,\n currentAnimationObject,\n runAfterAnimationCallbacks,\n awaitingAjaxCallbacks,\n startedAjaxLoads,\n finishedAjaxLoads,\n animateToAfterCompletion = FALSE,\n animateToAfterCompletionClicked,\n animateToAfterCompletionSpeed,\n slideContainerCreated = FALSE,\n option = [],\n options = $.extend(TRUE, {}, optionsOrg),\n currentSliderPositionTop,\n currentSliderPositionLeft,\n unBindCallbacks = [],\n autoStartedWithPause = FALSE,\n animationWasInterrupted = FALSE;\n\n \/\/ The call to the init function is after the definition of all the functions.\n function initSudoSlider() {\n \/\/ Storing the public options in an array.\n var optionIndex = 0;\n for (var key in options) {\n option[optionIndex] = options[key];\n optionIndex++;\n }\n\n init = TRUE;\n fullyInitialized = FALSE;\n\n imagesInSlidesLoaded = [];\n runAfterAnimationCallbacks = [];\n awaitingAjaxCallbacks = [];\n startedAjaxLoads = [];\n finishedAjaxLoads = [];\n\n \/\/ Fix for nested list items\n slidesContainer = childrenNotAnimationClones(obj);\n\n \/\/ Is the ul element there?\n var ulLength = slidesContainer.length;\n var newUl = $(DIV_TAG);\n if (!ulLength) {\n obj.append(slidesContainer = newUl);\n isSlideContainerUl = FALSE;\n } else if (!((isSlideContainerUl = slidesContainer.is(\"ul\")) || slidesContainer.hasClass(SLIDES_CONTAINER)) && !slideContainerCreated) {\n newUl.append(slidesContainer);\n obj.append(slidesContainer = newUl);\n }\n slideContainerCreated = TRUE;\n\n var slidesJquery = childrenNotAnimationClones(slidesContainer);\n\n slides = [];\n\n totalSlides = slidesJquery.length;\n\n slidesJquery.each(function autofunction(index, elem) {\n var that = $(elem);\n slides[index] = that;\n that.css({position: RELATIVE_STRING});\n if (that.css(\"display\") == \"none\") {\n that.css(\"display\", \"inline\");\n }\n });\n\n \/\/ Adding CSS classes.\n slidesContainer.addClass(SLIDES_CONTAINER);\n\n slidesJquery.addClass(\"slide\");\n\n slidesJquery.each(function (index, elem) {\n $(elem).attr(\"data-slide\", index + 1);\n });\n\n \/\/ Now we are going to fix the document, if it's 'broken'. (No
  • ).\n \/\/ I assume that it's can only be broken, if ajax is enabled. If it's broken without Ajax being enabled, the script doesn't have anything to fill the holes.\n if (option[30]\/*ajax*\/) {\n \/\/ Do we have enough list elements to fill out all the ajax documents.\n var numerOfAjaxUrls = option[30]\/*ajax*\/.length;\n if (numerOfAjaxUrls > totalSlides) {\n for (var a = 1; a <= numerOfAjaxUrls - totalSlides; a++) {\n var tag;\n if (isSlideContainerUl) {\n tag = \"li\";\n } else {\n tag = \"div\";\n }\n var slide = $(\"<\" + tag + \">\" + option[32]\/*loadingtext*\/ + \"<\/\" + tag + \">\");\n slidesContainer.append(slide);\n slides[totalSlides + (a - 1)] = slide;\n }\n slidesJquery = childrenNotAnimationClones(slidesContainer);\n totalSlides = numerOfAjaxUrls;\n }\n }\n\n slidesJquery.each(function (index, elem) {\n imagesInSlidesLoaded[index] = FALSE;\n runOnImagesLoaded($(elem), TRUE, function () {\n imagesInSlidesLoaded[index] = TRUE;\n });\n });\n\n if (slideNumberBeforeDestroy === FALSE) {\n currentSlide = 0;\n } else {\n currentSlide = slideNumberBeforeDestroy;\n }\n currentSlide = currentSlide || 0;\n\n previousSlide = currentSlide;\n\n clickable = TRUE;\n numericControls = [];\n destroyed = FALSE;\n\n \/\/ Set obj overflow to hidden (and position to relative , if fade is enabled. <\/strike>).\n obj.css({overflow: HIDDEN_STRING});\n if (obj.css(\"position\") == \"static\") obj.css({position: RELATIVE_STRING}); \/\/ Fixed a lot of IE6 + IE7 bugs.\n\n \/\/ Float items to the left, and make sure that all elements are shown.\n slidesJquery.css({\"float\": \"left\", listStyle: \"none\"});\n \/\/ The last CSS to make it work.\n slidesContainer.add(slidesJquery).css({display: \"block\", position: RELATIVE_STRING, margin: \"0\"});\n\n adjustPositionToPosition(0, 0, TRUE);\n\n option[7]\/*slidecount*\/ = parseInt10(option[7]\/*slidecount*\/);\n\n \/\/ Lets just redefine slidecount\n numberOfVisibleSlides = option[7]\/*slidecount*\/;\n\n option[7]\/*slidecount*\/ += option[8]\/*movecount*\/ - 1;\n\n \/\/ Startslide can only be a number (and not 0). Converting from 1 index to 0 index.\n \/\/ Unless it is the string \"random\".\n if (typeof option[9]\/*startslide*\/ == \"string\" && option[9]\/*startslide*\/.toLowerCase() == \"random\") {\n option[9]\/*startslide*\/ = (Math.random() * totalSlides) | 0;\n }\n option[9]\/*startslide*\/ = parseInt10(option[9]\/*startslide*\/) - 1 || 0;\n\n option[0]\/*effect*\/ = getEffectMethod(option[0]\/*effect*\/);\n\n \/\/ Cloning numericText, so the array same array can be modifed outside SudoSlider without doing weird things.\n option[18]\/*numerictext*\/ = option[18]\/*numerictext*\/.slice(0);\n\n for (var a = 0; a < totalSlides; a++) {\n if (!option[18]\/*numerictext*\/[a] && option[18]\/*numerictext*\/[a] != \"\") {\n option[18]\/*numerictext*\/[a] = (a + 1);\n }\n if (option[30]\/*ajax*\/) {\n option[30]\/*ajax*\/[a] = option[30]\/*ajax*\/[a] || FALSE;\n }\n }\n\n option[4]\/*controlsfade*\/ = option[4]\/*controlsfade*\/ && !option[15];\/*continuous*\/\n\n if (option[10]\/*responsive*\/) {\n adjustResponsiveLayout(TRUE);\n }\n\n \/\/ Making sure that i have enough room in the