PageSourceSearch

https://www.emiratesskills.ae/_catalogs/masterpage/ESkills/common/js/home-plugins.js

js emiratesskills.ae collected 2026-10-05 09:51:49 UTC 63,861 bytes, 993 lines download raw bytes

1/* ===========================================================
2 * jquery-onepage-scroll.js v1.3.1
3 * ===========================================================
4 * Copyright 2013 Pete Rojwongsuriya.
5 * http://www.thepetedesign.com
6 *
7 * Create an Apple-like website that let user scroll
8 * one page at a time
9 *
10 * Credit: Eike Send for the awesome swipe event
11 * https://github.com/peachananr/onepage-scroll
12 *
13 * License: GPL v3
14 *
15 * ========================================================== */
16
17!function($){
18
19  var defaults = {
20    sectionContainer: "section",
21    easing: "ease",
22    animationTime: 1000,
23    pagination: true,
24    updateURL: false,
25    keyboard: true,
26    beforeMove: null,
27    afterMove: null,
28    loop: true,
29    responsiveFallback: false,
30    direction : 'vertical'
31	};
32
33	/*------------------------------------------------*/
34	/*  Credit: Eike Send for the awesome swipe event */
35	/*------------------------------------------------*/
36
37	$.fn.swipeEvents = function() {
38      return this.each(function() {
39
40        var startX,
41            startY,
42            $this = $(this);
43
44        $this.bind('touchstart', touchstart);
45
46        function touchstart(event) {
47          var touches = event.originalEvent.touches;
48          if (touches && touches.length) {
49            startX = touches[0].pageX;
50            startY = touches[0].pageY;
51            $this.bind('touchmove', touchmove);
52          }
53        }
54
55        function touchmove(event) {
56          var touches = event.originalEvent.touches;
57          if (touches && touches.length) {
58            var deltaX = startX - touches[0].pageX;
59            var deltaY = startY - touches[0].pageY;
60
61            if (deltaX >= 50) {
62              $this.trigger("swipeLeft");
63            }
64            if (deltaX <= -50) {
65              $this.trigger("swipeRight");
66            }
67            if (deltaY >= 50) {
68              $this.trigger("swipeUp");
69            }
70            if (deltaY <= -50) {
71              $this.trigger("swipeDown");
72            }
73            if (Math.abs(deltaX) >= 50 || Math.abs(deltaY) >= 50) {
74              $this.unbind('touchmove', touchmove);
75            }
76          }
77        }
78
79      });
80    };
81
82
83  $.fn.onepage_scroll = function(options){
84    var settings = $.extend({}, defaults, options),
85        el = $(this),
86        sections = $(settings.sectionContainer)
87        total = sections.length,
88        status = "off",
89        topPos = 0,
90        leftPos = 0,
91        lastAnimation = 0,
92        quietPeriod = 500,
93        paginationList = "";
94
95    $.fn.transformPage = function(settings, pos, index) {
96      if (typeof settings.beforeMove == 'function') settings.beforeMove(index);
97
98      // Just a simple edit that makes use of modernizr to detect an IE8 browser and changes the transform method into
99    	// an top animate so IE8 users can also use this script.
100    	if($('html').hasClass('ie8')){
101        if (settings.direction == 'horizontal') {
102          var toppos = (el.width()/100)*pos;
103          $(this).animate({left: toppos+'px'},settings.animationTime);
104        } else {
105          var toppos = (el.height()/100)*pos;
106          $(this).animate({top: toppos+'px'},settings.animationTime);
107        }
108    	} else{
109    	  $(this).css({
110    	    "-webkit-transform": ( settings.direction == 'horizontal' ) ? "translate3d(" + pos + "%, 0, 0)" : "translate3d(0, " + pos + "%, 0)",
111         "-webkit-transition": "all " + settings.animationTime + "ms " + settings.easing,
112         "-moz-transform": ( settings.direction == 'horizontal' ) ? "translate3d(" + pos + "%, 0, 0)" : "translate3d(0, " + pos + "%, 0)",
113         "-moz-transition": "all " + settings.animationTime + "ms " + settings.easing,
114         "-ms-transform": ( settings.direction == 'horizontal' ) ? "translate3d(" + pos + "%, 0, 0)" : "translate3d(0, " + pos + "%, 0)",
115         "-ms-transition": "all " + settings.animationTime + "ms " + settings.easing,
116         "transform": ( settings.direction == 'horizontal' ) ? "translate3d(" + pos + "%, 0, 0)" : "translate3d(0, " + pos + "%, 0)",
117         "transition": "all " + settings.animationTime + "ms " + settings.easing
118    	  });
119    	}
120      $(this).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
121        if (typeof settings.afterMove == 'function') settings.afterMove(index);
122      });
123    }
124
125    $.fn.moveDown = function() {
126      var el = $(this)
127      index = $(settings.sectionContainer +".active").data("index");
128      current = $(settings.sectionContainer + "[data-index='" + index + "']");
129      next = $(settings.sectionContainer + "[data-index='" + (index + 1) + "']");
130      if(next.length < 1) {
131        if (settings.loop == true) {
132          pos = 0;
133          next = $(settings.sectionContainer + "[data-index='1']");
134        } else {
135          return
136        }
137
138      }else {
139        pos = (index * 100) * -1;
140      }
141      if (typeof settings.beforeMove == 'function') settings.beforeMove( next.data("index"));
142      current.removeClass("active")
143      next.addClass("active");
144      if(settings.pagination == true) {
145        $(".onepage-pagination li a" + "[data-index='" + index + "']").removeClass("active");
146        $(".onepage-pagination li a" + "[data-index='" + next.data("index") + "']").addClass("active");
147      }
148
149      $("body")[0].className = $("body")[0].className.replace(/\bviewing-page-\d.*?\b/g, '');
150      $("body").addClass("viewing-page-"+next.data("index"))
151
152      if (history.replaceState && settings.updateURL == true) {
153        var href = window.location.href.substr(0,window.location.href.indexOf('#')) + "#" + (index + 1);
154        history.pushState( {}, document.title, href );
155      }
156      el.transformPage(settings, pos, next.data("index"));
157    }
158
159    $.fn.moveUp = function() {
160      var el = $(this)
161      index = $(settings.sectionContainer +".active").data("index");
162      current = $(settings.sectionContainer + "[data-index='" + index + "']");
163      next = $(settings.sectionContainer + "[data-index='" + (index - 1) + "']");
164
165      if(next.length < 1) {
166        if (settings.loop == true) {
167          pos = ((total - 1) * 100) * -1;
168          next = $(settings.sectionContainer + "[data-index='"+total+"']");
169        }
170        else {
171          return
172        }
173      }else {
174        pos = ((next.data("index") - 1) * 100) * -1;
175      }
176      if (typeof settings.beforeMove == 'function') settings.beforeMove(next.data("index"));
177      current.removeClass("active")
178      next.addClass("active")
179      if(settings.pagination == true) {
180        $(".onepage-pagination li a" + "[data-index='" + index + "']").removeClass("active");
181        $(".onepage-pagination li a" + "[data-index='" + next.data("index") + "']").addClass("active");
182      }
183      $("body")[0].className = $("body")[0].className.replace(/\bviewing-page-\d.*?\b/g, '');
184      $("body").addClass("viewing-page-"+next.data("index"))
185
186      if (history.replaceState && settings.updateURL == true) {
187        var href = window.location.href.substr(0,window.location.href.indexOf('#')) + "#" + (index - 1);
188        history.pushState( {}, document.title, href );
189      }
190      el.transformPage(settings, pos, next.data("index"));
191    }
192
193    $.fn.moveTo = function(page_index) {
194      current = $(settings.sectionContainer + ".active")
195      next = $(settings.sectionContainer + "[data-index='" + (page_index) + "']");
196      if(next.length > 0) {
197        if (typeof settings.beforeMove == 'function') settings.beforeMove(next.data("index"));
198        current.removeClass("active")
199        next.addClass("active")
200        $(".onepage-pagination li a" + ".active").removeClass("active");
201        $(".onepage-pagination li a" + "[data-index='" + (page_index) + "']").addClass("active");
202        $("body")[0].className = $("body")[0].className.replace(/\bviewing-page-\d.*?\b/g, '');
203        $("body").addClass("viewing-page-"+next.data("index"))
204
205        pos = ((page_index - 1) * 100) * -1;
206
207        if (history.replaceState && settings.updateURL == true) {
208            var href = window.location.href.substr(0,window.location.href.indexOf('#')) + "#" + (page_index - 1);
209            history.pushState( {}, document.title, href );
210        }
211        el.transformPage(settings, pos, page_index);
212      }
213    }
214
215    function responsive() {
216      //start modification
217      var valForTest = false;
218      var typeOfRF = typeof settings.responsiveFallback
219
220      if(typeOfRF == "number"){
221      	valForTest = $(window).width() < settings.responsiveFallback;
222      }
223      if(typeOfRF == "boolean"){
224      	valForTest = settings.responsiveFallback;
225      }
226      if(typeOfRF == "function"){
227      	valFunction = settings.responsiveFallback();
228      	valForTest = valFunction;
229      	typeOFv = typeof valForTest;
230      	if(typeOFv == "number"){
231      		valForTest = $(window).width() < valFunction;
232      	}
233      }
234
235      //end modification
236      if (valForTest) {
237        $("body").addClass("disabled-onepage-scroll");
238        $(document).unbind('mousewheel DOMMouseScroll MozMousePixelScroll');
239        el.swipeEvents().unbind("swipeDown swipeUp");
240      } else {
241        if($("body").hasClass("disabled-onepage-scroll")) {
242          $("body").removeClass("disabled-onepage-scroll");
243          $("html, body, .wrapper").animate({ scrollTop: 0 }, "fast");
244        }
245
246
247        el.swipeEvents().bind("swipeDown",  function(event){
248          if (!$("body").hasClass("disabled-onepage-scroll")) event.preventDefault();
249          el.moveUp();
250        }).bind("swipeUp", function(event){
251          if (!$("body").hasClass("disabled-onepage-scroll")) event.preventDefault();
252          el.moveDown();
253        });
254
255        $(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function(event) {
256          event.preventDefault();
257          var delta = event.originalEvent.wheelDelta || -event.originalEvent.detail;
258          init_scroll(event, delta);
259        });
260      }
261    }
262
263
264    function init_scroll(event, delta) {
265        deltaOfInterest = delta;
266        var timeNow = new Date().getTime();
267        // Cancel scroll if currently animating or within quiet period
268        if(timeNow - lastAnimation < quietPeriod + settings.animationTime) {
269            event.preventDefault();
270            return;
271        }
272
273        if (deltaOfInterest < 0) {
274          el.moveDown()
275        } else {
276          el.moveUp()
277        }
278        lastAnimation = timeNow;
279    }
280
281    // Prepare everything before binding wheel scroll
282
283    el.addClass("onepage-wrapper").css("position","relative");
284    $.each( sections, function(i) {
285      $(this).css({
286        position: "absolute",
287        top: topPos + "%"
288      }).addClass("section").attr("data-index", i+1);
289
290
291      $(this).css({
292        position: "absolute",
293        left: ( settings.direction == 'horizontal' )
294          ? leftPos + "%"
295          : 0,
296        top: ( settings.direction == 'vertical' || settings.direction != 'horizontal' )
297          ? topPos + "%"
298          : 0
299      });
300
301      if (settings.direction == 'horizontal')
302        leftPos = leftPos + 100;
303      else
304        topPos = topPos + 100;
305
306
307      if(settings.pagination == true) {
308        paginationList += "<li><a data-index='"+(i+1)+"' href='#" + (i+1) + "'></a></li>"
309      }
310    });
311
312    el.swipeEvents().bind("swipeDown",  function(event){
313      if (!$("body").hasClass("disabled-onepage-scroll")) event.preventDefault();
314      el.moveUp();
315    }).bind("swipeUp", function(event){
316      if (!$("body").hasClass("disabled-onepage-scroll")) event.preventDefault();
317      el.moveDown();
318    });
319
320    // Create Pagination and Display Them
321    if (settings.pagination == true) {
322      if ($('ul.onepage-pagination').length < 1) $("<ul class='onepage-pagination'></ul>").prependTo("body");
323
324      if( settings.direction == 'horizontal' ) {
325        posLeft = (el.find(".onepage-pagination").width() / 2) * -1;
326        el.find(".onepage-pagination").css("margin-left", posLeft);
327      } else {
328        posTop = (el.find(".onepage-pagination").height() / 2) * -1;
329        el.find(".onepage-pagination").css("margin-top", posTop);
330      }
331      $('ul.onepage-pagination').html(paginationList);
332    }
333
334    if(window.location.hash != "" && window.location.hash != "#1") {
335      init_index =  window.location.hash.replace("#", "")
336
337      if (parseInt(init_index) <= total && parseInt(init_index) > 0) {
338        $(settings.sectionContainer + "[data-index='" + init_index + "']").addClass("active")
339        $("body").addClass("viewing-page-"+ init_index)
340        if(settings.pagination == true) $(".onepage-pagination li a" + "[data-index='" + init_index + "']").addClass("active");
341
342        next = $(settings.sectionContainer + "[data-index='" + (init_index) + "']");
343        if(next) {
344          next.addClass("active")
345          if(settings.pagination == true) $(".onepage-pagination li a" + "[data-index='" + (init_index) + "']").addClass("active");
346          $("body")[0].className = $("body")[0].className.replace(/\bviewing-page-\d.*?\b/g, '');
347          $("body").addClass("viewing-page-"+next.data("index"))
348          if (history.replaceState && settings.updateURL == true) {
349            var href = window.location.href.substr(0,window.location.href.indexOf('#')) + "#" + (init_index);
350            history.pushState( {}, document.title, href );
351          }
352        }
353        pos = ((init_index - 1) * 100) * -1;
354        el.transformPage(settings, pos, init_index);
355      } else {
356        $(settings.sectionContainer + "[data-index='1']").addClass("active")
357        $("body").addClass("viewing-page-1")
358        if(settings.pagination == true) $(".onepage-pagination li a" + "[data-index='1']").addClass("active");
359      }
360    }else{
361      $(settings.sectionContainer + "[data-index='1']").addClass("active")
362      $("body").addClass("viewing-page-1")
363      if(settings.pagination == true) $(".onepage-pagination li a" + "[data-index='1']").addClass("active");
364    }
365
366    if(settings.pagination == true)  {
367      $(".onepage-pagination li a").click(function (){
368        var page_index = $(this).data("index");
369        el.moveTo(page_index);
370      });
371    }
372
373
374    $(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function(event) {
375      event.preventDefault();
376      var delta = event.originalEvent.wheelDelta || -event.originalEvent.detail;
377      if(!$("body").hasClass("disabled-onepage-scroll")) init_scroll(event, delta);
378    });
379
380
381    if(settings.responsiveFallback != false) {
382      $(window).resize(function() {
383        responsive();
384      });
385
386      responsive();
387    }
388
389    if(settings.keyboard == true) {
390      $(document).keydown(function(e) {
391        var tag = e.target.tagName.toLowerCase();
392
393        if (!$("body").hasClass("disabled-onepage-scroll")) {
394          switch(e.which) {
395            case 38:
396              if (tag != 'input' && tag != 'textarea') el.moveUp()
397            break;
398            case 40:
399              if (tag != 'input' && tag != 'textarea') el.moveDown()
400            break;
401            case 32: //spacebar
402              if (tag != 'input' && tag != 'textarea') el.moveDown()
403            break;
404            case 33: //pageg up
405              if (tag != 'input' && tag != 'textarea') el.moveUp()
406            break;
407            case 34: //page dwn
408              if (tag != 'input' && tag != 'textarea') el.moveDown()
409            break;
410            case 36: //home
411              el.moveTo(1);
412            break;
413            case 35: //end
414              el.moveTo(total);
415            break;
416            default: return;
417          }
418        }
419
420      });
421    }
422    return false;
423  }
424
425
426}(window.jQuery);
427
428
429// ---------------------------------
430// ---------- SimpleMarquee ----------
431// ---------------------------------
432//Copyright (C) 2016  Fabian Valle 
433//An easy to implement marquee plugin. I know its easy because even I can use it.
434//Forked from: https://github.com/conradfeyt/Simple-Marquee
435//Re-Written by: Fabian Valle (www.fabian-valle.com) (www.obliviocompany.com)
436// 
437// ------------------------
438// Structure //
439//
440//  *********************************** - marque-container - *************************************
441//  *                                                                                            *
442//  *   ******************************* ******************************************************   *
443//  *   *                             * *                                                    *   *
444//  *   * - marquee-content-sibling - * *                 - marquee-content -                *   *
445//  *   *                             * *                                                    *   *
446//  *   ******************************* ******************************************************   *
447//  *                                                                                            *
448//  **********************************************************************************************
449//
450//// Usage //
451//  
452//    Only need to call the createMarquee() function,
453//    if desired, pass through the following paramaters:
454//
455//    $1 duration:                   controls the speed at which the marquee moves
456//
457//    $2 padding:                    right margin between consecutive marquees. 
458//
459//    $3 marquee_class:             the actual div or span that will be used to create the marquee - 
460//                                   multiple marquee items may be created using this item's content. 
461//                                   This item will be removed from the dom
462//
463//    $4 container_class:           the container div in which the marquee content will animate. 
464//
465//    $5 marquee-content-sibling :   (optional argument) a sibling item to the marqueed item  that 
466//                                   affects the end point position and available space inside the 
467//                                   container. 
468//
469//    $6 hover:                     Boolean to indicate whether pause on hover should is required. 
470;(function ($, window, document, undefined){
471	var pluginName = 'SimpleMarquee';
472
473    function Plugin (element, options) {
474        this.element = element;
475        this._name = pluginName;
476        this._defaults = $.fn.SimpleMarquee.defaults;
477        this.settings = $.extend( {}, this._defaults, options );
478        this.marqueeSpawned = [];
479        this.marqueeHovered = false;
480        this.documentHasFocus = false;        
481        //
482        this.counter = 0;
483
484        this.timeLeft = 0;
485        this.currentPos = 0;
486        this.distanceLeft = 0;
487        this.totalDistance = 0;
488        this.contentWidth = 0;
489        this.endPoint = 0;
490        this.duration = 0;
491        this.hovered = false;
492        this.padding = 0;
493        
494        
495        this.init();
496    }
497    function marqueeObj(newElement){
498    	this.el=newElement;
499    	this.counter=0;
500    	this.name="";
501    	this.timeTop=0;
502    	this.currentPos=0;
503    	this.distanceTop=0;
504    	this.totalDistance=0;
505    	this.contentWidth=0;
506    	this.endPoint=0;
507    	this.duration=0;
508    	this.hovered=false;
509    	this.padding=0;
510    }
511    //methods for plugin
512    $.extend(Plugin.prototype, {
513
514        // Initialization logic
515        init: function () {
516            this.buildCache();
517            this.bindEvents();
518            var config = this.settings;
519            //init marquee
520            if($(config.marquee_class).width() == 0){
521	            console.error('FATAL: marquee css or children css not correct. Width is either set to 0 or the element is collapsing. Make sure overflow is set on the marquee, and the children are postitioned relatively');
522	            return;
523	        }
524	
525	        if(typeof $(config.marquee_class) === 'undefined'){
526	            console.error('FATAL: marquee class not valid');
527	            return;
528	        }
529	
530	        if(typeof $(config.container_class) === 'undefined'){
531	            console.error('FATAL: marquee container class not valid');
532	            return;
533	        }
534	
535	        if(config.sibling_class != 0 && typeof $(config.sibling_class) === 'undefined'){
536	            console.error('FATAL: sibling class container class not valid');
537	            return;
538	        }
539	        
540	        //create the Marquee
541	        this.createMarquee();
542        },
543
544        // Remove plugin instance completely
545        destroy: function() {
546            this.unbindEvents();
547            this.$element.removeData();
548        },
549
550        // Cache DOM nodes for performance
551        buildCache: function () {
552            this.$element = $(this.element);
553        },
554
555        // Bind events that trigger methods
556        bindEvents: function() {
557        	var plugin = this;
558        	$(window).on('focus',function(){
559        		plugin.documentHasFocus = true;
560        		for (var key in plugin.marqueeSpawned){
561      	          plugin.marqueeManager(plugin.marqueeSpawned[key]);   
562      	      	} 
563        	});
564        	$(window).on('blur',function(){
565        		plugin.documentHasFocus = false;
566        		for (var key in plugin.marqueeSpawned){
567        	        plugin.marqueeSpawned[key].el.clearQueue().stop(); 
568        	        plugin.marqueeSpawned[key].hovered = true;
569        	    }
570        	});
571
572        },
573
574        // Unbind events that trigger methods
575        unbindEvents: function() {
576        	$(window).off('blur focus');
577        },
578        getPosition: function(elName){
579        	this.currentPos = parseInt($(elName).css('left'));
580            return this.currentPos;
581        },
582        createMarquee: function(){
583        	var plugin = this;
584        	var config = plugin.settings;
585        	var marqueeContent =  $(config.marquee_class).html();
586            var containerWidth = $(config.container_class).width();
587            var contentWidth = $(config.marquee_class).width();
588            
589            var widthToIgnore = 0;
590            if (config.sibling_class != 0){ 
591            	widthToIgnore = $(config.sibling_class).width();
592            } 
593            
594            var spawnAmount = Math.ceil(containerWidth / contentWidth);
595            
596            $(config.marquee_class).remove();
597
598            if(spawnAmount<=2){
599                spawnAmount = 3;
600            } else {
601              spawnAmount++;
602            }
603
604            var totalContentWidth = (contentWidth + config.padding)*spawnAmount;
605
606            var endPoint = -(totalContentWidth - containerWidth);
607
608            var totalDistance =  containerWidth - endPoint;
609            
610            
611            
612            
613            for (var i = 0; i < spawnAmount; i++) {
614            	
615            	var newElement = false;
616            	
617                if(config.hover == true){
618
619                  
620                  newElement = $('<div class="marquee-' + (i+1) + '">' + marqueeContent + '</div>')        
621                  .mouseenter(function() {
622
623
624                    if ((plugin.documentHasFocus == true) && (plugin.marqueeHovered == false)){
625                      plugin.marqueeHovered = true;
626
627                      for (var key in plugin.marqueeSpawned){
628                        plugin.marqueeSpawned[key].el.clearQueue().stop(); 
629                        plugin.marqueeSpawned[key].hovered = true;
630                      }
631                      
632
633                    }
634
635                  })
636                  .mouseleave(function() {
637
638
639                      if ((plugin.documentHasFocus == true) && (plugin.marqueeHovered == true)){
640
641                        for (var key in plugin.marqueeSpawned){
642                          plugin.marqueeManager(plugin.marqueeSpawned[key]);   
643                        } 
644
645                        plugin.marqueeHovered = false;
646                      } 
647                  });
648
649                } else {
650
651                  newElement = $('<div class="marquee-' + (i+1) + '">' + marqueeContent + '</div>') ;   
652
653                }
654
655                plugin.marqueeSpawned[i] = new marqueeObj(newElement);
656
657                $(config.container_class).append(newElement);
658
659                plugin.marqueeSpawned[i].currentPos = (widthToIgnore + (contentWidth*i))+(config.padding*i);  //initial positioning
660                plugin.marqueeSpawned[i].name = '.marquee-'+(i+1); 
661
662                plugin.marqueeSpawned[i].totalDistance = totalDistance;  
663                plugin.marqueeSpawned[i].containerWidth = containerWidth;  
664                plugin.marqueeSpawned[i].contentWidth = contentWidth;  
665                plugin.marqueeSpawned[i].endPoint = endPoint;  
666                plugin.marqueeSpawned[i].duration = config.duration;  
667                plugin.marqueeSpawned[i].padding = config.padding;  
668
669                plugin.marqueeSpawned[i].el.css('left', plugin.marqueeSpawned[i].currentPos+config.padding +'px'); //setting left according to postition
670
671                 if (plugin.documentHasFocus == true){
672                  plugin.marqueeManager(plugin.marqueeSpawned[i]);
673                }
674
675            }
676            //end for
677            
678            if(document.hasFocus()){
679	        	 plugin.documentHasFocus = true;
680        	}else{
681	        	plugin.documentHasFocus = false;
682	        }
683            
684        },
685        marqueeManager: function(marqueed_el){
686        	var plugin = this;
687        	var elName = marqueed_el.name;
688        	if (marqueed_el.hovered == false) { 
689
690                if (marqueed_el.counter > 0) {  //this is not the first loop
691                  
692                      marqueed_el.timeLeft = marqueed_el.duration;
693                      marqueed_el.el.css('left', marqueed_el.containerWidth +'px'); //setting margin 
694                      marqueed_el.currentPos = marqueed_el.containerWidth; 
695                      marqueed_el.distanceLeft = marqueed_el.totalDistance - (marqueed_el.containerWidth - plugin.getPosition(elName));
696
697                } else {    // this is the first loop
698                  
699                  marqueed_el.timeLeft = (((marqueed_el.totalDistance - (marqueed_el.containerWidth - plugin.getPosition(elName)))/ marqueed_el.totalDistance)) * marqueed_el.duration;
700                }
701
702            } else {
703                  marqueed_el.hovered = false;
704                  marqueed_el.currentPos = parseInt(marqueed_el.el.css('left'));
705                  marqueed_el.distanceLeft = marqueed_el.totalDistance - (marqueed_el.containerWidth - plugin.getPosition(elName));
706                  marqueed_el.timeLeft = (((marqueed_el.totalDistance - (marqueed_el.containerWidth - marqueed_el.currentPos))/ marqueed_el.totalDistance)) * marqueed_el.duration;
707            }
708
709        	plugin.marqueeAnim(marqueed_el);
710        },
711        marqueeAnim: function(marqueeObject){
712        	var plugin = this;
713        	marqueeObject.counter++;
714            marqueeObject.el.clearQueue().animate(
715            		{'left': marqueeObject.endPoint+'px'}, 
716            		marqueeObject.timeLeft, 
717            		'linear', 
718            		function(){
719            			plugin.marqueeManager(marqueeObject);
720        			});
721        },
722        callback: function() {
723            // Cache onComplete option
724            var onComplete = this.settings.onComplete;
725
726            if ( typeof onComplete === 'function' ) {
727                onComplete.call(this.element);
728            }
729        }
730
731    });
732    //end methods for plugin
733    
734    $.fn.SimpleMarquee = function (options) {
735        this.each(function() {
736            if ( !$.data( this, "plugin_" + pluginName ) ) {
737                $.data( this, "plugin_" + pluginName, new Plugin( this, options ) );
738            }
739        });
740        return this;
741    };
742    $.fn.SimpleMarquee.defaults = {
743            property: 'value',
744            onComplete: null,
745            duration: 20000,
746            padding: 10,
747            marquee_class: '.marquee',
vendor: 5,492 bytes, lines 748-763
748            container_class: '.simple-marquee-container',
749            sibling_class: 0,
750            hover: true
751    };
752    
753})( jQuery, window, document );
754
755
756
757//lightbox
758
759
760/*! Lity - v2.2.2 - 2016-12-14
761* http://sorgalla.com/lity/
762* Copyright (c) 2015-2016 Jan Sorgalla; Licensed MIT */
763!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){var b=B();return N&&a.length?(a.one(N,b.resolve),setTimeout(b.resolve,500)):b.resolve(),b.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if("undefined"==typeof d)return"undefined"==typeof a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(a){for(var b,c=decodeURI(a.split("#")[0]).split("&"),d={},e=0,f=c.length;e<f;e++)c[e]&&(b=c[e].split("="),d[b[0]]=b[1]);return d}function f(a,c){return a+(a.indexOf("?")>-1?"&":"?")+b.param(c)}function g(a,b){var c=a.indexOf("#");return-1===c?b:(c>0&&(a=a.substr(c)),b+a)}function h(a){return b('<span class="lity-error"/>').append(a)}function i(a,c){var d=c.opener()&&c.opener().data("lity-desc")||"Image with no description",e=b('<img src="'+a+'" alt="'+d+'"/>'),f=B(),g=function(){f.reject(h("Failed loading image"))};return e.on("load",function(){return 0===this.naturalWidth?g():void f.resolve(e)}).on("error",g),f.promise()}function j(a,c){var d,e,f;try{d=b(a)}catch(a){return!1}return!!d.length&&(e=b('<i style="display:none !important"/>'),f=d.hasClass("lity-hide"),c.element().one("lity:remove",function(){e.before(d).remove(),f&&!d.closest(".lity-content").length&&d.addClass("lity-hide")}),d.removeClass("lity-hide").after(e))}function k(a){var c=J.exec(a);return!!c&&o(g(a,f("https://www.youtube"+(c[2]||"")+".com/embed/"+c[4],b.extend({autoplay:1},e(c[5]||"")))))}function l(a){var c=K.exec(a);return!!c&&o(g(a,f("https://player.vimeo.com/video/"+c[3],b.extend({autoplay:1},e(c[4]||"")))))}function m(a){var c=M.exec(a);return!!c&&(0!==a.indexOf("http")&&(a="https:"+a),o(g(a,f("https://www.facebook.com/plugins/video.php?href="+a,b.extend({autoplay:1},e(c[4]||""))))))}function n(a){var b=L.exec(a);return!!b&&o(g(a,f("https://www.google."+b[3]+"/maps?"+b[6],{output:b[6].indexOf("layer=c")>0?"svembed":"embed"})))}function o(a){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="'+a+'"/></div>'}function p(){return z.documentElement.clientHeight?z.documentElement.clientHeight:Math.round(A.height())}function q(a){var b=v();b&&(27===a.keyCode&&b.close(),9===a.keyCode&&r(a,b))}function r(a,b){var c=b.element().find(G),d=c.index(z.activeElement);a.shiftKey&&d<=0?(c.get(c.length-1).focus(),a.preventDefault()):a.shiftKey||d!==c.length-1||(c.get(0).focus(),a.preventDefault())}function s(){b.each(D,function(a,b){b.resize()})}function t(a){1===D.unshift(a)&&(C.addClass("lity-active"),A.on({resize:s,keydown:q})),b("body > *").not(a.element()).addClass("lity-hidden").each(function(){var a=b(this);void 0===a.data(F)&&a.data(F,a.attr(E)||null)}).attr(E,"true")}function u(a){var c;a.element().attr(E,"true"),1===D.length&&(C.removeClass("lity-active"),A.off({resize:s,keydown:q})),D=b.grep(D,function(b){return a!==b}),c=D.length?D[0].element():b(".lity-hidden"),c.removeClass("lity-hidden").each(function(){var a=b(this),c=a.data(F);c?a.attr(E,c):a.removeAttr(E),a.removeData(F)})}function v(){return 0===D.length?null:D[0]}function w(a,c,d,e){var f,g="inline",h=b.extend({},d);return e&&h[e]?(f=h[e](a,c),g=e):(b.each(["inline","iframe"],function(a,b){delete h[b],h[b]=d[b]}),b.each(h,function(b,d){return!d||(!(!d.test||d.test(a,c))||(f=d(a,c),!1!==f?(g=b,!1):void 0))})),{handler:g,content:f||""}}function x(a,e,f,g){function h(a){k=b(a).css("max-height",p()+"px"),j.find(".lity-loader").each(function(){var a=b(this);c(a).always(function(){a.remove()})}),j.removeClass("lity-loading").find(".lity-content").empty().append(k),m=!0,k.trigger("lity:ready",[l])}var i,j,k,l=this,m=!1,n=!1;e=b.extend({},H,e),j=b(e.template),l.element=function(){return j},l.opener=function(){return f},l.options=b.proxy(d,l,e),l.handlers=b.proxy(d,l,e.handlers),l.resize=function(){m&&!n&&k.css("max-height",p()+"px").trigger("lity:resize",[l])},l.close=function(){if(m&&!n){n=!0,u(l);var a=B();if(g&&(z.activeElement===j[0]||b.contains(j[0],z.activeElement)))try{g.focus()}catch(a){}return k.trigger("lity:close",[l]),j.removeClass("lity-opened").addClass("lity-closed"),c(k.add(j)).always(function(){k.trigger("lity:remove",[l]),j.remove(),j=void 0,a.resolve()}),a.promise()}},i=w(a,l,e.handlers,e.handler),j.attr(E,"false").addClass("lity-loading lity-opened lity-"+i.handler).appendTo("body").focus().on("click","[data-lity-close]",function(a){b(a.target).is("[data-lity-close]")&&l.close()}).trigger("lity:open",[l]),t(l),b.when(i.content).always(h)}function y(a,c,d){a.preventDefault?(a.preventDefault(),d=b(this),a=d.data("lity-target")||d.attr("href")||d.attr("src")):d=b(d);var e=new x(a,b.extend({},d.data("lity-options")||d.data("lity"),c),d,z.activeElement);if(!a.preventDefault)return e}var z=a.document,A=b(a),B=b.Deferred,C=b("html"),D=[],E="aria-hidden",F="lity-"+E,G='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not
763([tabindex^="-"])',H={handler:null,handlers:{image:i,inline:j,youtube:k,vimeo:l,googlemaps:n,facebookvideo:m,iframe:o},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'},I=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,J=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,K=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,L=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,M=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,N=function(){var a=z.createElement("div"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return!1}();return i.test=function(a){return I.test(a)},y.version="2.2.2",y.options=b.proxy(d,y,H),y.handlers=b.proxy(d,y,H.handlers),y.current=v,b(z).on("click.lity","[data-lity]",y),y});
764
765
766
767( function ( $ ){
768  $.fn.accordionjs = function(options) {
769    //Version check
770    if (typeof jQuery != 'undefined') {
771      var version = jQuery.fn.jquery;
772      var major   = parseInt(version.substr(0, version.indexOf('.')));
773      if (3 > major){
774        throw "Error requires a minimum of jQuery 3.0";
775      }
776    }
777
778    var _self = this;
779    var _selfId = "#"+_self[0].id;
780    var defaults = {
781      steps: [],
782      keyNavigation: true
783    };
784    var _settings = $.extend(defaults, options);
785
786    /*
787    ** BEGIN: Private functions.
788    */
789
790    function pad(n, w) { return Array(Math.max(w - String(n).length +1, 0)).join(0)+n; }
791
792    function _getStepById(userStepId) {
793      var _internalStep = userStepId - 1;
794      if (_internalStep < 0 || _internalStep > _settings.steps.lengh)
795      {
796        throw "Step out of range";
797      }
798      return _internalStep;
799    }
800
801    function _installKeyHandler()
802    {
803      if (false === _settings.keyNavigation){
804        return;
805      }
806
807      $(_selfId+"> li").on("keydown", function (e) { 
808        e = e || window.event;
809        var keyCode = e.keyCode || e.which;
810        var arrow = {left: 37, up: 38, right: 39, down: 40 };
811        if (e.ctrlKey && e.altKey) {
812          switch (keyCode) {
813            case arrow.left:
814              _gotoPreviousTab();
815              break;
816            case arrow.right:
817              _gotoNextTab();
818              break;
819          } // ENd SWITCH
820        }// END IF ctrl & alt
821      });
822    }
823
824    function _gotoNextTab(){
825      console.log("_gotoNextTab");
826      var _current = _self.select();
827      console.log("current " +_current);
828      if (_current < (_settings.steps.length+1)) {
829        ++_current;
830        _self.select(_current);
831      }
832    }
833
834    function _gotoPreviousTab(){
835      console.log("_gotoPreviousTab");
836      var _current = _self.select();
837      if (_current > 1){
838        --_current;
839        _self.select(_current);
840      }
841    }
842
843
844    function setSizes(){
845      var tabWidth = $(".accordionjs-select:first").outerWidth();
846      var areaWidth = $(_selfId).width();
847      var sliderWidth = areaWidth - ((_settings.steps.length) * tabWidth) - (_settings.steps.length+1) ;
848      var contentWidth = sliderWidth;
849
850if($('html[dir=rtl]').length>0)
851{$(".accordionjs > li").css("margin-left", "-"+sliderWidth+"px");}
852else{$(".accordionjs > li").css("margin-right", "-"+sliderWidth+"px"); }      
853      $(".accordionjs-content").css("width", contentWidth+"px");
854
855      $(_selfId+"-styles").remove();
856      if($('html[dir=rtl]').length>0){
857      $("head").append("<style id='"+_selfId+"-styles'>.accordionjs-select:checked ~ .accordionjs-separator { margin-left: "+sliderWidth+"px;}</style>");
858}else{   $("head").append("<style id='"+_selfId+"-styles'>.accordionjs-select:checked ~ .accordionjs-separator { margin-right: "+sliderWidth+"px;}</style>");}
859      /* Heights */
860      var tabHeight = $(_selfId).outerHeight();
861      $(".accordionjs-title").css("height", tabHeight+"px");
862      $(".accordionjs-select").css("height", tabHeight+"px");
863      $(".accordionjs-content").css("height", tabHeight+"px");
864    }
865
866    function _createHTMLForStep(node, step){
867      var selected = (step.selected ? 'checked="checked"' : "");
868      var icon     = "fa-square-o";
869      var disabled = "";
870
871      switch(step.status) {
872        case "complete":
873          icon = "fa-check-square-o";
874          break;
875        case "disabled":
876          icon = "fa-lock";
877          disabled = "disabled";
878          break;
879        case "optional":
880          icon = "fa-minus-square-o";
881          break;          
882      }
883      
884      var oldContents = $(node).contents();
885      $(node).empty();
886      $(node).attr("tabindex", step.number);
887      $(node).append('<input type="radio" name="ac-tab" value="'+step.number+'" 
887class="accordionjs-select" '+selected+' ' + disabled + '/>');
888      $(node).append('<div class="accordionjs-title">' +
889                    '  <span><i class="fa '+icon+' fa-rotate-90"></i><i class="jobStep fa fa-rotate-90 ">'+pad(step.number+1, 2)+'</i>'+step.title+'</span>' +
890                    '</div>');
891      $(node).append('<div class="accordionjs-content" id="accordionjs-page-'+step.number+'"></div>');
892      $(node).append('<div class="accordionjs-separator"></div>');
893
894      $("#accordionjs-page-"+step.number).append(oldContents);
895
896    }
897
898    function _init() {
899      $(_selfId).addClass("accordionjs");
900      $(_selfId+" li").each(function(index, node){
901        var step = {
902          number: index,
903          title: "Step "+index,
904          required: false,
905          completed: false,
906          status: "incomplete",
907          selected: false
908        }
909        
910        step.title    = ($(node).data("title")    ?  $(node).data("title")    : "Step " + (step.number+1));
911        step.required = ($(node).data("required") ?  $(node).data("required") : false);
912        step.selected = ($(node).data("selected") ?  $(node).data("selected") : false);
913        step.status   = ($(node).data("status")   ?  $(node).data("status")   : "incomplete");
914        if (0 == step.number) {
915          step.selected = true;
916        }
917
918        _settings.steps[index] = step;
919        _createHTMLForStep(node, step)
920      });
921      
922      _installKeyHandler();
923    }
924
925    /*
926    ** BEGIN: Public functions.
927    */
928
929    this.select = function(stepId){
930      var _selectedStepId = 0;      
931
932      //If we haven't requested a step to select, return the current.
933      if (typeof stepId === 'undefined'){
934        _selectedStepId = $(".accordionjs-select:checked").val();
935      }
936      else
937      {
938        _selectedStepId = _getStepById(stepId);
939        $('input[name="ac-tab"][value="'+parseInt(_selectedStepId)+'"]').prop("checked", "checked");
940      }
941
942      return ++_selectedStepId; //Normalise for 0 indexed arrays.
943    }
944
945
946    /*!
947    ** Sets a step as completed by providing the step number
948    **/   
949    this.complete = function(stepId){
950      var _internalStep = _getStepById(stepId);
951
952      $(".accordionjs-title:eq("+(_internalStep)+") i:first").removeClass("fa-square-o")
953                                                             .removeClass("fa-minus-square-o")
954                                                             .addClass("fa-check-square-o");
955    }
956
957    this.enable = function(stepId){
958      var _internalStep = _getStepById(stepId);
959      $(".accordionjs-title:eq("+(_internalStep)+") i:first").removeClass("fa-lock")
960                                                             .addClass("fa-square-o");
961      $(".accordionjs-select:eq("+(_internalStep)+")").removeAttr("disabled");
962    }
963
964    this.disable = function(stepId){
965      var _internalStep = _getStepById(stepId);
966
967      $(".accordionjs-title:eq("+(_internalStep)+") i:first").removeClass("fa-square-o")
968                                                             .removeClass("fa-minus-square-o")
969                                                             .addClass("fa-lock");
970
971      $(".accordionjs-select:eq("+(_internalStep)+")").attr("disabled", "disabled");
972    }
973
974    /*
975    ** BEGIN: Initialise
976    */
977    _init(); 
978    setSizes();
979
980    /*
981    ** @todo Find a more efficient mechanism to do this. 
982    */
983    $(window).resize(function(e){
984      setSizes();
985    });
986
987    return this;
988  };
989}( jQuery) );
990
991
992/*! flipclock 2015-08-31 */
993var Base=function(){};Base.extend=function(a,b){"use strict";var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}}
993,{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a<arguments.length;a++)"function"==typeof arguments[a]?arguments[a](this.prototype):this.prototype.extend(arguments[a]);return this},toString:function(){return String(this.valueOf())}});var FlipClock;!function(a){"use strict";FlipClock=function(a,b,c){return b instanceof Object&&b instanceof Date==!1&&(c=b,b=0),new FlipClock.Factory(a,b,c)},FlipClock.Lang={},FlipClock.Base=Base.extend({buildDate:"2014-12-12",version:"0.7.7",constructor:function(b,c){"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={}),this.setOptions(a.extend(!0,{},b,c))},callback:function(a){if("function"==typeof a){for(var b=[],c=1;c<=arguments.length;c++)arguments[c]&&b.push(arguments[c]);a.apply(this,b)}},log:function(a){window.console&&console.log&&console.log(a)},getOption:function(a){return this[a]?this[a]:!1},getOptions:function(){return this},setOption:function(a,b){this[a]=b},setOptions:function(a){for(var b in a)"undefined"!=typeof a[b]&&this.setOption(b,a[b])}})}(jQuery),function(a){"use strict";FlipClock.Face=FlipClock.Base.extend({autoStart:!0,dividers:[],factory:!1,lists:[],constructor:function(a,b){this.dividers=[],this.lists=[],this.base(b),this.factory=a},build:function(){this.autoStart&&this.start()},createDivider:function(b,c,d){"boolean"!=typeof c&&c||(d=c,c=b);var e=['<span class="'+this.factory.classes.dot+' top"></span>','<span class="'+this.factory.classes.dot+' bottom"></span>'].join("");d&&(e=""),b=this.factory.localize(b);var f=['<span class="'+this.factory.classes.divider+" "+(c?c:"").toLowerCase()+'">','<span class="'+this.factory.classes.label+'">'+(b?b:"")+"</span>",e,"</span>"],g=a(f.join(""));return this.dividers.push(g),g},createList:function(a,b){"object"==typeof a&&(b=a,a=0);var c=new FlipClock.List(this.factory,a,b);return this.lists.push(c),c},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0,{minimumDigits:this.factory.minimumDigits}),this.flip(this.factory.original,!1)},appendDigitToClock:function(a){a.$el.append(!1)},addDigit:function(a){var b=this.createList(a,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});this.appendDigitToClock(b)},start:function(){},stop:function(){},autoIncrement:function(){this.factory.countdown?this.decrement():this.increment()},increment:function(){this.factory.time.addSecond()},decrement:function(){0==this.factory.time.getTimeSeconds()?this.factory.stop():this.factory.time.subSecond()},flip:function(b,c){var d=this;a.each(b,function(a,b){var e=d.lists[a];e?(c||b==e.digit||e.play(),e.select(b)):d.addDigit(b)})}})}(jQuery),function(a){"use strict";FlipClock.Factory=FlipClock.Base.extend({animationRate:1e3,autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-div
993ider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",countdown:!1,defaultClockFace:"HourlyCounter",defaultLanguage:"english",$el:!1,face:!0,lang:!1,language:"english",minimumDigits:0,original:!1,running:!1,time:!1,timer:!1,$wrapper:!1,constructor:function(b,c,d){d||(d={}),this.lists=[],this.running=!1,this.base(d),this.$el=a(b).addClass(this.classes.wrapper),this.$wrapper=this.$el,this.original=c instanceof Date?c:c?Math.round(c):0,this.time=new FlipClock.Time(this,this.original,{minimumDigits:this.minimumDigits,animationRate:this.animationRate}),this.timer=new FlipClock.Timer(this,d),this.loadLanguage(this.language),this.loadClockFace(this.clockFace,d),this.autoStart&&this.start()},loadClockFace:function(a,b){var c,d="Face",e=!1;return a=a.ucfirst()+d,this.face.stop&&(this.stop(),e=!0),this.$el.html(""),this.time.minimumDigits=this.minimumDigits,c=FlipClock[a]?new FlipClock[a](this,b):new FlipClock[this.defaultClockFace+d](this,b),c.build(),this.face=c,e&&this.start(),this.face},loadLanguage:function(a){var b;return b=FlipClock.Lang[a.ucfirst()]?FlipClock.Lang[a.ucfirst()]:FlipClock.Lang[a]?FlipClock.Lang[a]:FlipClock.Lang[this.defaultLanguage],this.lang=b},localize:function(a,b){var c=this.lang;if(!a)return null;var d=a.toLowerCase();return"object"==typeof b&&(c=b),c&&c[d]?c[d]:a},start:function(a){var b=this;b.running||b.countdown&&!(b.countdown&&b.time.time>0)?b.log("Trying to start timer when countdown already at 0"):(b.face.start(b.time),b.timer.start(function(){b.flip(),"function"==typeof a&&a()}))},stop:function(a){this.face.stop(),this.timer.stop(a);for(var b in this.lists)this.lists.hasOwnProperty(b)&&this.lists[b].stop()},reset:function(a){this.timer.reset(a),this.face.reset()},setTime:function(a){this.time.time=a,this.flip(!0)},getTime:function(a){return this.time},setCountdown:function(a){var b=this.running;this.countdown=a?!0:!1,b&&(this.stop(),this.start())},flip:function(a){this.face.flip(!1,a)}})}(jQuery),function(a){"use strict";FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$el:!1,$obj:!1,items:[],lastDigit:0,constructor:function(a,b,c){this.factory=a,this.digit=b,this.lastDigit=b,this.$el=this.createList(
993),this.$obj=this.$el,b>0&&this.select(b),this.factory.$el.append(this.$el)},select:function(a){if("undefined"==typeof a?a=this.digit:this.digit=a,this.digit!=this.lastDigit){var b=this.$el.find("."+this.classes.before).removeClass(this.classes.before);this.$el.find("."+this.classes.active).removeClass(this.classes.active).addClass(this.classes.before),this.appendListItem(this.classes.active,this.digit),b.remove(),this.lastDigit=this.digit}},play:function(){this.$el.addClass(this.factory.classes.play)},stop:function(){var a=this;setTimeout(function(){a.$el.removeClass(a.factory.classes.play)},this.factory.timer.interval)},createListItem:function(a,b){return['<li class="'+(a?a:"")+'">','<a href="#">','<div class="up">','<div class="shadow"></div>','<div class="inn">'+(b?b:"")+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn">'+(b?b:"")+"</div>","</div>","</a>","</li>"].join("")},appendListItem:function(a,b){var c=this.createListItem(a,b);this.$el.append(c)},createList:function(){var b=this.getPrevDigit()?this.getPrevDigit():this.digit,c=a(['<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'">',this.createListItem(this.classes.before,b),this.createListItem(this.classes.active,this.digit),"</ul>"].join(""));return c},getNextDigit:function(){return 9==this.digit?0:this.digit+1},getPrevDigit:function(){return 0==this.digit?9:this.digit-1}})}(jQuery),function(a){"use strict";String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},a.fn.FlipClock=function(b,c){return new FlipClock(a(this),b,c)},a.fn.flipClock=function(b,c){return a.fn.FlipClock(b,c)}}(jQuery),function(a){"use strict";FlipClock.Time=FlipClock.Base.extend({time:0,factory:!1,minimumDigits:0,constructor:function(a,b,c){"object"!=typeof c&&(c={}),c.minimumDigits||(c.minimumDigits=a.minimumDigits),this.base(c),this.factory=a,b&&(this.time=b)},convertDigitsToArray:function(a){var b=[];a=a.toString();for(var c=0;c<a.length;c++)a[c].match(/^\d*$/g)&&b.push(a[c]);return b},digit:function(a){var b=this.toString(),c=b.length;return b[c-a]?b[c-a]:!1},digitize:function(b){var c=[];if(a.each(b,function(a,b){b=b.toString(),1==b.length&&(b="0"+b);for(var d=0;d<b.length;d++)c.push(b.charAt(d))}),c.length>this.minimumDigits&&(this.minimumDigits=c.length),this.minimumDigits>c.length)for(var d=c.length;d<this.minimumDigits;d++)c.unshift("0");return c},getDateObject:function(){return this.time instanceof Date?this.time:new Date((new Date).getTime()+1e3*this.getTimeSeconds())},getDayCounter:function(a){var b=[this.getDays(),this.getHours(!0),this.getMinutes(!0)];return a&&b.push(this.getSeconds(!0)),this.digitize(b)},getDays:function(a){var b=this.getTimeSeconds()/60/60/24;return a&&(b%=7),Math.floor(b)},getHourCounter:function(){var a=this.digitize([this.getHours(),this.getMinutes(!0),this.get
993Seconds(!0)]);return a},getHourly:function(){return this.getHourCounter()},getHours:function(a){var b=this.getTimeSeconds()/60/60;return a&&(b%=24),Math.floor(b)},getMilitaryTime:function(a,b){"undefined"==typeof b&&(b=!0),a||(a=this.getDateObject());var c=[a.getHours(),a.getMinutes()];return b===!0&&c.push(a.getSeconds()),this.digitize(c)},getMinutes:function(a){var b=this.getTimeSeconds()/60;return a&&(b%=60),Math.floor(b)},getMinuteCounter:function(){var a=this.digitize([this.getMinutes(),this.getSeconds(!0)]);return a},getTimeSeconds:function(a){return a||(a=new Date),this.time instanceof Date?this.factory.countdown?Math.max(this.time.getTime()/1e3-a.getTime()/1e3,0):a.getTime()/1e3-this.time.getTime()/1e3:this.time},getTime:function(a,b){"undefined"==typeof b&&(b=!0),a||(a=this.getDateObject()),console.log(a);var c=a.getHours(),d=[c>12?c-12:0===c?12:c,a.getMinutes()];return b===!0&&d.push(a.getSeconds()),this.digitize(d)},getSeconds:function(a){var b=this.getTimeSeconds();return a&&(60==b?b=0:b%=60),Math.ceil(b)},getWeeks:function(a){var b=this.getTimeSeconds()/60/60/24/7;return a&&(b%=52),Math.floor(b)},removeLeadingZeros:function(b,c){var d=0,e=[];return a.each(c,function(a,f){b>a?d+=parseInt(c[a],10):e.push(c[a])}),0===d?e:c},addSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()+a):this.time+=a},addSecond:function(){this.addSeconds(1)},subSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()-a):this.time-=a},subSecond:function(){this.subSeconds(1)},toString:function(){return this.getTimeSeconds().toString()}})}(jQuery),function(a){"use strict";FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,animationRate:1e3,constructor:function(a,b){this.base(b),this.factory=a,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(a){clearInterval(this.timer),this.count=0,this._setInterval(a),this.callback(this.callbacks.reset)},start:function(a){this.factory.running=!0,this._createTimer(a),this.callback(this.callbacks.start)},stop:function(a){this.factory.running=!1,this._clearInterval(a),this.callback(this.callbacks.stop),this.callback(a)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(a){this._setInterval(a)},_destroyTimer:function(a){this._clearInterval(),this.timer=!1,this.callback(a),this.callback(this.callbacks.destroy)},_interval:function(a){this.callback(this.callbacks.interval),this.callback(a),this.count++},_setInterval:function(a){var b=this;b._interval(a),b.timer=setInterval(function(){b._interval(a)},this.interval)}})}(jQuery),function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul");this.factory.time.time||(this.factory.original=new Date,this.factory.time=new FlipClock.Time(this.factory,this.factory.original));var b=b?b:this.factory.time.getMilitaryTime(!1,this.showSeconds);b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.createDivider(),this.createDivider(),a(this.dividers[0]).insertBefore(this.lists[this.lists.length-2].$el),a(this.dividers[1]).insertBefore(this.lists[this.lists.length-4].$el),this.base()},flip:function(a,b){this.autoIncrement(),a=a?a:this.factory.time.getMilitaryTime(!1,this.showSeconds),this.base(a,b)}})}(jQuery),function(a){FlipClock.CounterFace=FlipClock.Face.extend({shouldAutoIncrement:!1,constructor:function(a,b){"object"!=typeof b&&(b={}),a.autoStart=b.autoStart?!0:!1,b.autoStart&&(this.shouldAutoIncrement=!0),a.increment=function(){a.countdown=!1,a.setTime(a.getTime().getTimeSeconds()+1)},a.decrement=function(){a.countdown=!0;var b=a.getTime().getTimeSeconds();b>0&&a.setTime(b-1)},a.setValue=function(b){a.setTime(b)},a.setCounter=function(b){a.setTime(b)},this.base(a,b)},build:function(){var b=this,c=this.factory.$el.find("ul"),d=this.factory.getTime().digitize([this.factory.getTime().time]);d.length>c.length&&a.each(d,function(a,c){var d=b.createList(c);d.select(c)}),a.each(this.lists,function(a,b){b.play()}),this.base()},flip:function(a,b){this.shouldAutoIncrement&&this.autoIncrement(),a||(a=this.factory.getTime().digitize([this.factory.getTime().time])),this.base(a,b)},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0),this.flip()}})}(jQuery),function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul"),e=0;b=b?b:this.factory.time.getDayCounter(this.showSeconds),b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.showSeconds?a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el):e=2,a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4+e].$el),a(this.createDivider("Hours")).insertBefore(this.lists[this.lists.length-6+e].$el),a(this.createDivider("Days",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getDayCounter(this.showSeconds)),this.autoIncrement(),this.base(a,b)}})}(jQuery),function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$el.find("ul");c=c?c:this.factory.time.getHourCounter(),c.length>e.length&&a.each(c,function(a,b){d.createList(b)}),a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el),a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4].$el),b||a(this.createDivider("Hours",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getHourCounter()),this.autoIncrement(),this.base(a,b)},appendDigitToClock:function(a){this.base(a),this.dividers[0].insertAfter(this.dividers[0].next())}})}
993(jQuery),function(a){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(a,b){this.base(a,b)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(a,b){a||(a=this.factory.time.getMinuteCounter()),this.base(a,b)}})}(jQuery),function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(){var b=this.factory.time.getTime(!1,this.showSeconds);this.base(b),this.meridiumText=this.getMeridium(),this.meridium=a(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join("")),this.meridium.insertAfter(this.lists[this.lists.length-1].$el)},flip:function(a,b){this.meridiumText!=this.getMeridium()&&(this.meridiumText=this.getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime(!1,this.showSeconds),b)},getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},isPM:function(){return"PM"==this.getMeridium()?!0:!1},isAM:function(){return"AM"==this.getMeridium()?!0:!1}})}(jQuery),function(a){FlipClock.Lang.Arabic={years:"سنوات",months:"شهور",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني"},FlipClock.Lang.ar=FlipClock.Lang.Arabic,FlipClock.Lang["ar-ar"]=FlipClock.Lang.Arabic,FlipClock.Lang.arabic=FlipClock.Lang.Arabic}(jQuery),function(a){FlipClock.Lang.Danish={years:"År",months:"Måneder",days:"Dage",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.da=FlipClock.Lang.Danish,FlipClock.Lang["da-dk"]=FlipClock.Lang.Danish,FlipClock.Lang.danish=FlipClock.Lang.Danish}(jQuery),function(a){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German}(jQuery),function(a){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English}(jQuery),function(a){FlipClock.Lang.Spanish={years:"Años",months:"Meses",days:"Días",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery),function(a){FlipClock.Lang.Finnish={years:"Vuotta",months:"Kuukautta",days:"Päivää",hours:"Tuntia",minutes:"Minuuttia",seconds:"Sekuntia"},FlipClock.Lang.fi=FlipClock.Lang.Finnish,FlipClock.Lang["fi-fi"]=FlipClock.Lang.Finnish,FlipClock.Lang.finnish=FlipClock.Lang.Finnish}(jQuery),function(a){FlipClock.Lang.French={years:"Ans",months:"Mois",days:"Jours",hours:"Heures",minutes:"Minutes",seconds:"Secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French}(jQuery),function(a){FlipClock.Lang.Italian={years:"Anni",months:"Mesi",days:"Giorni",hours:"Ore",minutes:"Minuti",seconds:"Secondi"},FlipClock.Lang.it=FlipClock.Lang.Italian,FlipClock.Lang["it-it"]=FlipClock.Lang.Italian,FlipClock.Lang.italian=FlipClock.Lang.Italian}(jQuery),function(a){FlipClock.Lang.Latvian={years:"Gadi",months:"Mēneši",days:"Dienas",hours:"Stundas",minutes:"Minūtes",seconds:"Sekundes"},FlipClock.Lang.lv=FlipClock.Lang.Latvian,FlipClock.Lang["lv-lv"]=FlipClock.Lang.Latvian,FlipClock.Lang.latvian=FlipClock.Lang.Latvian}(jQuery),function(a){FlipClock.Lang.Dutch={years:"Jaren",months:"Maanden",days:"Dagen",hours:"Uren",minutes:"Minuten",seconds:"Seconden"},FlipClock.Lang.nl=FlipClock.Lang.Dutch,FlipClock.Lang["nl-be"]=FlipClock.Lang.Dutch,FlipClock.Lang.dutch=FlipClock.Lang.Dutch}(jQuery),function(a){FlipClock.Lang.Norwegian={years:"År",months:"Måneder",days:"Dager",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.no=FlipClock.Lang.Norwegian,FlipClock.Lang.nb=FlipClock.Lang.Norwegian,FlipClock.Lang["no-nb"]=FlipClock.Lang.Norweg
993ian,FlipClock.Lang.norwegian=FlipClock.Lang.Norwegian}(jQuery),function(a){FlipClock.Lang.Portuguese={years:"Anos",months:"Meses",days:"Dias",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.pt=FlipClock.Lang.Portuguese,FlipClock.Lang["pt-br"]=FlipClock.Lang.Portuguese,FlipClock.Lang.portuguese=FlipClock.Lang.Portuguese}(jQuery),function(a){FlipClock.Lang.Russian={years:"лет",months:"месяцев",days:"дней",hours:"часов",minutes:"минут",seconds:"секунд"},FlipClock.Lang.ru=FlipClock.Lang.Russian,FlipClock.Lang["ru-ru"]=FlipClock.Lang.Russian,FlipClock.Lang.russian=FlipClock.Lang.Russian}(jQuery),function(a){FlipClock.Lang.Swedish={years:"År",months:"Månader",days:"Dagar",hours:"Timmar",minutes:"Minuter",seconds:"Sekunder"},FlipClock.Lang.sv=FlipClock.Lang.Swedish,FlipClock.Lang["sv-se"]=FlipClock.Lang.Swedish,FlipClock.Lang.swedish=FlipClock.Lang.Swedish}(jQuery),function(a){FlipClock.Lang.Chinese={years:"年",months:"月",days:"日",hours:"时",minutes:"分",seconds:"秒"},FlipClock.Lang.zh=FlipClock.Lang.Chinese,FlipClock.Lang["zh-cn"]=FlipClock.Lang.Chinese,FlipClock.Lang.chinese=FlipClock.Lang.Chinese}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.