PageSourceSearch

https://forma3almeria.com/modules/custom/gavias_sliderlayer/vendor…/jquery.themepunch.revolution.min.js?v=1.x

js forma3almeria.com collected 2026-10-02 00:07:29 UTC 128,801 bytes, 3,283 lines download raw bytes

1/**************************************************************************
2
3**************************************************************************/
4;(function(jQuery,undefined){
5"use strict";
6      
7   var version = {
8               core : "5.4.8",
9               "revolution.extensions.actions.min.js":"2.1.0",
10               "revolution.extensions.carousel.min.js":"1.2.1",
11               "revolution.extensions.kenburn.min.js":"1.3.1",
12               "revolution.extensions.layeranimation.min.js":"3.6.5", 
13               "revolution.extensions.navigation.min.js":"1.3.5", 
14               "revolution.extensions.parallax.min.js":"2.2.3",  
15               "revolution.extensions.slideanims.min.js":"1.8", 
16               "revolution.extensions.video.min.js":"2.2.2"  
17               };
18
19   jQuery.fn.extend({
20
21      revolution: function(options) {
22
23         // SET DEFAULT VALUES OF ITEM //
24         var defaults = {
25            delay:9000,
26            responsiveLevels:4064,              // Single or Array for Responsive Levels i.e.: 4064 or i.e. [2048, 1024, 768, 480]              
27            visibilityLevels:[2048,1024,778,480],  // Single or Array for Responsive Visibility Levels i.e.: 4064 or i.e. [2048, 1024, 768, 480]               
28            gridwidth:960,                   // Single or Array i.e. 960 or [960, 840,760,460]
29            gridheight:500,                     // Single or Array i.e. 500 or [500, 450,400,350]
30            minHeight:0,
31            autoHeight:"off",             
32            sliderType : "standard",            // standard, carousel, hero               
33            sliderLayout : "auto",              // auto, fullwidth, fullscreen            
34
35            fullScreenAutoWidth:"off",          // Turns the FullScreen Slider to be a FullHeight but auto Width Slider
36            fullScreenAlignForce:"off",
37            fullScreenOffsetContainer:"",       // Size for FullScreen Slider minimising Calculated on the Container sizes
38            fullScreenOffset:"0",               // Size for FullScreen Slider minimising              
39
40            hideCaptionAtLimit:0,               // It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser)
41            hideAllCaptionAtLimit:0,            // Hide all The Captions if Width of Browser is less then this value
42            hideSliderAtLimit:0,             // Hide the whole slider, and stop also functions if Width of Browser is less than this value                              
43            disableProgressBar:"off",           // Hides Progress Bar if is set to "on"
44            stopAtSlide:-1,                     // Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
45            stopAfterLoops:-1,                  // Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic
46            shadow:0,                        //0 = no Shadow, 1,2,3 = 3 Different Art of Shadows  (No Shadow in Fullwidth Version !)
47            dottedOverlay:"none",               //twoxtwo, threexthree, twoxtwowhite, threexthreewhite
48            startDelay:0,                    // Delay before the first Animation starts.           
49            lazyType : "smart",                 //full, smart, single
50            spinner:"spinner0",
51            shuffle:"off",                   // Random Order of Slides,
52
53            
54            viewPort:{
55               enable:false,                 // if enabled, slider wait with start or wait at first slide.
56               outof:"wait",                 // wait,pause                 
57               visible_area:"60%",              // Start Animation when 60% of Slider is visible
58               presize:false                 // Presize the Height of the Slider Container for Internal Link Positions
59            },
60
61            fallbacks:{
62               isJoomla:false,
63               panZoomDisableOnMobile:"off",
64               simplifyAll:"on",
65               nextSlideOnWindowFocus:"off", 
66               disableFocusListener:true,
67               ignoreHeightChanges:"off",  // off, mobile, always
68               ignoreHeightChangesSize:0,
69               allowHTML5AutoPlayOnAndroid:true
70
71            },
72            
73            parallax : {
74               type : "off",                 // off, mouse, scroll, mouse+scroll
75               levels: [10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],
76               origo:"enterpoint",           // slidercenter or enterpoint
77               speed:400,
78               bgparallax : "off",
79               opacity:"on",
80               disable_onmobile:"off",
81               ddd_shadow:"on",
82               ddd_bgfreeze:"off",
83               ddd_overflow:"visible",
84               ddd_layer_overflow:"visible",
85               ddd_z_correction:65,
86               ddd_path:"mouse"                       
87            },
88
89            scrolleffect: {
90               fade:"off",
91               blur:"off",
92               scale:"off",
93               grayscale:"off",              
94               maxblur:10,                         
95               on_layers:"off",
96               on_slidebg:"off",
97               on_static_layers:"off",
98               on_parallax_layers:"off",
99               on_parallax_static_layers:"off",
100               direction:"both",
101               multiplicator:1.35,
102               multiplicator_layers:0.5,
103               tilt:30,
104               disable_on_mobile:"on"     
105            },
106            
107            carousel : {
108               easing:punchgs.Power3.easeInOut,
109               speed:800,
110               showLayersAllTime : "off",
111               horizontal_align : "center",
112               vertical_align : "center",
113               infinity : "on",
114               space : 0,
115               maxVisibleItems : 3,                
116               stretch:"off",                
117               fadeout:"on",                 
118               maxRotation:0,                
119               minScale:0,
120               vary_fade:"off",
121               vary_rotation:"on",
122               vary_scale:"off",                
123               border_radius:"0px",
124               padding_top:0,
125               padding_bottom:0
126            },
127
128            navigation : {
129               keyboardNavigation:"off",  
130               keyboard_direction:"horizontal",    // horizontal - left/right arrows,  vertical - top/bottom arrows
131               mouseScrollNavigation:"off",        // on, off, carousel             
132               onHoverStop:"on",                // Stop Banner Timet at Hover on Slide on/off
133
134               touch:{
135                  touchenabled:"off",                 // Enable Swipe Function : on/off
136                  touchOnDesktop:"off",               // Enable Tuoch on Desktop Systems also
137                  swipe_treshold : 75,             // The number of pixels that the user must move their finger by before it is considered a swipe.
138                  swipe_min_touches : 1,              // Min Finger (touch) used for swipe                     
139                  drag_block_vertical:false,          // Prevent Vertical Scroll during Swipe
140                  swipe_direction:"horizontal"
141               },
142               arrows: {
143                  style:"",
144                  enable:false,
145                  hide_onmobile:false,                   
146                  hide_onleave:true,
147                  hide_delay:200,
148                  hide_delay_mobile:1200,
149                  hide_under:0,
150                  hide_over:9999,
151                  tmp:'',
152                  rtl:false,
153                  left : {                                           
154                     h_align:"left",
155                     v_align:"center",
156                     h_offset:20,
157                     v_offset:0, 
158                     container:"slider",                    
159                  },
160                  right : {
161                     h_align:"right",
162                     v_align:"center",
163                     h_offset:20,
164                     v_offset:0,
165                     container:"slider",
166                  }
167               },
168               bullets: {
169                  container:"slider",
170                  rtl:false,
171                  style:"",
172                  enable:false,
173                  hide_onmobile:false,                   
174                  hide_onleave:true,
175                  hide_delay:200,
176                  hide_delay_mobile:1200,
177                  hide_under:0,
178                  hide_over:9999,
179                  direction:"horizontal",
180                  h_align:"left",
181                  v_align:"center",
182                  space:0,
183                  h_offset:20,
184                  v_offset:0,
185                  tmp:'<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>'
186               },
187               thumbnails: {
188                  container:"slider",
189                  rtl:false,
190                  style:"",
191                  enable:false,
192                  width:100,
193                  height:50,
194                  min_width:100,
195                  wrapper_padding:2,
196                  wrapper_color:"#f5f5f5",
197                  wrapper_opacity:1,
198                  tmp:'<span class="tp-thumb-image"></span><span class="tp-thumb-title"></span>',
199                  visibleAmount:5,
200                  hide_onmobile:false,                   
201                  hide_onleave:true,
202                  hide_delay:200,
203                  hide_delay_mobile:1200,
204                  hide_under:0,
205                  hide_over:9999,
206                  direction:"horizontal",
207                  span:false,
208                  position:"inner",                   
209                  space:2,
210                  h_align:"left",
211                  v_align:"center",
212                  h_offset:20,
213                  v_offset:0
214               },
215               tabs: {
216                  container:"slider",
217                  rtl:false,
218                  style:"",
219                  enable:false,
220                  width:100,
221                  min_width:100,
222                  height:50,
223                  wrapper_padding:10,
224                  wrapper_color:"#f5f5f5",
225                  wrapper_opacity:1,
226                  tmp:'<span class="tp-tab-image"></span>',
227                  visibleAmount:5,
228                  hide_onmobile:false,                   
229                  hide_onleave:true,
230                  hide_delay:200,
231                  hide_delay_mobile:1200,
232                  hide_under:0,
233                  hide_over:9999,
234                  direction:"horizontal",
235                  span:false,
236                  space:0,
237                  position:"inner",                   
238                  h_align:"left",
239                  v_align:"center",
240                  h_offset:20,
241                  v_offset:0
242               }
243            },             
244            extensions:"extensions/",        //example extensions/ or extensions/source/
245            extensions_suffix:".min.js",
246            //addons:[{fileprefix:"revolution.addon.whiteboard",init:"initWhiteBoard",params:"opt",handel:"whiteboard"}],
247            debugMode:false
248         };
249            
250         // Merge of Defaults                         
251         options = jQuery.extend(true,{},defaults, options);
252         
253         return this.each(function() { 
254
255            
256            var c = jQuery(this);
257            
258            // Prepare maxHeight
259            options.minHeight = options.minHeight!=undefined ? parseInt(options.minHeight,0) : options.minHeight;
260            options.scrolleffect.on = options.scrolleffect.fade==="on" || options.scrolleffect.scale==="on" || options.scrolleffect.blur==="on" || options.scrolleffect.grayscale==="on";
261
262            
263
264            //REMOVE SLIDES IF SLIDER IS HERO
265            if (options.sliderType=="hero") {
266               c.find('>ul>li').each(function(i) {
267                  if (i>0) jQuery(this).remove();
268               })
269            }
270            options.jsFileLocation = options.jsFileLocation || getScriptLocation("themepunch.revolution.min.js");                
271            options.jsFileLocation = options.jsFileLocation + options.extensions;
272            options.scriptsneeded = getNeededScripts(options,c);
273            options.curWinRange = 0;
274
275            options.rtl = true; //jQuery('body').hasClass("rtl");    
276
277              if (options.navigation!=undefined && options.navigation.touch!=undefined) 
278                   options.navigation.touch.swipe_min_touches = options.navigation.touch.swipe_min_touches >5 ? 1 : options.navigation.touch.swipe_min_touches;
279   
280
281
282            jQuery(this).on("scriptsloaded",function() {
283               if (options.modulesfailing ) {
284                  c.html('<div style="margin:auto;line-height:40px;font-size:14px;color:#fff;padding:15px;background:#e74c3c;margin:20px 0px;">!! Error at loading Slider Revolution 5.0 Extrensions.'+options.errorm+'</div>').show();
285                  return false;
286               }
287
288               // CHECK FOR MIGRATION
289               if (_R.migration!=undefined) options = _R.migration(c,options);   
290               
291               punchgs.force3D = true;
292               if (options.simplifyAll!=="on") punchgs.TweenLite.lagSmoothing(1000,16);                                       
293               prepareOptions(c,options);
294               initSlider(c,options);
295            });                  
296            
297            c[0].opt = options;
298            waitForScripts(c,options);
299         })
300      },
301
302      //Get All Loaded Version
303      getRSVersion : function(silent) {               
304         if (silent===true) {
305            return jQuery('body').data('tp_rs_version');
306         } else {          
307            var v = jQuery('body').data('tp_rs_version'),
308               t = "";
309            t += ("---------------------------------------------------------")+"\n";
310            t += ("    Currently Loaded Slider Revolution & SR Modules :")+"\n";
311            t += ("---------------------------------------------------------")+"\n";         
312            for (var key in v) {
313               t += (v[key].alias+": "+v[key].ver)+"\n";
314            }           
315            t +=("---------------------------------------------------------")+"\n";
316            return t;
317         };             
318      },
319
320      
321      // Remove a Slide from the Slider
322      revremoveslide : function(sindex) {
323
324         return this.each(function() { 
325            
326            var container=jQuery(this),
327               opt = container[0].opt;
328
329            if (sindex<0 || sindex>opt.slideamount) return;
330
331            if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) {
332                              
333               if (opt && opt.li.length>0) {
334                  if (sindex>0 || sindex<=opt.li.length) {
335                     
336                     var li = jQuery(opt.li[sindex]),
337                        ref = li.data("index"),
338                        nextslideafter = false;
339                              
340                     opt.slideamount = opt.slideamount-1;   
341                     opt.realslideamount = opt.realslideamount-1;                            
342                     removeNavWithLiref('.tp-bullet',ref,opt);
343                     removeNavWithLiref('.tp-tab',ref,opt);
344                     removeNavWithLiref('.tp-thumb',ref,opt);  
345                     if (li.hasClass('active-revslide')) 
346                        nextslideafter = true;                                      
347                     li.remove();
348                     opt.li = removeArray(opt.li,sindex);   
349                     if (opt.carousel && opt.carousel.slides)
350                        opt.carousel.slides = removeArray(opt.carousel.slides,sindex)
351                     opt.thumbs = removeArray(opt.thumbs,sindex); 
352                     if (_R.updateNavIndexes) _R.updateNavIndexes(opt); 
353                     if (nextslideafter) container.revnext();
354                     punchgs.TweenLite.set(opt.li,{minWidth:"99%"});                                        
355                     punchgs.TweenLite.set(opt.li,{minWidth:"100%"});
356                  }
357               }
358            }
359         });
360         
361      },
362
363      // Add a New Call Back to some Module
364      revaddcallback: function(callback) {
365         return this.each(function() {                
366            if (this.opt) {   
367               if (this.opt.callBackArray === undefined)
368                  this.opt.callBackArray = new Array();
369               this.opt.callBackArray.push(callback);                
370            }
371         })
372      },
373
374      // Get Current Parallax Proc
375      revgetparallaxproc : function() {
376            return jQuery(this)[0].opt.scrollproc;          
377      },
378
379      // ENABLE DEBUG MODE
380      revdebugmode: function() {
381         return this.each(function() {                
382            var c=jQuery(this);
383            c[0].opt.debugMode = true;
384            containerResized(c,c[0].opt);
385            
386         })
387      },
388
389      // METHODE SCROLL
390      revscroll: function(oy) {
391         return this.each(function() {
392            var c=jQuery(this);           
393            jQuery('body,html').animate({scrollTop:(c.offset().top+(c.height())-oy)+"px"},{duration:400});
394         });
395      },
396
397      // METHODE PAUSE
398      revredraw: function(oy) {
399         return this.each(function() { 
400            var c=jQuery(this);                 
401            containerResized(c,c[0].opt);                                                             
402         })
403      },
404      // METHODE PAUSE
405      revkill: function(oy) {
406
407                  var self = this,
408                     container=jQuery(this);
409                  
410                  punchgs.TweenLite.killDelayedCallsTo(_R.showHideNavElements);
411                                             
412
413                  if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) {
414
415                     container.data('conthover',1);
416                     container.data('conthover-changed',1);
417                     container.trigger('revolution.slide.onpause');
418
419                     var bt = container.parent().find('.tp-bannertimer'),
420                        opt = container[0].opt;
421                     opt.tonpause = true;
422                     container.trigger('stoptimer');
423
424                     var resizid = "resize.revslider-"+container.attr('id');                          
425                     jQuery(window).unbind(resizid);
426
427                     punchgs.TweenLite.killTweensOf(container.find('*'),false);
428                     punchgs.TweenLite.killTweensOf(container,false);
429                     container.unbind('hover, mouseover, mouseenter,mouseleave, resize');                   
430                     var resizid = "resize.revslider-"+container.attr('id');
431                     jQuery(window).off(resizid);
432                     container.find('*').each(function() {
433                           var el = jQuery(this);
434
435                           el.unbind('on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer');
436                           el.off('on, hover, mouseenter,mouseleave,mouseover, resize');
437                           el.data('mySplitText',null);
438                           el.data('ctl',null);
439                           if (el.data('tween')!=undefined)
440                              el.data('tween').kill();
441                           if (el.data('kenburn')!=undefined)
442                              el.data('kenburn').kill();
443                           if (el.data('timeline_out')!=undefined)                                 
444                              el.data('timeline_out').kill();  
445                           if (el.data('timeline')!=undefined)                               
446                              el.data('timeline').kill();                                       
447                              
448                           el.remove();
449                           el.empty();
450                           el=null;
451                     })
452
453
454                     punchgs.TweenLite.killTweensOf(container.find('*'),false);
455                     punchgs.TweenLite.killTweensOf(container,false);
456                     bt.remove();
457                     try{container.closest('.forcefullwidth_wrapper_tp_banner').remove();} catch(e) {}
458                     try{container.closest('.rev_slider_wrapper').remove()} catch(e) {}
459                     try{container.remove();} catch(e) {}
460                     container.empty();
461                     container.html();
462                     container = null;
463
464                     opt = null;
465                     delete(self.c);
466                     delete(self.opt);
467                     delete(self.container);
468                     
469
470                     return true;
471                  } else {
472                     return false;
473                  }
474            },
475
476      // METHODE PAUSE
477      revpause: function() {
478         return this.each(function() {
479            var c=jQuery(this);
480            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {             
481               c.data('conthover',1);
482               c.data('conthover-changed',1);
483               c.trigger('revolution.slide.onpause');             
484               c[0].opt.tonpause = true;
485               c.trigger('stoptimer');
486            }
487         })
488      },
489
490      // METHODE RESUME
491      revresume: function() {
492         return this.each(function() {
493            var c=jQuery(this);
494            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {
495               c.data('conthover',0);
496               c.data('conthover-changed',1);
497               c.trigger('revolution.slide.onresume');               
498               c[0].opt.tonpause = false;             
499               c.trigger('starttimer');
500            }
501         })
502      },
503
504      revstart: function() {
505         //return this.each(function() {
506            var c=jQuery(this);                       
507            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0 && c[0].opt!==undefined) {                
508               if (!c[0].opt.sliderisrunning) {
509                  
510                  // fixes revapi.revstart();
511                  c[0].opt.c=c;
512                  c[0].opt.ul = c.find('>ul');
513                  
514                  runSlider(c,c[0].opt);
515                  return true;
516               }
517               else {
518                  console.log("Slider Is Running Already");
519                  return false;
520               }
521
522            }
523         //})
524
525      },
526
527      // METHODE NEXT
528      revnext: function() {
529         return this.each(function() {
530            // CATCH THE CONTAINER
531            var c=jQuery(this);
532            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {             
533               _R.callingNewSlide(c,1);
534            }
535         })
536      },
537
538      // METHODE RESUME
539      revprev: function() {
540         return this.each(function() {
541            // CATCH THE CONTAINER
542            var c=jQuery(this);
543            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {             
544               _R.callingNewSlide(c,-1);
545            }
546         })
547      },
548
549      // METHODE LENGTH
550      revmaxslide: function() {
551         // CATCH THE CONTAINER
552         return jQuery(this).find('.tp-revslider-mainul >li').length;
553      },
554
555
556      // METHODE CURRENT
557      revcurrentslide: function() {
558         // CATCH THE CONTAINER
559         var c=jQuery(this);
560         if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {          
561            return parseInt(c[0].opt.act,0)+1;
562         }
563      },
564
565      // METHODE CURRENT
566      revlastslide: function() {
567         // CATCH THE CONTAINER
568         return jQuery(this).find('.tp-revslider-mainul >li').length;
569      },
570
571
572      // METHODE JUMP TO SLIDE
573      revshowslide: function(slide) {
574         return this.each(function() {
575            // CATCH THE CONTAINER
576            var c=jQuery(this);
577            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {             
578               _R.callingNewSlide(c,"to"+(slide-1));
579            }
580         })
581      },
582      revcallslidewithid: function(slide) {
583         return this.each(function() {
584            // CATCH THE CONTAINER
585            var c=jQuery(this);
586            if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) {             
587               _R.callingNewSlide(c,slide);
588            }
589         })
590      }
591});
592
593
594
595//////////////////////////////////////////////////////////////
596// -  REVOLUTION FUNCTION EXTENSIONS FOR GLOBAL USAGE  -  //   
597//////////////////////////////////////////////////////////////
598var _R = jQuery.fn.revolution;
599
600jQuery.extend(true, _R, {
601   
602   getversion : function() {
603         return version;
604   },
605
606   compare_version : function(extension) {
607      var v = jQuery('body').data('tp_rs_version');
608      v = v === undefined ? new Object() : v;
609      if (v.Core===undefined) {
610         v.Core = new Object();
611         v.Core.alias = "Slider Revolution Core";
612         v.Core.name = "jquery.themepunch.revolution.min.js";
613         v.Core.ver = _R.getversion().core;
614      }
615
616      if (extension.check!="stop") {
617         // CHECK FOR CORRECT CORE AND EXTENSION VERSION
618         if (_R.getversion().core<extension.min_core) {        
619            if (extension.check===undefined) {
620               console.log("%c"+"Slider Revolution Warning (Core:"+_R.getversion().core+")",'color:#c0392b;font-weight:bold;');
621               console.log("%c"+"     Core is older than expected ("+extension.min_core+") from "+extension.alias,'color:#333');
622               console.log("%c"+"     Please update Slider Revolution to the latest version.",'color:#333');
623               console.log("%c"+"     It might be required to purge and clear Server/Client side Caches.",'color:#333');
624               
625            }           
626            extension.check="stop";
627         } else 
628
629         if (_R.getversion()[extension.name]!=undefined && extension.version <_R.getversion()[extension.name]) {
630            if (extension.check===undefined) {
631               console.log("%c"+"Slider Revolution Warning (Core:"+_R.getversion().core+")",'color:#c0392b;font-weight:bold;');
632               console.log("%c"+"     "+extension.alias+" ("+extension.version+") is older than requiered ("+_R.getversion()[extension.name]+")",'color:#333');
633               console.log("%c"+"     Please update Slider Revolution to the latest version.",'color:#333');
634               console.log("%c"+"     It might be required to purge and clear Server/Client side Caches.",'color:#333');            
635            }
636            extension.check="stop";
637         }
638      }
639      
640      if (v[extension.alias]===undefined) {
641         v[extension.alias] = new Object();
642         v[extension.alias].alias = extension.alias;
643         v[extension.alias].ver = extension.version;
644         v[extension.alias].name = extension.name;       
645      }
646
647      jQuery('body').data('tp_rs_version',v);
648      
649      return extension;
650   },
651   
652   currentSlideIndex : function(opt) {
653   
654      var   ai =  opt.c.find('.active-revslide').index();
655         
656      ai = ai == -1 ? 0 : ai;       
657
658      return ai;
659                                                
660   },
661
662   simp : function(a,b,basic) {
663      var c = Math.abs(a) - (Math.floor(Math.abs(a / b))*b);                                                         
664      if (basic)
665         return c;
666      else 
667         return a<0 ? -1*c : c;
668   },
669
670   // -  IS IOS VERSION OLDER THAN 5 ??   
671   iOSVersion : function() {
672      var oldios = false;
673      if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
674           if (navigator.userAgent.match(/OS 4_\d like Mac OS X/i)) {
675            oldios = true;
676         }
677       } else {
678            oldios = false;
679       }
680      return oldios;
681   },
682
683
684   // -  CHECK IF BROWSER IS IE     -     
685   isIE : function( version, comparison ){
686       var $div = jQuery('<div style="display:none;"/>').appendTo(jQuery('body'));
687       $div.html('<!--[if '+(comparison||'')+' IE '+(version||'')+']><a>&nbsp;</a><![endif]-->');
688       var ieTest = $div.find('a').length;
689       $div.remove();
690       return ieTest;
691   },
692
693   //    -  IS MOBILE ?? 
694   is_mobile : function() {
695       var agents = ['android', 'webos', 'iphone', 'ipad', 'blackberry','Android', 'webos', ,'iPod', 'iPhone', 'iPad', 'Blackberry', 'BlackBerry'];
696      var ismobile=false;
697       for(var i in agents) {
698   
699          if (navigator.userAgent.split(agents[i]).length>1) {
700               ismobile = true;
701   
702             }
703       }
704       return ismobile;        
705   },
706
707   is_android : function() {
708      var agents = ['android', 'Android'];
709      var isandroid=false;
710       for(var i in agents) { 
711          if (navigator.userAgent.split(agents[i]).length>1) {
712               isandroid = true; 
713             }
714       }
715       return isandroid;   
716   },
717
718   // -  CALL BACK HANDLINGS - //
719    callBackHandling : function(opt,type,position) {
720      try{
721         if (opt.callBackArray)
722            jQuery.each(opt.callBackArray,function(i,c) {            
723               if (c) {
724                  if (c.inmodule && c.inmodule === type)
725                     if (c.atposition && c.atposition === position)
726                        if (c.callback) 
727                           c.callback.call();                                 
728               }
729            });
730      } catch(e) {
731         console.log("Call Back Failed");
732      }
733   },
734
735   get_browser : function(){
736       var N=navigator.appName, ua=navigator.userAgent, tem;
737       var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
738       if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];
739       M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?'];
740       return M[0];
741    },
742
743   get_browser_version  : function(){
744       var N=navigator.appName, ua=navigator.userAgent, tem;
745       var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
746       if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];
747       M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?'];
748       return M[1];
749    },
750   
751   /*
752      Jason / Safari 11 Video autoplay fix
753   */
754   isSafari11: function() {
755      
756      var browser = jQuery.trim(_R.get_browser().toLowerCase());
757      if(jQuery.trim(navigator.userAgent.toLowerCase()).search('edge') !== -1 || browser === 'msie') return false;
758      return browser.match(/safari|chrome/);
759      
760   },
761
762    // GET THE HORIZONTAL OFFSET OF SLIDER BASED ON THE THU`MBNAIL AND TABS LEFT AND RIGHT SIDE
763   getHorizontalOffset : function(container,side) {
764      var thumbloff = gWiderOut(container,'.outer-left'),
765         thumbroff = gWiderOut(container,'.outer-right');
766                     
767      switch (side) {
768         case "left":
769            return thumbloff;
770         break;
771         case "right":
772            return thumbroff;
773         break;
774         case "both":
775            return thumbloff+thumbroff;
776         break;
777      }
778   },
779
780
781   //    -  CALLING THE NEW SLIDE   -  //    
782   callingNewSlide : function(container,direction) {
783            
784      var aindex = container.find('.next-revslide').length>0 ? container.find('.next-revslide').index() : container.find('.processing-revslide').length>0 ? container.find('.processing-revslide').index() : container.find('.active-revslide').index(),
785         nindex = 0,
786         opt = container[0].opt;
787   
788      container.find('.next-revslide').removeClass("next-revslide");
789      
790      // IF WE ARE ON AN INVISIBLE SLIDE CURRENTLY
791      if (container.find('.active-revslide').hasClass("tp-invisible-slide"))
792         aindex = opt.last_shown_slide;
793      
794      // SET NEXT DIRECTION
795      if (direction && jQuery.isNumeric(direction) || direction.match(/to/g)) {        
796         if (direction===1 || direction === -1) {
797            
798            nindex = aindex + direction;
799            nindex = nindex<0 ? opt.slideamount-1 : nindex>=opt.slideamount ? 0 : nindex;                
800         } else {                   
801
802            direction=jQuery.isNumeric(direction) ? direction : parseInt(direction.split("to")[1],0);
803            nindex = direction<0 ? 0 : direction>opt.slideamount-1 ? opt.slideamount-1 : direction;                  
804         }
805         container.find('.tp-revslider-slidesli:eq('+nindex+')').addClass("next-revslide");
806      } else      
807      if (direction) {
808         
809         container.find('.tp-revslider-slidesli').each(function() {
810            var li=jQuery(this);          
811            if (li.data('index')===direction) li.addClass("next-revslide");                           
812         })       
813      }
814
815      
816      nindex = container.find('.next-revslide').index();          
817      container.trigger("revolution.nextslide.waiting");
818            
819
820      if ((aindex===nindex && aindex === opt.last_shown_slide) || (nindex !== aindex && nindex!=-1))
821         swapSlide(container);   
822      else
823         container.find('.next-revslide').removeClass("next-revslide");
824   },
825
826   slotSize : function(img,opt) {
827      opt.slotw=Math.ceil(opt.width/opt.slots);
828
829      if (opt.sliderLayout=="fullscreen")
830         opt.sloth=Math.ceil(jQuery(window).height()/opt.slots);
831      else
832         opt.sloth=Math.ceil(opt.height/opt.slots);
833
834      if (opt.autoHeight=="on" && img!==undefined && img!=="")
835         opt.sloth=Math.ceil(img.height()/opt.slots);
836
837
838   },
839
840   setSize : function(opt) {
841   
842      var ofh = (opt.top_outer || 0) + (opt.bottom_outer || 0),
843         cpt = parseInt((opt.carousel.padding_top||0),0),
844         cpb = parseInt((opt.carousel.padding_bottom||0),0),
845         maxhei = opt.gridheight[opt.curWinRange],
846         __mh = 0,
847         _actli = opt.nextSlide === -1 || opt.nextSlide===undefined ? 0 : opt.nextSlide;        
848         opt.paddings = opt.paddings === undefined ? {top:(parseInt(opt.c.parent().css("paddingTop"),0) || 0), bottom:(parseInt(opt.c.parent().css("paddingBottom"),0) || 0)} : opt.paddings; 
849      
850      if (opt.rowzones && opt.rowzones.length>0)
851         for (var a=0;a<opt.rowzones[_actli].length;a++) {
852            __mh = __mh + opt.rowzones[_actli][a][0].offsetHeight;                        
853         }
854      
855
856      maxhei = maxhei<opt.minHeight ? opt.minHeight : maxhei;     
857      maxhei = maxhei<__mh ? __mh : maxhei;
858      
859      
860      if (opt.sliderLayout=="fullwidth" && opt.autoHeight=="off") punchgs.TweenLite.set(opt.c,{maxHeight:maxhei+"px"}); 
861      opt.c.css({marginTop:cpt,marginBottom:cpb});             
862      opt.width=opt.ul.width();
863      opt.height=opt.ul.height();   
864      setScale(opt);
865         
866      opt.height = Math.round(opt.gridheight[opt.curWinRange] * (opt.width/opt.gridwidth[opt.curWinRange]));
867
868      if (opt.height>opt.gridheight[opt.curWinRange] && opt.autoHeight!="on") opt.height=opt.gridheight[opt.curWinRange];
869
870      if (opt.sliderLayout=="fullscreen" || opt.infullscreenmode) {
871         opt.height = opt.bw * opt.gridheight[opt.curWinRange];
872         var cow = opt.c.parent().width();
873         var coh = jQuery(window).height();
874
875         if (opt.fullScreenOffsetContainer!=undefined) {
876            try{
877               var offcontainers = opt.fullScreenOffsetContainer.split(",");
878               if (offcontainers)
879                  jQuery.each(offcontainers,function(index,searchedcont) {
880                     coh = jQuery(searchedcont).length>0 ? coh - jQuery(searchedcont).outerHeight(true) : coh;                            
881                  });
882            } catch(e) {}
883            try{
884               if (opt.fullScreenOffset.split("%").length>1 && opt.fullScreenOffset!=undefined && opt.fullScreenOffset.length>0) 
885                     coh = coh - (jQuery(window).height()* parseInt(opt.fullScreenOffset,0)/100);
886               else
887               if (opt.fullScreenOffset!=undefined && opt.fullScreenOffset.length>0)
888                     coh = coh - parseInt(opt.fullScreenOffset,0);                        
889            } catch(e) {}
890         }
891
892         coh = coh<opt.minHeight ? opt.minHeight : coh;  
893         coh = coh - ofh;        
894         opt.c.parent().height(coh);
895
896         opt.c.closest('.rev_slider_wrapper').height(coh);
897         opt.c.css({'height':'100%'});
898
899         opt.height=coh;
900         if (opt.minHeight!=undefined && opt.height<opt.minHeight)
901            opt.height = opt.minHeight;
902         opt.height = parseInt(__mh,0)>parseInt(opt.height,0) ? __mh : opt.height;
903         
904      } else {
905         if (opt.minHeight!=undefined && opt.height<opt.minHeight)
906            opt.height = opt.minHeight;               
907         opt.height = parseInt(__mh,0)>parseInt(opt.height,0) ? __mh : opt.height;        
908         opt.c.height(opt.height);
909      }
910      var si = {  height:(cpt+cpb+ofh+opt.height+opt.paddings.top+opt.paddings.bottom)};  
911      
912      opt.c.closest('.forcefullwidth_wrapper_tp_banner').find('.tp-fullwidth-forcer').css(si);
913      opt.c.closest('.rev_slider_wrapper').css(si);      
914      setScale(opt);    
915   },
916
917   enterInViewPort : function(opt) {            
918      // START COUNTER IF VP ENTERED, AND COUNTDOWN WAS NOT ON YET
919      if (opt.waitForCountDown) {
920      
921         countDown(opt.c,opt);      
922         opt.waitForCountDown=false;         
923      }
924      // START FIRST SLIDE IF NOT YET STARTED AND VP ENTERED
925      if (opt.waitForFirstSlide) {        
926         swapSlide(opt.c);    
927         opt.waitForFirstSlide=false;
928         setTimeout(function() {
929            opt.c.removeClass("tp-waitforfirststart");
930         },500);
931      }        
932
933      if (opt.sliderlaststatus == "playing" || opt.sliderlaststatus==undefined) {
934         opt.c.trigger("starttimer");
935      }        
936
937      
938      if (opt.lastplayedvideos != undefined && opt.lastplayedvideos.length>0) {
939         
940         jQuery.each(opt.lastplayedvideos,function(i,_nc) {
941            
942            _R.playVideo(_nc,opt);
943         });
944      }  
945   },
946
947   leaveViewPort : function(opt) {     
948      opt.sliderlaststatus = opt.sliderstatus;
949      opt.c.trigger("stoptimer");      
950      if (opt.playingvideos != undefined && opt.playingvideos.length>0) { 
951         opt.lastplayedvideos = jQuery.extend(true,[],opt.playingvideos);
952         if (opt.playingvideos)
953            jQuery.each(opt.playingvideos,function(i,_nc) {    
954               opt.leaveViewPortBasedStop = true;     
955               if (_R.stopVideo) _R.stopVideo(_nc,opt);
956            });
957      }
958   },
959
960   unToggleState : function(a) {       
961      if (a!=undefined && a.length>0)
962         jQuery.each(a,function(i,layer) {
963            layer.removeClass("rs-toggle-content-active");
964         });      
965   },
966
967   toggleState : function(a) {
968      if (a!=undefined && a.length>0)
969         jQuery.each(a,function(i,layer) {
970            layer.addClass("rs-toggle-content-active");
971         });
972   },
973   swaptoggleState : function(a) {
974      if (a!=undefined && a.length>0)
975         jQuery.each(a,function(i,layer) {
976            if (jQuery(layer).hasClass("rs-toggle-content-active"))
977               jQuery(layer).removeClass("rs-toggle-content-active");
978            else
979               jQuery(layer).addClass("rs-toggle-content-active");
980         });
981   },
982   lastToggleState : function(a) {
983      var state = 0;
984      if (a!=undefined && a.length>0)
985         jQuery.each(a,function(i,layer) {
986            state = layer.hasClass("rs-toggle-content-active");
987         });
988      return state;
989   }
990
991});
992
993
994var   _ISM = _R.is_mobile(),
995   _ANDROID = _R.is_android();
996
997
998
999////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1000////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////      
1001////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1002////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   
1003
1004
1005var checkIDS = function(opt,item) {
1006   opt.anyid = opt.anyid === undefined ? [] : opt.anyid;
1007   var ind = jQuery.inArray(item.attr('id'),opt.anyid);  
1008   if (ind!=-1) {    
1009      var newid = item.attr('id')+"_"+Math.round(Math.random()*9999);
1010      item.attr('id',newid);     
1011   }
1012
1013   opt.anyid.push(item.attr('id'));
1014}
1015var removeArray = function(arr,i) {
1016            var newarr = [];
1017            jQuery.each(arr,function(a,b) {
1018               if (a!=i) newarr.push(b);
1019            })
1020            return newarr;
1021         }
1022
1023var removeNavWithLiref = function(a,ref,opt) {
1024   opt.c.find(a).each(function() {
1025      var a = jQuery(this);
1026      if (a.data('liref')===ref)
1027         a.remove();
1028   })
1029}
1030
1031
1032var lAjax = function(s,o) {
1033   if (jQuery('body').data(s)) return false;
1034   if (o.filesystem) {
1035      if (o.errorm===undefined) 
1036         o.errorm = "<br>Local Filesystem Detected !<br>Put this to your header:";
1037      console.warn('Local Filesystem detected !');
1038      o.errorm = o.errorm+'<br>&lt;script type="text/javascript" src="'+o.jsFileLocation+s+o.extensions_suffix+'"&gt;&lt;/script&gt;';
1039      console.warn(o.jsFileLocation+s+o.extensions_suffix+' could not be loaded !');
1040      console.warn('Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document.');
1041      console.log(" ");
1042      o.modulesfailing = true;
1043      return false;
1044   }  
1045   
1046   jQuery.ajax({
1047      url:o.jsFileLocation+s+o.extensions_suffix+'?version='+version.core,
1048      'dataType':'script',
1049      'cache':true,
1050      "error":function(e) {
1051         console.warn("Slider Revolution 5.0 Error !")
1052         console.error("Failure at Loading:"+s+o.extensions_suffix+" on Path:"+o.jsFileLocation)
1053         console.info(e);
1054      }        
1055   });
1056   jQuery('body').data(s,true);
1057}
1058
1059
1060
1061var getNeededScripts = function(o,c) { 
1062   var n = new Object(),
1063      _n = o.navigation;
1064   
1065   n.kenburns = false;
1066   n.parallax = false;
1067   n.carousel = false;
1068   n.navigation = false;
1069   n.videos = false;
1070   n.actions = false;
1071   n.layeranim = false;
1072   n.migration = false;
1073
1074   
1075
1076
1077   // MIGRATION EXTENSION
1078   if (!c.data('version') || !c.data('version').toString().match(/5./gi)) {
1079      n.kenburns = true;
1080      n.parallax = true;
1081      n.carousel = false;
1082      n.navigation = true;
1083      n.videos = true;
1084      n.actions = true;
1085      n.layeranim = true;
1086      n.migration = true;     
1087   }
1088   else {
1089      // KEN BURN MODUL
1090      c.find('img').each(function(){         
1091         if (jQuery(this).data('kenburns')=="on") n.kenburns = true;
1092      });                  
1093
1094      // NAVIGATION EXTENSTION
1095      if (o.sliderType =="carousel" || _n.keyboardNavigation=="on" || _n.mouseScrollNavigation=="on" || _n.touch.touchenabled=="on" || _n.arrows.enable || _n.bullets.enable || _n.thumbnails.enable || _n.tabs.enable )
1096         n.navigation = true;
1097      
1098      // LAYERANIM, VIDEOS, ACTIONS EXTENSIONS
1099      c.find('.tp-caption, .tp-static-layer, .rs-background-video-layer').each(function(){
1100         var _nc = jQuery(this);
1101         if ((_nc.data('ytid')!=undefined  || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('youtube')>0))         
1102            n.videos = true;        
1103         if ((_nc.data('vimeoid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('vimeo')>0))
1104            n.videos = true;     
1105         if (_nc.data('actions')!==undefined) 
1106            n.actions = true;
1107         n.layeranim = true;
1108      });
1109
1110
1111      c.find('li').each(function() {
1112         if (jQuery(this).data('link') && jQuery(this).data('link')!=undefined) {
1113            n.layeranim = true;
1114            n.actions = true;
1115         }
1116      })
1117
1118      // VIDEO EXTENSION
1119      if (!n.videos && (c.find('.rs-background-video-layer').length>
11190 || c.find(".tp-videolayer").length>0 || c.find(".tp-audiolayer").length>0 || c.find('iframe').length>0 || c.find('video').length>0))                 
1120         n.videos = true;
1121      
1122
1123      // VIDEO EXTENSION
1124      if (o.sliderType =="carousel")
1125         n.carousel = true;
1126
1127      
1128
1129      if (o.parallax.type!=="off" || o.viewPort.enable || o.viewPort.enable=="true" || o.scrolleffect.on==="true" || o.scrolleffect.on)
1130         n.parallax = true;
1131   }
1132   
1133   if (o.sliderType=="hero") {
1134      n.carousel = false;
1135      n.navigation = false;
1136   }
1137   
1138   if (window.location.href.match(/file:/gi)) {
1139      n.filesystem = true;
1140      o.filesystem = true;
1141   }
1142
1143   
1144   // LOAD THE NEEDED LIBRARIES
1145   if (n.videos && typeof _R.isVideoPlaying=='undefined') lAjax('revolution.extension.video',o);
1146   if (n.carousel && typeof _R.prepareCarousel=='undefined') lAjax('revolution.extension.carousel',o);                        
1147   if (!n.carousel && typeof _R.animateSlide=='undefined') lAjax('revolution.extension.slideanims',o);                        
1148   if (n.actions && typeof _R.checkActions=='undefined') lAjax('revolution.extension.actions',o);                 
1149   if (n.layeranim && typeof _R.handleStaticLayers=='undefined') lAjax('revolution.extension.layeranimation',o);                 
1150   if (n.kenburns && typeof _R.stopKenBurn=='undefined') lAjax('revolution.extension.kenburn',o); 
1151   if (n.navigation && typeof _R.createNavigation=='undefined') lAjax('revolution.extension.navigation',o);             
1152   if (n.migration && typeof _R.migration=='undefined') lAjax('revolution.extension.migration',o);             
1153   if (n.parallax && typeof _R.checkForParallax=='undefined') lAjax('revolution.extension.parallax',o);              
1154   
1155   if (o.addons!=undefined && o.addons.length>0) {    
1156      jQuery.each(o.addons, function(i,obj) {         
1157         if (typeof obj === "object" && obj.fileprefix!=undefined) 
1158            lAjax(obj.fileprefix,o);         
1159      })
1160   }
1161   
1162
1163   return n;
1164}
1165
1166///////////////////////////////////
1167//   -  WAIT FOR SCRIPT LOADS  - //
1168/////////////////////////////////// 
1169var waitForScripts = function(c,o) {
1170   // CHECK KEN BURN DEPENDENCIES
1171   var addonsloaded = true,
1172      n = o.scriptsneeded;
1173   
1174   // CHECK FOR ADDONS
1175   if (o.addons!=undefined && o.addons.length>0) {    
1176      jQuery.each(o.addons, function(i,obj) {         
1177         if (typeof obj === "object" && obj.init!=undefined) {          
1178            if (_R[obj.init]===undefined) addonsloaded = false;
1179         }
1180      })
1181   }
1182    
1183   if (n.filesystem || 
1184      (typeof punchgs !== 'undefined' &&
1185      (addonsloaded) &&
1186      (!n.kenburns || (n.kenburns && typeof _R.stopKenBurn !== 'undefined')) &&
1187      (!n.navigation || (n.navigation && typeof _R.createNavigation !== 'undefined')) &&
1188      (!n.carousel || (n.carousel && typeof _R.prepareCarousel !== 'undefined')) &&
1189      (!n.videos || (n.videos && typeof _R.resetVideo !== 'undefined')) &&
1190      (!n.actions || (n.actions && typeof _R.checkActions !== 'undefined')) &&
1191      (!n.layeranim || (n.layeranim && typeof _R.handleStaticLayers !== 'undefined')) &&
1192      (!n.migration || (n.migration && typeof _R.migration !== 'undefined')) &&
1193      (!n.parallax || (n.parallax && typeof _R.checkForParallax !== 'undefined')) &&
1194      (n.carousel || (!n.carousel && typeof _R.animateSlide !== 'undefined'))
1195      ))
1196      c.trigger("scriptsloaded");
1197   else        
1198      setTimeout(function() {
1199         waitForScripts(c,o);
1200      },50);
1201      
1202}
1203
1204//////////////////////////////////
1205// -  GET SCRIPT LOCATION  -  //
1206//////////////////////////////////
1207var getScriptLocation = function(a) {
1208
1209   var srcexp = new RegExp("themepunch.revolution.min.js","gi"),
1210      ret = "";
1211   jQuery("script").each(function() {
1212      var src = jQuery(this).attr("src");
1213      if (src && src.match(srcexp))                         
1214         ret = src;                    
1215   });
1216   
1217   ret = ret.replace('jquery.themepunch.revolution.min.js', ''); 
1218   ret = ret.replace('jquery.themepunch.revolution.js', '');   
1219   ret = ret.split("?")[0];      
1220   return ret;
1221}
1222
1223//////////////////////////////////////////
1224// -  ADVANCED RESPONSIVE LEVELS -  //
1225//////////////////////////////////////////
1226var setCurWinRange = function(opt,vis) {     
1227   var curlevel = 0,
1228      curwidth = 9999,
1229      lastmaxlevel = 0,
1230      lastmaxid = 0,
1231      curid = 0,
1232      winw = jQuery(window).width(),
1233      l = vis && opt.responsiveLevels==9999 ? opt.visibilityLevels : opt.responsiveLevels;
1234   
1235    if (l && l.length)
1236      jQuery.each(l,function(index,level) {           
1237         if (winw<level) {
1238            if (lastmaxlevel==0 || lastmaxlevel>level) {             
1239               curwidth = level;
1240               curid = index;
1241               lastmaxlevel = level;
1242            }
1243         }
1244      
1245      if (winw>level && lastmaxlevel<level) {
1246         lastmaxlevel = level;
1247         lastmaxid = index;
1248      }
1249   });
1250
1251   if (lastmaxlevel<curwidth) 
1252      curid = lastmaxid;      
1253
1254   
1255   if (!vis)
1256      opt.curWinRange = curid;            
1257   else
1258      opt.forcedWinRange = curid;
1259
1260   
1261}
1262
1263
1264
1265
1266//////////////////////////////////////////
1267// -  INITIALISATION OF OPTIONS  -  //
1268//////////////////////////////////////////
1269var prepareOptions = function(container,opt) {     
1270   opt.carousel.maxVisibleItems = opt.carousel.maxVisibleItems < 1 ? 999 : opt.carousel.maxVisibleItems; // === 1 ? 2 : opt.carousel.maxVisibleItems;
1271   opt.carousel.vertical_align = opt.carousel.vertical_align === "top" ? "0%" : opt.carousel.vertical_align==="bottom" ? "100%" : "50%";
1272}
1273
1274var gWiderOut = function(c,cl) {
1275   var r = 0;
1276   c.find(cl).each(function() {
1277      var a = jQuery(this);
1278      if (!a.hasClass("tp-forcenotvisible") && r<a.outerWidth())
1279         r = a.outerWidth();        
1280   });
1281   return r;
1282}
1283
1284
1285
1286
1287//////////////////////////////////////////
1288// -  INITIALISATION OF SLIDER   -  //
1289//////////////////////////////////////////
1290var initSlider = function (container,opt) {
1291   if (container==undefined) return false;
1292
1293   // CHECK FOR ALTERNATIVE IMAGE, AND IFRAM EXIST, AND WE ARE IN IE8, MOBILE, DRAW IT SIMPLE
1294   if (container.data('aimg')!=undefined) 
1295      if ((container.data('aie8')=="enabled" && _R.isIE(8)) || (container.data('amobile')=="enabled" && _ISM))
1296         container.html('<img class="tp-slider-alternative-image" src="'+container.data("aimg")+'">');
1297   
1298   // PREPRARE SOME CLASSES AND VARIABLES
1299   container.find('>ul').addClass("tp-revslider-mainul");
1300
1301   
1302   // CREATE SOME DEFAULT OPTIONS FOR LATER        
1303   opt.c=container;
1304   opt.ul = container.find('.tp-revslider-mainul');
1305
1306    // Remove Not Needed Slides for Mobile Devices
1307    opt.ul.find('>li').each(function(i) {
1308      var li = jQuery(this);     
1309      if (li.data('hideslideonmobile')=="on" && _ISM) li.remove();
1310      if (li.data('invisible') || li.data('invisible')===true) {
1311         li.addClass("tp-invisible-slide");
1312         li.appendTo(opt.ul);
1313      }
1314      });
1315
1316
1317      if (opt.addons!=undefined && opt.addons.length>0) {      
1318      jQuery.each(opt.addons, function(i,obj) {       
1319         if (typeof obj === "object" && obj.init!=undefined) {          
1320            _R[obj.init](eval(obj.params));
1321         }
1322      })
1323   }
1324
1325   
1326
1327   opt.cid = container.attr('id');
1328   opt.ul.css({visibility:"visible"});
1329    opt.slideamount = opt.ul.find('>li').not('.tp-invisible-slide').length;
1330    opt.realslideamount = opt.ul.find('>li').length;
1331    opt.slayers = container.find('.tp-static-layers');
1332    opt.slayers.data('index','staticlayers');
1333
1334    if (opt.waitForInit == true) 
1335      return;
1336    else {
1337      container[0].opt = opt;       
1338      runSlider(container,opt);
1339    }
1340
1341 }
1342
1343 var onFullScreenChange = function() {
1344          jQuery("body").data('rs-fullScreenMode',!jQuery("body").data('rs-fullScreenMode'));
1345           if (jQuery("body").data('rs-fullScreenMode')) {
1346              setTimeout(function() {
1347               jQuery(window).trigger("resize");
1348              },200);
1349           }
1350      }
1351
1352 var runSlider = function(container,opt) {
1353
1354
1355   opt.sliderisrunning = true;
1356    // Save Original Index of Slides
1357    opt.ul.find('>li').each(function(i) {
1358      jQuery(this).data('originalindex',i);
1359    });
1360   
1361   opt.allli = opt.ul.find('>li');
1362
1363    // RECORD THUMBS AND SET INDEXES
1364   jQuery.each(opt.allli,function(index,li) {
1365      var li = jQuery(li);
1366      li.data('origindex',li.index());
1367   });
1368
1369   opt.li = opt.ul.find('>li').not('.tp-invisible-slide');
1370
1371   // RANDOMIZE THE SLIDER SHUFFLE MODE
1372   if (opt.shuffle=="on") {      
1373      var fsa = new Object,
1374         fli = opt.ul.find('>li:first-child');
1375      fsa.fstransition = fli.data('fstransition');
1376      fsa.fsmasterspeed = fli.data('fsmasterspeed');
1377      fsa.fsslotamount = fli.data('fsslotamount');
1378
1379      for (var u=0;u<opt.slideamount;u++) {
1380         var it = Math.round(Math.random()*opt.slideamount);         
1381         opt.ul.find('>li:eq('+it+')').prependTo(opt.ul);         
1382      }
1383
1384      var newfli = opt.ul.find('>li:first-child');
1385      newfli.data('fstransition',fsa.fstransition);
1386      newfli.data('fsmasterspeed',fsa.fsmasterspeed);
1387      newfli.data('fsslotamount',fsa.fsslotamount);
1388
1389       // RECOLLECT ALL LI INTO AN ARRAY
1390      opt.allli = opt.ul.find('>li');
1391      opt.li = opt.ul.find('>li').not('.tp-invisible-slide');
1392   } 
1393
1394      
1395   opt.inli = opt.ul.find('>li.tp-invisible-slide');
1396
1397
1398   opt.thumbs = new Array();     
1399   
1400   opt.slots=4;
1401   opt.act=-1;             
1402   opt.firststart=1;
1403   opt.loadqueue = new Array();
1404   opt.syncload = 0;
1405   opt.conw = container.width();
1406   opt.conh = container.height();
1407
1408   if (opt.responsiveLevels.length>1) 
1409      opt.responsiveLevels[0] = 9999;
1410   else
1411      opt.responsiveLevels = 9999;
1412   
1413   
1414
1415   jQuery.each(opt.allli,function(index,li) {
1416      var li = jQuery(li),
1417         img = li.find('.rev-slidebg') || li.find('img').first(),
1418         i = 0;      
1419      
1420   
1421      li.addClass("tp-revslider-slidesli");
1422      if (li.data('index')===undefined) li.data('index','rs-'+Math.round(Math.random()*999999));
1423
1424      var obj = new Object;
1425      obj.params = new Array();
1426      
1427      obj.id = li.data('index');
1428      obj.src = li.data('thumb')!==undefined ? li.data('thumb') : img.data('lazyload') !== undefined ? img.data('lazyload') : img.attr('src');              
1429      if (li.data('title') !== undefined) obj.params.push({from:RegExp("\\{\\{title\\}\\}","g"), to:li.data("title")})     
1430      if (li.data('description') !== undefined) obj.params.push({from:RegExp("\\{\\{description\\}\\}","g"), to:li.data("description")})     
1431      for (var i=1;i<=10;i++) {
1432         if (li.data("param"+i)!==undefined) 
1433            obj.params.push({from:RegExp("\\{\\{param"+i+"\\}\\}","g"), to:li.data("param"+i)})
1434      }        
1435      opt.thumbs.push(obj);   
1436      
1437      // IF LINK ON SLIDE EXISTS, NEED TO CREATE A PROPER LAYER FOR IT.
1438      if (li.data('link')!=undefined) {
1439         var link = li.data('link'),
1440            target= li.data('target') || "_self",
1441            zindex= li.data('slideindex')==="back" ? 0 : 60,               
1442            linktoslide=li.data('linktoslide'),
1443            checksl = linktoslide;  
1444         
1445         if (linktoslide != undefined) 
1446            if (linktoslide!="next" && linktoslide!="prev")
1447               opt.allli.each(function() {
1448                  var t = jQuery(this);                  
1449                  if (t.data('origindex')+1==checksl) linktoslide = t.data('index');
1450               });
1451         
1452         
1453         if (link!="slide") linktoslide="no";
1454         
1455         var apptxt = '<div class="tp-caption slidelink" style="cursor:pointer;width:100%;height:100%;z-index:'+zindex+';" data-x="center" data-y="center" data-basealign="slide" ',
1456            jts = linktoslide==="scroll_under" ? '[{"event":"click","action":"scrollbelow","offset":"100px","delay":"0"}]' : 
1457                linktoslide==="prev" ? '[{"event":"click","action":"jumptoslide","slide":"prev","delay":"0.2"}]' : 
1458                linktoslide==="next" ? '[{"event":"click","action":"jumptoslide","slide":"next","delay":"0.2"}]' : '[{"event":"click","action":"jumptoslide","slide":"'+linktoslide+'","delay":"0.2"}]',
1459            frame = ' data-frames=' +"'" + '[{"delay":0,"speed":100,"frame":"0","from":"opacity:0;","to":"o:1;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;","ease":"Power3.easeInOut"}]'+"'";        
1460         apptxt = linktoslide=="no" ? apptxt + frame +' >' : apptxt + 'data-actions='+"'"+jts + "'"+frame+' >';
1461         apptxt = apptxt + '<a style="width:100%;height:100%;display:block"';             
1462         apptxt = link!="slide" ? apptxt + ' target="'+target+'" href="'+link+'"' : apptxt;
1463         apptxt = apptxt + '><span style="width:100%;height:100%;display:block"></span></a></div>';
1464         li.append(apptxt);
1465      }        
1466   });
1467
1468   
1469   // CREATE GRID WIDTH AND HEIGHT ARRAYS    
1470   opt.rle = opt.responsiveLevels.length || 1;
1471   opt.gridwidth = cArray(opt.gridwidth,opt.rle);
1472   opt.gridheight = cArray(opt.gridheight,opt.rle);                                                                                          
1473   // END OF VERSION 5.0 INIT MODIFICATION
1474
1475
1476
1477   // SIMPLIFY ANIMATIONS ON OLD IOS AND IE8 IF NEEDED
1478   if (opt.simplifyAll=="on" && (_R.isIE(8) || _R.iOSVersion())) {
1479      container.find('.tp-caption').each(function() {
1480         var tc = jQuery(this);
1481         tc.removeClass("customin customout").addClass("fadein fadeout");
1482         tc.data('splitin',"");
1483         tc.data('speed',400);
1484      })
1485      opt.allli.each(function() {
1486         var li= jQuery(this);            
1487         li.data('transition',"fade");
1488         li.data('masterspeed',500);
1489         li.data('slotamount',1);
1490         var img = li.find('.rev-slidebg') || li.find('>img').first();
1491         img.data('kenburns',"off");
1492      });
1493   }
1494
1495   opt.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i);
1496
1497   // SOME OPTIONS WHICH SHOULD CLOSE OUT SOME OTHER SETTINGS     
1498   opt.autoHeight = opt.sliderLayout=="fullscreen" ? "on" : opt.autoHeight;      
1499
1500   if (opt.sliderLayout=="fullwidth" && opt.autoHeight=="off") container.css({maxHeight:opt.gridheight[opt.curWinRange]+"px"});
1501   
1502   // BUILD A FORCE FULLWIDTH CONTAINER, TO SPAN THE FULL SLIDER TO THE FULL WIDTH OF BROWSER
1503   if (opt.sliderLayout!="auto" && container.closest('.forcefullwidth_wrapper_tp_banner').length==0) {
1504      if (opt.sliderLayout!=="fullscreen" || opt.fullScreenAutoWidth!="on") {       
1505         var cp = container.parent(),           
1506            mb = cp.css('marginBottom'),
1507            mt = cp.css('marginTop'),
1508            cid = container.attr('id')+"_forcefullwidth";
1509         mb = mb===undefined ? 0 : mb;
1510         mt = mt===undefined ? 0 : mt;
1511
1512         cp.wrap('<div class="forcefullwidth_wrapper_tp_banner" id="'+cid+'" style="position:relative;width:100%;height:auto;margin-top:'+mt+';margin-bottom:'+mb+'"></div>');
1513         container.closest('.forcefullwidth_wrapper_tp_banner').append('<div class="tp-fullwidth-forcer" style="width:100%;height:'+container.height()+'px"></div>');
1514         container.parent().css({marginTop:"0px",marginBottom:"0px"});
1515         //container.css({'backgroundColor':container.parent().css('backgroundColor'),'backgroundImage':container.parent().css('backgroundImage')});
1516         container.parent().css({position:'absolute'});                 
1517      }
1518   }
1519
1520
1521
1522   // SHADOW ADD ONS
1523   if (opt.shadow!==undefined && opt.shadow>0) {
1524      container.parent().addClass('tp-shadow'+opt.shadow);        
1525      container.parent().append('<div class="tp-shadowcover"></div>');
1526      container.parent().find('.tp-shadowcover').css({'backgroundColor':container.parent().css('backgroundColor'),'backgroundImage':container.parent().css('backgroundImage')});
1527   }
1528
1529   // ESTIMATE THE CURRENT WINDOWS RANGE INDEX
1530   setCurWinRange(opt);
1531   setCurWinRange(opt,true);
1532   
1533   // IF THE CONTAINER IS NOT YET INITIALISED, LETS GO FOR IT
1534   if (!container.hasClass("revslider-initialised")) {
1535      // MARK THAT THE CONTAINER IS INITIALISED WITH SLIDER REVOLUTION ALREADY
1536      container.addClass("revslider-initialised");
1537
1538      // FOR BETTER SELECTION, ADD SOME BASIC CLASS
1539      container.addClass("tp-simpleresponsive");      
1540      // WE DONT HAVE ANY ID YET ? WE NEED ONE ! LETS GIVE ONE RANDOMLY FOR RUNTIME
1541      if (container.attr('id')==undefined) {       
1542         container.attr('id',"revslider-"+Math.round(Math.random()*1000+5));        
1543      }
1544      checkIDS(opt,container);
1545      
1546      // CHECK IF FIREFOX 13 IS ON WAY.. IT HAS A STRANGE BUG, CSS ANIMATE SHOULD NOT BE USED
1547      opt.firefox13 = false;
1548      opt.ie = !jQuery.support.opacity;
1549      opt.ie9 = (document.documentMode == 9);
1550
1551      opt.origcd=opt.delay;
1552
1553
1554
1555      // CHECK THE jQUERY VERSION
1556      var version = jQuery.fn.jquery.split('.'),
1557         versionTop = parseFloat(version[0]),
1558         versionMinor = parseFloat(version[1]),
1559         versionIncrement = parseFloat(version[2] || '0');
1560      if (versionTop==1 && versionMinor < 7) 
1561         container.html('<div style="text-align:center; padding:40px 0px; font-size:20px; color:#992222;"> The Current Version of jQuery:'+version+' <br>Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin</div>');                         
1562      if (versionTop>1) opt.ie=false;
1563            
1564               
1565
1566      // PREPARE VIDEO PLAYERS
1567      var addedApis = new Object();       
1568      addedApis.addedyt=0;
1569      addedApis.addedvim=0;
1570      addedApis.addedvid=0;
1571
1572      //PREPARING FADE IN/OUT PARALLAX 
1573      if (opt.scrolleffect.on) 
1574         opt.scrolleffect.layers = new Array();    
1575      
1576      //WRAP LAYERS INTO 1 CONTAINER TO AVOID FURTHER ISSUES
1577      /*container.find('.tp-revslider-slidesli').each(function() {
1578         jQuery(this).find('.tp-caption').wrapAll('<div class="tp-layers-container"></div>');
1579      });*/
1580
1581      container.find('.tp-caption, .rs-background-video-layer').each(function(i) {
1582         var _nc = jQuery(this),
1583            _ = _nc.data(),
1584            an = _.autoplayonlyfirsttime,
1585            ap = _.autoplay,
1586            htmlvideo = _.videomp4!==undefined || _.videowebm!==undefined || _.videoogv!==undefined,
1587            al = _nc.hasClass("tp-audiolayer"),
1588            loop = _.videoloop,
1589            addtofadeout = true,
1590            addToStaticFadeout = false;
1591
1592
1593         _.startclasses = _nc.attr('class');
1594
1595         
1596         _.isparallaxlayer = _.startclasses.indexOf("rs-parallax")>=0;
1597         
1598
1599
1600         if (_nc.hasClass("tp-static-layer") && _R.handleStaticLayers) {
1601            _R.handleStaticLayers(_nc,opt);           
1602            if (opt.scrolleffect.on)
1603              if ((opt.scrolleffect.on_parallax_static_layers==="on" && _.isparallaxlayer) || (opt.scrolleffect.on_static_layers==="on" && !_.isparallaxlayer)) addToStaticFadeout = true;                             
1604            addtofadeout=false;           
1605         }
1606
1607         var pom = _nc.data('noposteronmobile') || _nc.data('noPosterOnMobile') ||  _nc.data('posteronmobile') || _nc.data('posterOnMobile') || _nc.data('posterOnMObile');
1608         _nc.data('noposteronmobile',pom);
1609
1610         // FIX VISIBLE IFRAME BUG IN SAFARI
1611         var iff = 0;
1612         _nc.find('iframe').each(function() {            
1613            punchgs.TweenLite.set(jQuery(this),{autoAlpha:0});
1614            iff++;
1615         })
1616         if (iff>0)
1617            _nc.data('iframes',true)
1618         
1619         if (_nc.hasClass("tp-caption")) {
1620            // PREPARE LAYERS AND WRAP THEM WITH PARALLAX, LOOP, MASK HELP CONTAINERS
1621            var ec = _nc.hasClass("slidelink") ? "width:100% !important;height:100% !important;" : "",
1622               _ndata = _nc.data(),
1623               specec = "",
1624               nctype = _ndata.type,
1625               _pos = nctype==="row" || nctype==="column" ? "relative" : "absolute",
1626               preclas = "";
1627
1628            if (nctype==="row") {
1629               _nc.addClass("rev_row").removeClass("tp-resizeme");
1630               preclas="rev_row_wrap";
1631            } else
1632            if (nctype==="column") {
1633               specec = _ndata.verticalalign === undefined ?  " vertical-align:bottom;"  : " vertical-align:"+_ndata.verticalalign+";";               
1634               preclas = "rev_column";
1635               _nc.addClass("rev_column_inner").removeClass("tp-resizeme");;
1636               _nc.data('width','auto');
1637               punchgs.TweenLite.set(_nc,{width:'auto'});               
1638            } else
1639            if (nctype==="group") {
1640               _nc.removeClass("tp-resizeme")
1641            }
1642            var dmode = "",
1643               preid = "";
1644            
1645            
1646            if (nctype!=="row" && nctype!=="group" && nctype!=="column"){
1647               dmode = "display:"+_nc.css('display')+";";
1648               if (_nc.closest('.rev_column').length>0) {
1649                  _nc.addClass("rev_layer_in_column");
1650                  addtofadeout=false;
1651               } else 
1652               if (_nc.closest('.rev_group').length>0) {
1653                  _nc.addClass("rev_layer_in_group");
1654                  addtofadeout=false;
1655               }
1656               
1657               
1658            } else 
1659            if (nctype==="column") addtofadeout = false;
1660               
1661
1662            if (_ndata.wrapper_class!==undefined) preclas = preclas+" "+_ndata.wrapper_class;
1663            if (_ndata.wrapper_id!==undefined) preid ='id="'+_ndata.wrapper_id+'"';
1664            
1665            // POINTER EVENTS ADDITION
1666            var pevents = '';
1667            if(_nc.hasClass('tp-no-events')) pevents = ';pointer-events:none';
1668            _nc.wrap('<div '+preid+' class="tp-parallax-wrap '+preclas+'" style="'+specec+' '+ec+'position:'+_pos+';'+dmode+';visibility:hidden'+pevents+'"><div class="tp-loop-wrap" style="'+ec+'position:'+_pos+';'+dmode+';"><div class="tp-mask-wrap" style="'+ec+'position:'+_pos+';'+dmode+';" ></div></div></div>');
1669            
1670            // ONLY ADD LAYERS TO FADEOUT DYNAMIC LIST WHC
1671            if (addtofadeout && opt.scrolleffect.on) 
1672               if ((opt.scrolleffect.on_parallax_layers==="on" && _.isparallaxlayer) || (
1672opt.scrolleffect.on_layers==="on" && !_.isparallaxlayer))
1673                  opt.scrolleffect.layers.push(_nc.parent());                          
1674            if (addToStaticFadeout) opt.scrolleffect.layers.push(_nc.parent());
1675
1676            
1677            // Add BG for Columns
1678            if (nctype==="column") {
1679               _nc.append('<div class="rev_column_bg rev_column_bg_man_sized" style="visibility:hidden"></div>');
1680               _nc.closest('.tp-parallax-wrap').append('<div class="rev_column_bg rev_column_bg_auto_sized"></div>');
1681            }
1682
1683            var lar = ['pendulum', 'rotate','slideloop','pulse','wave'],
1684               _lc = _nc.closest('.tp-loop-wrap');
1685            
1686            jQuery.each(lar,function(i,k) {  
1687               var lw = _nc.find('.rs-'+k),
1688                  f = lw.data() || "";
1689               if (f!="") {         
1690                  _lc.data(f);
1691                  _lc.addClass("rs-"+k);                          
1692                  lw.children(0).unwrap();
1693                  _nc.data('loopanimation',"on");
1694               }
1695            });   
1696            if (_nc.attr('id')===undefined) 
1697               _nc.attr('id','layer-'+Math.round(Math.random()*999999999));
1698            checkIDS(opt,_nc);
1699            punchgs.TweenLite.set(_nc,{visibility:"hidden"});
1700         }
1701
1702         var as = _nc.data('actions');
1703         if (as!==undefined) _R.checkActions(_nc,opt,as);
1704
1705         checkHoverDependencies(_nc,opt);
1706
1707         if (_R.checkVideoApis)
1708            addedApis = _R.checkVideoApis(_nc,opt,addedApis);
1709
1710         // REMOVE VIDEO AUTOPLAYS FOR MOBILE DEVICES 
1711         /*
1712         if (_ISM && (!opt.fallbacks.allowHTML5AutoPlayOnAndroid || !htmlvideo)) {
1713            if (an == true || an=="true") {
1714                  _.autoplayonlyfirsttime=false;
1715                  an=false;
1716            }
1717            if (ap==true || ap=="true" || ap=="on" || ap=="1sttime") {
1718                _.autoplay="off";
1719                ap="off";
1720            }
1721         } 
1722         */
1723
1724         //loop =  loop=="none" && _nc.hasClass('rs-background-video-layer') ?  "loopandnoslidestop" : loop;
1725
1726         
1727         
1728
1729         // PREPARE TIMER BEHAVIOUR BASED ON AUTO PLAYED VIDEOS IN SLIDES
1730         if (!al && (an == true || an=="true" || ap == "1sttime") && loop !="loopandnoslidestop") 
1731            _nc.closest('li.tp-revslider-slidesli').addClass("rs-pause-timer-once");
1732            
1733         
1734         if (!al && (ap==true || ap=="true" || ap == "on" || ap == "no1sttime") && loop !="loopandnoslidestop")  
1735            _nc.closest('li.tp-revslider-slidesli').addClass("rs-pause-timer-always");
1736            
1737            
1738      });
1739      
1740      container[0].addEventListener('mouseenter',function() {           
1741         container.trigger('tp-mouseenter');                            
1742         opt.overcontainer=true;
1743      },{passive:true});
1744
1745      container[0].addEventListener('mouseover',function() {                                    
1746         container.trigger('tp-mouseover');
1747         opt.overcontainer=true;
1748      },{passive:true});
1749
1750      container[0].addEventListener('mouseleave',function() {           
1751         container.trigger('tp-mouseleft');                                   
1752         opt.overcontainer=false;
1753      },{passive:true});
1754
1755      // REMOVE ANY VIDEO JS SETTINGS OF THE VIDEO  IF NEEDED  (OLD FALL BACK, AND HELP FOR 3THD PARTY PLUGIN CONFLICTS)
1756      container.find('.tp-caption video').each(function(i) {
1757         var v = jQuery(this);
1758         v.removeClass("video-js vjs-default-skin");
1759         v.attr("preload","");
1760         v.css({display:"none"});
1761      });
1762
1763      //PREPARE LOADINGS ALL IN SEQUENCE
1764      if (opt.sliderType!=="standard") opt.lazyType = "all";
1765      
1766      
1767      // PRELOAD STATIC LAYERS         
1768      loadImages(container.find('.tp-static-layers'),opt,0,true);
1769
1770      waitForCurrentImages(container.find('.tp-static-layers'),opt,function() {
1771         container.find('.tp-static-layers img').each(function() {                        
1772            var e = jQuery(this),
1773               src = e.data('lazyload') != undefined ? e.data('lazyload') : e.attr('src'),
1774               loadobj = getLoadObj(opt,src);                        
1775            e.attr('src',loadobj.src)           
1776         })
1777      });
1778
1779      opt.rowzones = [];
1780
1781      // SET ALL LI AN INDEX AND INIT LAZY LOADING
1782      opt.allli.each(function(i) {
1783         var li = jQuery(this);
1784         punchgs.TweenLite.set(this,{perspective:6000}); //PERSPECTIVE
1785         opt.rowzones[i] = [];
1786         li.find('.rev_row_zone').each(function() {
1787            opt.rowzones[i].push(jQuery(this));
1788         })
1789
1790         if (opt.lazyType=="all" || (opt.lazyType=="smart" && (i==0 || i == 1 || i == opt.slideamount || i == opt.slideamount-1))) {                        
1791            loadImages(li,opt,i);   
1792            waitForCurrentImages(li,opt,function() { 
1793               //if (opt.sliderType=="carousel") 
1794                  //punchgs.TweenLite.to(li,1,{autoAlpha:1,ease:punchgs.Power3.easeInOut});
1795            });               
1796         }
1797
1798      });
1799
1800      
1801
1802      // IF DEEPLINK HAS BEEN SET
1803      var deeplink = getUrlVars("#")[0];
1804      if (deeplink.length<9) {
1805         if (deeplink.split('slide').length>1) {
1806            var dslide=parseInt(deeplink.split('slide')[1],0);
1807            if (dslide<1) dslide=1;
1808            if (dslide>opt.slideamount) dslide=opt.slideamount;
1809            opt.startWithSlide=dslide-1;
1810         }
1811      }
1812      
1813      // PREPARE THE SPINNER
1814      container.append( '<div class="tp-loader '+opt.spinner+'">'+
1815                     '<div class="dot1"></div>'+
1816                      '<div class="dot2"></div>'+
1817                      '<div class="bounce1"></div>'+
1818                     '<div class="bounce2"></div>'+
1819                     '<div class="bounce3"></div>'+
1820                   '</div>');
1821      opt.loader = container.find('.tp-loader');
1822
1823      // RESET THE TIMER
1824      if (container.find('.tp-bannertimer').length===0) container.append('<div class="tp-bannertimer" style="visibility:hidden"></div>');
1825      container.find('.tp-bannertimer').css({'width':'0%'});
1826      
1827
1828      
1829      // PREPARE THE SLIDES
1830      opt.ul.css({'display':'block'});
1831      prepareSlides(container,opt);
1832      if ((opt.parallax.type!=="off" || opt.scrolleffect.on) && _R.checkForParallax) _R.checkForParallax(container,opt);
1833
1834      
1835      // PREPARE SLIDER SIZE        
1836      _R.setSize(opt);
1837      
1838
1839      // Call the Navigation Builder
1840      if (opt.sliderType!=="hero" && _R.createNavigation) _R.createNavigation(container,opt);
1841      if (_R.resizeThumbsTabs && _R.resizeThumbsTabs) _R.resizeThumbsTabs(opt);
1842      contWidthManager(opt);
1843      var _v = opt.viewPort;
1844      opt.inviewport = false;
1845      
1846      if (_v !=undefined && _v.enable) {
1847         if (!jQuery.isNumeric(_v.visible_area))
1848          if (_v.visible_area.indexOf('%')!==-1) 
1849            _v.visible_area = parseInt(_v.visible_area)/100;
1850            
1851         if (_R.scrollTicker) _R.scrollTicker(opt,container);
1852      }
1853      // MAKE SURE CAROUSEL IS NOT YET VISIBE BEFORE IT COMES INTO GAME
1854      if (opt.sliderType==="carousel" && _R.prepareCarousel) {
1855         punchgs.TweenLite.set(opt.ul,{opacity:0});
1856         _R.prepareCarousel(opt,new punchgs.TimelineLite,undefined,0);
1857         opt.onlyPreparedSlide = true;
1858      }
1859      
1860
1861
1862      // START THE SLIDER
1863      setTimeout(function() {
1864          
1865         if (!_v.enable || (_v.enable && opt.inviewport) || (_v.enable &&  !opt.inviewport && !_v.outof=="wait")) 
1866            swapSlide(container);                              
1867         else {      
1868            opt.c.addClass("tp-waitforfirststart");                  
1869            opt.waitForFirstSlide = true;
1870            if (_v.presize) {
1871               var nextli = jQuery(opt.li[0]);
1872               // PRELOAD STATIC LAYERS         
1873                  loadImages(nextli,opt,0,true);
1874                  waitForCurrentImages(nextli.find('.tp-layers'),opt,function() {                     
1875                     _R.animateTheCaptions({slide:nextli,opt:opt, preset:true});                   
1876                  })
1877            }
1878               
1879            
1880         }
1881
1882         if (_R.manageNavigation) _R.manageNavigation(opt); 
1883
1884
1885         // START COUNTDOWN
1886         if (opt.slideamount>1) {
1887            if (!_v.enable || (_v.enable && opt.inviewport)) 
1888               countDown(container,opt);
1889            else
1890               opt.waitForCountDown = true;
1891         }
1892         setTimeout(function() {             
1893            container.trigger('revolution.slide.onloaded');             
1894         },100);
1895      },opt.startDelay);
1896      opt.startDelay=0;
1897
1898      
1899
1900      /******************************
1901         -  FULLSCREEN CHANGE -
1902      ********************************/
1903      // FULLSCREEN MODE TESTING
1904      jQuery("body").data('rs-fullScreenMode',false);
1905
1906      
1907      window.addEventListener('fullscreenchange',onFullScreenChange,{passive:true});
1908      window.addEventListener('mozfullscreenchange',onFullScreenChange,{passive:true});
1909      window.addEventListener('webkitfullscreenchange',onFullScreenChange,{passive:true});
1910
1911      
1912
1913      var resizid = "resize.revslider-"+container.attr('id');
1914
1915      // IF RESIZED, NEED TO STOP ACTUAL TRANSITION AND RESIZE ACTUAL IMAGES
1916      jQuery(window).on(resizid,function() {
1917         
1918         if (container==undefined) return false;
1919         
1920         if (jQuery('body').find(container)!=0)             
1921            contWidthManager(opt);                    
1922            
1923            var hchange = false;
1924
1925            if (opt.sliderLayout=="fullscreen") {
1926               var jwh = jQuery(window).height();
1927               if ((opt.fallbacks.ignoreHeightChanges=="mobile" && _ISM) || opt.fallbacks.ignoreHeightChanges=="always") {
1928                  opt.fallbacks.ignoreHeightChangesSize = opt.fallbacks.ignoreHeightChangesSize == undefined ? 0 : opt.fallbacks.ignoreHeightChangesSize;
1929                  hchange = (jwh!=opt.lastwindowheight) && (Math.abs(jwh-opt.lastwindowheight) > opt.fallbacks.ignoreHeightChangesSize)                     
1930               } else {
1931                  hchange = (jwh!=opt.lastwindowheight) 
1932               }
1933            }
1934            
1935   
1936            if (container.outerWidth(true)!=opt.width || container.is(":hidden") || (hchange)) {
1937                  opt.lastwindowheight = jQuery(window).height();
1938                  containerResized(container,opt);
1939            }
1940
1941
1942      });
1943      
1944      hideSliderUnder(container,opt);  
1945      contWidthManager(opt);     
1946      if (!opt.fallbacks.disableFocusListener && opt.fallbacks.disableFocusListener != "true" && opt.fallbacks.disableFocusListener !== true) {
1947         container.addClass("rev_redraw_on_blurfocus");
1948         tabBlurringCheck();
1949      }
1950   }
1951}
1952
1953/*************************************
1954   -   CREATE SIMPLE ARRAYS   -
1955**************************************/
1956var cArray = function(b,l) {     
1957   if (!jQuery.isArray(b)) {
1958      var t = b;
1959      b = new Array();
1960      b.push(t);
1961   }     
1962   if (b.length<l) {       
1963      var t = b[b.length-1];
1964      for (var i=0;i<(l-b.length)+2;i++)
1965         b.push(t)
1966   }     
1967   return b;
1968}
1969
1970
1971
1972var checkHoverDependencies = function(_nc,opt) {   
1973   var _ = _nc.data(),
1974      senter = _.start==="sliderenter" || (_.frames!==undefined && _.frames[0]!=undefined && _.frames[0].delay==="sliderenter") ? true : false;
1975
1976   if (senter) {     
1977      if (opt.layersonhover===undefined) {            
1978         opt.c.on('tp-mouseenter',function() {           
1979            if (opt.layersonhover)              
1980               jQuery.each(opt.layersonhover,function(i,tnc) {    
1981                  
1982                  var cli = tnc.data('closestli') || tnc.closest('.tp-revslider-slidesli'),
1983                     stl = tnc.data('staticli') || tnc.closest('.tp-static-layers');   
1984
1985                  if (tnc.data('closestli')===undefined) {
1986                        tnc.data('closestli',cli);
1987                        tnc.data('staticli',stl);
1988                  }  
1989                  
1990                  if ((cli.length>0 && (cli.hasClass("active-revslide")) || cli.hasClass("processing-revslide")) || (stl.length>0)) {
1991                     tnc.data('animdirection',"in");
1992                     
1993                     if (_R.playAnimationFrame)       
1994                        _R.playAnimationFrame({caption:tnc,opt:opt,frame:"frame_0", triggerdirection:"in", triggerframein:"frame_0", triggerframeout:"frame_999"});
1995                     tnc.data('triggerstate',"on");                                                                                                                  
1996                  }
1997               });
1998         });
1999         opt.c.on('tp-mouseleft',function() {
2000            if (opt.layersonhover)
2001               jQuery.each(opt.layersonhover,function(i,tnc) {
2002                  tnc.data('animdirection',"out");
2003                  tnc.data('triggered',true);
2004                  tnc.data('triggerstate',"off");
2005                  if (_R.stopVideo) _R.stopVideo(tnc,opt);                                   
2006                  if (_R.playAnimationFrame) _R.playAnimationFrame({caption:tnc,opt:opt,frame:"frame_999", triggerdirection:"out", triggerframein:"frame_0", triggerframeout:"frame_999"});  
2007               });
2008         });         
2009         opt.layersonhover = new Array;
2010      }           
2011      opt.layersonhover.push(_nc);
2012   }
2013}
2014
2015
2016
2017var contWidthManager = function(opt) {    
2018   var rl = _R.getHorizontalOffset(opt.c,"left");
2019
2020   if (opt.sliderLayout!="auto" && (opt.sliderLayout!=="fullscreen" || opt.fullScreenAutoWidth!="on")) {    
2021      var loff = Math.ceil(opt.c.closest('.forcefullwidth_wrapper_tp_banner').offset().left - rl);                                              
2022      punchgs.TweenLite.set(opt.c.parent(),{'left':(0-loff)+"px",'width':jQuery(window).width()-_R.getHorizontalOffset(opt.c,"both")});      
2023   } else {    
2024      if (opt.sliderLayout=="fullscreen" && opt.fullScreenAutoWidth=="on")
2025         punchgs.TweenLite.set(opt.ul,{left:0,width:opt.c.width()});    
2026      else
2027         punchgs.TweenLite.set(opt.ul,{left:rl,width:opt.c.width()-_R.getHorizontalOffset(opt.c,"both")});     
2028   }  
2029
2030
2031   // put Static Layer Wrapper in Position   
2032   if (opt.slayers && (opt.sliderLayout!="fullwidth" && opt.sliderLayout!="fullscreen"))
2033      punchgs.TweenLite.set(opt.slayers,{left:rl});
2034}
2035
2036
2037var cv = function(a,d) {
2038   return a===undefined ? d : a;
2039}
2040
2041
2042var hideSliderUnder = function(container,opt,resized) {
2043   // FIRST TIME STOP/START HIDE / SHOW SLIDER
2044   //REMOVE AND SHOW SLIDER ON DEMAND
2045   var contpar= container.parent();
2046   if (jQuery(window).width()<opt.hideSliderAtLimit) {
2047      container.trigger('stoptimer');
2048      if (contpar.css('display')!="none")
2049         contpar.data('olddisplay',contpar.css('display'));
2050      contpar.css({display:"none"});
2051   } else {
2052      if (container.is(":hidden") && resized) {
2053         if (contpar.data('olddisplay')!=undefined && contpar.data('olddisplay')!="undefined" && contpar.data('olddisplay') != "none")
2054            contpar.css({display:contpar.data('olddisplay')});
2055         else
2056            contpar.css({display:"block"});
2057         container.trigger('restarttimer');
2058         setTimeout(function() {
2059            containerResized(container,opt);
2060         },150)
2061      }
2062   }
2063   if (_R.hideUnHideNav) _R.hideUnHideNav(opt); 
2064}
2065
2066
2067//////////////////////////
2068// CONTAINER RESIZED //
2069/////////////////////////
2070var containerResized = function (c,opt) { 
2071
2072   c.trigger('revolution.slide.beforeredraw');                    
2073   if (opt.infullscreenmode == true)
2074      opt.minHeight = jQuery(window).height();                    
2075      
2076   setCurWinRange(opt);
2077   setCurWinRange(opt,true);
2078   if (!_R.resizeThumbsTabs || _R.resizeThumbsTabs(opt)===true) {
2079      
2080      hideSliderUnder(c,opt,true);
2081      contWidthManager(opt);
2082      
2083      if ( opt.sliderType =="carousel") _R.prepareCarousel(opt,true);      
2084
2085      if (c===undefined) return false;
2086                        
2087      _R.setSize(opt);
2088      
2089      opt.conw = opt.c.width();
2090      opt.conh = opt.infullscreenmode ? opt.minHeight : opt.c.height();
2091   
2092      var actsh = c.find('.active-revslide .slotholder'),
2093         nextsh = c.find('.processing-revslide .slotholder');
2094      
2095      removeSlots(c,opt,c,2);
2096
2097      if (opt.sliderType==="standard") {
2098         punchgs.TweenLite.set(nextsh.find('.defaultimg'),{opacity:0}
2098);    
2099         actsh.find('.defaultimg').css({'opacity':1});
2100      } 
2101
2102      
2103      if ( opt.sliderType==="carousel" && opt.lastconw != opt.conw)  {
2104         clearTimeout(opt.pcartimer);
2105         opt.pcartimer = setTimeout(function() {
2106            _R.prepareCarousel(opt,true);                      
2107            // SHOW ALL LAYERS IN ALL SLIDES FOR CAROUSEL
2108            if (opt.sliderType=="carousel" && opt.carousel.showLayersAllTime==="on")
2109               jQuery.each(opt.li,function(i) {             
2110                  _R.animateTheCaptions({slide:jQuery(opt.li[i]), opt:opt,recall:true});
2111               })             
2112
2113         },100);
2114         opt.lastconw = opt.conw;
2115      }
2116
2117      
2118      if (_R.manageNavigation) _R.manageNavigation(opt);
2119
2120      
2121      if (_R.animateTheCaptions && c.find('.active-revslide').length>0)
2122         _R.animateTheCaptions({slide:c.find('.active-revslide'), opt:opt,recall:true});
2123
2124      if (nextsh.data('kenburns')=="on")           
2125         _R.startKenBurn(nextsh,opt,(nextsh.data('kbtl')!==undefined ? nextsh.data('kbtl').progress() : 0));
2126
2127      if (actsh.data('kenburns')=="on")            
2128         _R.startKenBurn(actsh,opt,(actsh.data('kbtl')!==undefined ? actsh.data('kbtl').progress() : 0));
2129
2130      // DOUBLE CALL FOR SOME FUNCTION TO AVOID PORTRAIT/LANDSCAPE ISSUES, AND TO AVOID FULLSCREEN/NORMAL SWAP ISSUES
2131      if (_R.animateTheCaptions && c.find('.processing-revslide').length>0)  _R.animateTheCaptions({slide:c.find('.processing-revslide'), opt:opt,recall:true});
2132      if (_R.manageNavigation) _R.manageNavigation(opt);
2133
2134   }  
2135
2136   c.trigger('revolution.slide.afterdraw');
2137}
2138
2139   
2140   
2141   
2142   
2143
2144////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2145///////////////////////////////////////////////////////////////////////////////       PREPARING / REMOVING     //////
2145//////////////////////////////////////////////////
2146////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   
2147var setScale = function(opt) {
2148   opt.bw = (opt.width / opt.gridwidth[opt.curWinRange]);
2149   opt.bh = (opt.height / opt.gridheight[opt.curWinRange]);
2150      
2151   if (opt.bh>opt.bw) 
2152      opt.bh=opt.bw
2153   else
2154      opt.bw = opt.bh;
2155   
2156   if (opt.bh>1 || opt.bw>1) { opt.bw=1; opt.bh=1; }
2157}
2158
2159   
2160
2161
2162
2163/////////////////////////////////////////
2164// -  PREPARE THE SLIDES / SLOTS -  //
2165///////////////////////////////////////
2166var prepareSlides = function(container,opt) {
2167
2168   container.find('.tp-caption').each(function() { 
2169      var c = jQuery(this);
2170      if (c.data('transition')!==undefined) c.addClass(c.data('transition')); 
2171   });
2172
2173   // PREPARE THE UL CONTAINER TO HAVEING MAX HEIGHT AND HEIGHT FOR ANY SITUATION
2174   opt.ul.css({overflow:'hidden',width:'100%',height:'100%',maxHeight:container.parent().css('maxHeight')})
2175   if (opt.autoHeight=="on") {
2176      opt.ul.css({overflow:'hidden',width:'100%',height:'100%',maxHeight:"none"});
2177      container.css({'maxHeight':'none'});
2178      container.parent().css({'maxHeight':'none'});
2179    }
2180   //_R.setSize("",opt);
2181   opt.allli.each(function(j) {
2182      var li=jQuery(this),
2183         originalIndex = li.data('originalindex');
2184               
2185      //START WITH CORRECT SLIDE
2186      if ((opt.startWithSlide !=undefined && originalIndex==opt.startWithSlide) || opt.startWithSlide ===undefined && j==0)
2187         li.addClass("next-revslide");
2188      
2189
2190      // MAKE LI OVERFLOW HIDDEN FOR FURTHER ISSUES
2191      li.css({'width':'100%','height':'100%','overflow':'hidden'});
2192               
2193   });
2194
2195   if (opt.sliderType === "carousel") {
2196      //SET CAROUSEL          
2197      opt.ul.css({overflow:"visible"}).wrap('<div class="tp-carousel-wrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden;"></div>');
2198      var apt = '<div style="clear:both;display:block;width:100%;height:1px;position:relative;margin-bottom:-1px"></div>';
2199      opt.c.parent().prepend(apt);
2200      opt.c.parent().append(apt);
2201      _R.prepareCarousel(opt);            
2202   }
2203
2204   // RESOLVE OVERFLOW HIDDEN OF MAIN CONTAINER
2205   container.parent().css({'overflow':'visible'});
2206    
2207   opt.allli.find('>img').each(function(j) {
2208
2209      var img=jQuery(this),
2210         cli = img.closest('li'),
2211         bgvid = cli.find('.rs-background-video-layer');
2212
2213      bgvid.addClass("defaultvid").css({zIndex:30});
2214
2215
2216
2217      img.addClass('defaultimg');            
2218                  
2219      // TURN OF KEN BURNS IF WE ARE ON MOBILE AND IT IS WISHED SO
2220      if (opt.fallbacks.panZoomDisableOnMobile == "on"  && _ISM) {
2221         img.data('kenburns',"off");
2222         img.data('bgfit',"cover");
2223      }
2224
2225      var mediafilter = cli.data('mediafilter');
2226      mediafilter = mediafilter==="none" || mediafilter===undefined ? "" : mediafilter;
2227      img.wrap('<div class="slotholder" style="position:absolute; top:0px; left:0px; z-index:0;width:100%;height:100%;"></div>');
2228      bgvid.appendTo(cli.find('.slotholder'));
2229      var dts = img.data();
2230      img.closest('.slotholder').data(dts);
2231                           
2232      if (bgvid.length>0 && dts.bgparallax!=undefined) {
2233         bgvid.data('bgparallax',dts.bgparallax);
2234         bgvid.data('showcoveronpause',"on");
2235      }
2236
2237      if (opt.dottedOverlay!="none" && opt.dottedOverlay!=undefined)
2238            img.closest('.slotholder').append('<div class="tp-dottedoverlay '+opt.dottedOverlay+'"></div>');
2239
2240      var src=img.attr('src');      
2241      dts.src = src;    
2242      dts.bgfit = dts.bgfit || "cover";
2243      dts.bgrepeat = dts.bgrepeat || "no-repeat",
2244      dts.bgposition = dts.bgposition || "center center";
2245
2246      var pari = img.closest('.slotholder'),
2247         bgcolor = img.data('bgcolor'),
2248         bgstyle="";
2249      
2250      if (bgcolor!==undefined && bgcolor.indexOf('gradient')>=0) 
2251         bgstyle='"background:'+bgcolor+';width:100%;height:100%;"';
2252      else 
2253         bgstyle='"background-color:'+bgcolor+';background-repeat:'+dts.bgrepeat+';background-image:url('+src+');background-size:'+dts.bgfit+';background-position:'+dts.bgposition+';width:100%;height:100%;"';     
2254      img.data('mediafilter',mediafilter)
2255      mediafilter = img.data("kenburns")==="on" ? "" : mediafilter;
2256      var newimg = jQuery('<div class="tp-bgimg defaultimg '+mediafilter+'" data-bgcolor="'+bgcolor+'" style='+bgstyle+'></div>')      
2257      img.parent().append(newimg);
2258      
2259      var comment = document.createComment("Runtime Modification - Img tag is Still Available for SEO Goals in Source - " + img.get(0).outerHTML);
2260      img.replaceWith(comment);
2261      
2262
2263      newimg.data(dts);
2264      newimg.attr("src",src);
2265
2266      if (opt.sliderType === "standard" || opt.sliderType==="undefined")            
2267         newimg.css({'opacity':0});
2268   
2269   })
2270
2271   if (opt.scrolleffect.on &&  opt.scrolleffect.on_slidebg==="on") {
2272      opt.allslotholder = new Array();
2273      opt.allli.find('.slotholder').each(function() {
2274         jQuery(this).wrap('<div style="display:block;position:absolute;top:0px;left:0px;width:100%;height:100%" class="slotholder_fadeoutwrap"></div>')       
2275      });
2276      opt.allslotholder = opt.c.find('.slotholder_fadeoutwrap');
2277   }
2278}
2279
2280
2281// REMOVE SLOTS   //
2282var removeSlots = function(container,opt,where,addon) {
2283   opt.removePrepare = opt.removePrepare + addon;
2284   where.find('.slot, .slot-circle-wrapper').each(function() {
2285      jQuery(this).remove();
2286   });   
2287   opt.transition = 0;  
2288   opt.removePrepare = 0;  
2289}
2290
2291
2292////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2293///////////////////////////////////////////////////////////////////////////////       SLIDE SWAPS        ////////////////////////////////////////////////////////////
2294////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   
2295
2296
2297// THE IMAGE IS LOADED, WIDTH, HEIGHT CAN BE SAVED
2298var cutParams = function(a) {
2299   var b = a;
2300   if (a!=undefined && a.length>0)
2301      b = a.split("?")[0];
2302   return b;
2303}
2304
2305var relativeRedir = function(redir){
2306  return location.pathname.replace(/(.*)\/[^/]*/, "$1/"+redir);
2307}
2308
2309var abstorel = function (base, relative) {
2310    var stack = base.split("/"),
2311        parts = relative.split("/");
2312    stack.pop(); // remove current file name (or empty string)
2313                 // (omit if "base" is the current folder without trailing slash)
2314    for (var i=0; i<parts.length; i++) {
2315        if (parts[i] == ".")
2316            continue;
2317        if (parts[i] == "..")
2318            stack.pop();
2319        else
2320            stack.push(parts[i]);
2321    }
2322    return stack.join("/");
2323}
2324
2325var imgLoaded = function(img,opt,progress) {
2326   opt.syncload--;   
2327   if (opt.loadqueue)
2328      jQuery.each(opt.loadqueue, function(index,queue) {    
2329
2330         var mqsrc = queue.src.replace(/\.\.\/\.\.\//gi,""),
2331            fullsrc = self.location.href,
2332            origin = document.location.origin,
2333            fullsrc_b = fullsrc.substring(0,fullsrc.length-1)+"/"+mqsrc,
2334            origin_b = origin+"/"+mqsrc,
2335            absolute = abstorel(self.location.href,queue.src);
2336                  
2337         fullsrc = fullsrc.substring(0,fullsrc.length-1)+mqsrc;                  
2338         origin = origin+mqsrc;
2339                  
2340         if (cutParams(origin) === cutParams(decodeURIComponent(img.src)) || 
2341            cutParams(fullsrc)=== cutParams(decodeURIComponent(img.src)) || 
2342            cutParams(absolute)=== cutParams(decodeURIComponent(img.src)) || 
2343            cutParams(origin_b) === cutParams(decodeURIComponent(img.src)) || 
2344            cutParams(fullsrc_b)=== cutParams(decodeURIComponent(img.src)) || 
2345            cutParams(queue.src) === cutParams(decodeURIComponent(img.src)) || 
2346            cutParams(queue.src).replace(/^.*\/\/[^\/]+/, '') === cutParams(decodeURIComponent(img.src)).replace(/^.*\/\/[^\/]+/, '') || 
2347            (window.location.origin==="file://" && cutParams(img.src).match(new RegExp(mqsrc)))) {                                                 
2348               queue.progress = progress;
2349               queue.width = img.width;
2350               queue.height = img.height;
2351         } 
2352      });      
2353   progressImageLoad(opt);
2354}
2355
2356// PRELOAD IMAGES 3 PIECES ON ONE GO, CHECK LOAD PRIORITY
2357var progressImageLoad = function(opt) {      
2358   if (opt.syncload == 3) return;
2359   if (opt.loadqueue)
2360      jQuery.each(opt.loadqueue, function(index,queue) { 
2361         if (queue.progress.match(/prepared/g)) {           
2362             if (opt.syncload<=3) {             
2363               opt.syncload++;   
2364               if (queue.type=="img") {            
2365                  var img = new Image();
2366                  
2367                  img.onload = function() {                                
2368                     imgLoaded(this,opt,"loaded");
2369                     queue.error = false;          
2370                  };
2371                  img.onerror = function() {
2372                     imgLoaded(this,opt,"failed");             
2373                     queue.error = true;
2374                  };    
2375                  
2376                  img.src=queue.src;
2377               } else {
2378                  jQuery.get(queue.src, function(data) {                  
2379                    queue.innerHTML = new XMLSerializer().serializeToString(data.documentElement);                  
2380                    queue.progress="loaded";
2381                    opt.syncload--;
2382                    progressImageLoad(opt);
2383                  }).fail(function() {                   
2384                    queue.progress="failed";
2385                    opt.syncload--;
2386                    progressImageLoad(opt);
2387                  });
2388               }
2389               queue.progress="inload";
2390            }
2391         }           
2392      });
2393}
2394
2395
2396
2397// ADD TO QUEUE THE NOT LOADED IMAGES YES
2398var addToLoadQueue = function(src,opt,prio,type,staticlayer) {    
2399   var alreadyexist = false;  
2400   if (opt.loadqueue)   
2401      jQuery.each(opt.loadqueue, function(index,queue) {       
2402         if (queue.src === src) alreadyexist = true;
2403      });
2404      
2405   if (!alreadyexist) {    
2406         var loadobj = new Object();         
2407         loadobj.src = src;
2408         loadobj.starttoload = Date.now();
2409         loadobj.type = type || "img";
2410         loadobj.prio = prio;
2411         loadobj.progress = "prepared";
2412         loadobj.static = staticlayer;
2413         opt.loadqueue.push(loadobj);     
2414   }           
2415
2416}
2417
2418// LOAD THE IMAGES OF THE PREDEFINED CONTAINER
2419var loadImages = function(container,opt,prio,staticlayer) { 
2420   
2421   container.find('img,.defaultimg, .tp-svg-layer').each(function() {
2422      var element = jQuery(this),
2423         src = element.data('lazyload') !== undefined && element.data('lazyload')!=="undefined" ? element.data('lazyload') : element.data('svg_src') !=u
2423ndefined ? element.data('svg_src')  : element.attr('src'),
2424         type = element.data('svg_src') !=undefined ? "svg" : "img";
2425      
2426      element.data('start-to-load',Date.now());
2427      addToLoadQueue(src,opt,prio,type,staticlayer);
2428   });
2429   progressImageLoad(opt);
2430}
2431
2432
2433// FIND SEARCHED IMAGE/SRC IN THE LOAD QUEUE
2434var getLoadObj = function(opt,src) {   
2435   var obj = new Object();
2436   if (opt.loadqueue)
2437      jQuery.each(opt.loadqueue, function(index,queue) {       
2438         if (queue.src == src) obj = queue;
2439      });
2440   return obj;
2441}
2442
2443// WAIT PROGRESS TILL THE PREDEFINED CONTAINER HAS ALL IMAGES LOADED INSIDE
2444var waitForCurrentImages = function(nextli,opt,callback) {
2445
2446   var waitforload = false;
2447   
2448
2449   // PRELOAD ALL IMAGES
2450   nextli.find('img,.defaultimg, .tp-svg-layer').each(function() {
2451      var element = jQuery(this),
2452         src = element.data('lazyload') != undefined ? element.data('lazyload') : element.data('svg_src') !=undefined ? element.data('svg_src')  : element.attr('src'),
2453         loadobj = getLoadObj(opt,src);
2454      
2455
2456
2457      // IF ELEMENTS IS NOT LOADED YET, AND IT IS NOW LOADED
2458      if (element.data('loaded')===undefined && loadobj !==undefined && loadobj.progress && loadobj.progress.match(/loaded/g)) {
2459         
2460         element.attr('src',loadobj.src);
2461
2462         
2463         // IF IT IS A DEFAULT IMG, WE NEED TO ASSIGN SOME SPECIAL VALUES TO IT
2464         if (loadobj.type=="img") {
2465            if (element.hasClass("defaultimg")) {
2466
2467               if (!_R.isIE(8)) {
2468                  if ((loadobj.src.indexOf('images/transparent.png')==-1 && loadobj.src.indexOf('assets/transparent.png')==-1) || element.data('bgcolor')===undefined) {      
2469                     element.css({backgroundImage:'url("'+loadobj.src+'")'});
2470                  } else {
2471                     
2472                     if (element.data('bgcolor')!==undefined)
2473                        element.css({background:element.data('bgcolor')});
2474                  }
2475               } else {
2476                  defimg.attr('src',loadobj.src);
2477               }        
2478               nextli.data('owidth',loadobj.width);
2479               nextli.data('oheight',loadobj.height);
2480               nextli.find('.slotholder').data('owidth',loadobj.width);
2481               nextli.find('.slotholder').data('oheight',loadobj.height);
2482            } else { 
2483               var w = element.data('ww'),
2484                  h = element.data('hh');
2485               
2486               element.data('owidth',loadobj.width);
2487               element.data('oheight',loadobj.height);
2488
2489               w = w==undefined || w =="auto" || w=="" ? loadobj.width : w;
2490               h = h==undefined || h =="auto" || h=="" ? loadobj.height : h;
2491               
2492               if (!jQuery.isNumeric(w) && w.indexOf("%")>0) 
2493                  h = w;
2494               
2495               element.data('ww',w);
2496               element.data('hh',h); 
2497               
2498            }
2499         } else  
2500
2501         if (loadobj.type=="svg" && loadobj.progress=="loaded") {          
2502
2503            element.append('<div class="tp-svg-innercontainer"></div>');
2504            element.find('.tp-svg-innercontainer').append(loadobj.innerHTML);
2505         }
2506         // ELEMENT IS NOW FULLY LOADED
2507         element.data('loaded',true);
2508      }     
2509
2510
2511      if (loadobj && loadobj.progress && loadobj.progress.match(/inprogress|inload|prepared/g)) 
2512         if (!loadobj.error && Date.now()-element.data('start-to-load')<5000) 
2513               waitforload = true;        
2514         else {
2515            loadobj.progress="failed";
2516            if (!loadobj.reported_img) {
2517               loadobj.reported_img = true;
2518               console.warn(src+"  Could not be loaded !");
2519            }
2520         }
2521      
2522      // WAIT FOR VIDEO API'S             
2523      if (opt.youtubeapineeded == true && (!window['YT'] || YT.Player==undefined)) {      
2524         waitforload = true;        
2525         if (Date.now()-opt.youtubestarttime>5000 && opt.youtubewarning!=true) {
2526            opt.youtubewarning = true;
2527            var txt = "YouTube Api Could not be loaded !";
2528            if (location.protocol === 'https:') txt = txt + " Please Check and Renew SSL Certificate !";
2529            console.error(txt); 
2530            opt.c.append('<div style="position:absolute;top:50%;width:100%;
2530color:#e74c3c;  font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+txt+'</strong></div>')                        
2531         }
2532      }
2533
2534      if (opt.vimeoapineeded == true && !window['Vimeo']) {
2535         waitforload = true;
2536         if (Date.now()-opt.vimeostarttime>5000 && opt.vimeowarning!=true) {
2537            opt.vimeowarning= true;
2538            var txt = "Vimeo Api Could not be loaded !";
2539            if (location.protocol === 'https:') txt = txt + " Please Check and Renew SSL Certificate !";
2540            console.error(txt); 
2541            opt.c.append('<div style="position:absolute;top:50%;width:100%;color:#e74c3c;  font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+txt+'</strong></div>')             
2542         }
2543      }  
2544         
2545   });
2546
2547   if (!_ISM && opt.audioqueue && opt.audioqueue.length>0) {      
2548      jQuery.each(opt.audioqueue,function(i,obj) {
2549         if (obj.status && obj.status==="prepared")
2550            if (Date.now() - obj.start<obj.waittime)
2551               waitforload = true;        
2552      });      
2553   }
2554   
2555   jQuery.each(opt.loadqueue,function(i,o) {          
2556      if (o.static===true && (o.progress!="loaded" || o.progress==="failed")) {
2557         if (o.progress=="failed") {
2558            if (!o.reported) {
2559               o.reported = true;
2560               console.warn("Static Image "+o.src+"  Could not be loaded in time. Error Exists:"+o.error);
2561            }
2562         }
2563         else
2564         if (!o.error && Date.now()-o.starttoload<5000) {
2565            waitforload = true;        
2566         }
2567         else {
2568            if (!o.reported) {
2569               o.reported = true;
2570               console.warn("Static Image "+o.src+"  Could not be loaded within 5s! Error Exists:"+o.error);
2571            }
2572         }
2573         
2574      }
2575   });   
2576   
2577
2578   if (waitforload) 
2579      punchgs.TweenLite.delayedCall(0.18,waitForCurrentImages,[nextli,opt,callback]);     
2580   else     
2581      punchgs.TweenLite.delayedCall(0.18,callback);      
2582   
2583}
2584
2585
2586
2587
2588//////////////////////////////////////
2589// -  CALL TO SWAP THE SLIDES -  //
2590/////////////////////////////////////
2591var swapSlide = function(container) {  
2592
2593
2594   var opt = container[0].opt;
2595   
2596   clearTimeout(opt.waitWithSwapSlide);   
2597
2598   if (container.find('.processing-revslide').length>0) {         
2599      opt.waitWithSwapSlide = setTimeout(function() {
2600         swapSlide(container);
2601         
2602      },150);
2603      return false;
2604   }  
2605
2606
2607   var actli = container.find('.active-revslide'),
2608      nextli = container.find('.next-revslide'),
2609      defimg= nextli.find('.defaultimg');
2610   
2611   
2612   if (opt.sliderType==="carousel" && !opt.carousel.fadein) {
2613      punchgs.TweenLite.to(opt.ul,1,{opacity:1});
2614      opt.carousel.fadein=true;
2615   }
2616
2617   if (nextli.index() === actli.index() && opt.onlyPreparedSlide!==true) {    
2618      nextli.removeClass("next-revslide");
2619      return false;
2620   }
2621
2622   if (opt.onlyPreparedSlide===true) {
2623      opt.onlyPreparedSlide=false;
2624      jQuery(opt.li[0]).addClass("processing-revslide");
2625   }
2626   
2627   nextli.removeClass("next-revslide").addClass("processing-revslide");
2628   
2629   if (nextli.index()===-1 && opt.sliderType==="carousel") nextli = jQuery(opt.li[0]);
2630   nextli.data('slide_on_focus_amount',(nextli.data('slide_on_focus_amount')+1) || 1);
2631   // CHECK IF WE ARE ALREADY AT LAST ITEM TO PLAY IN REAL LOOP SESSION
2632   if (opt.stopLoop=="on" && nextli.index()==opt.lastslidetoshow-1) {
2633      container.find('.tp-bannertimer').css({'visibility':'hidden'});
2634      container.trigger('revolution.slide.onstop');
2635      opt.noloopanymore = 1;
2636   } 
2637
2638   // INCREASE LOOP AMOUNTS
2639   if (nextli.index()===opt.slideamount-1) {
2640      opt.looptogo=opt.looptogo-1;
2641      if (opt.looptogo<=0)
2642            opt.stopLoop="on";
2643   }  
2644   
2645   opt.tonpause = true;
2646   container.trigger('stoptimer');
2647   opt.cd=0;
2648   if (opt.spinner==="off")
2649      if (opt.loader!==undefined) opt.loader.css({display:"none"});
2650   else
2651      opt.loadertimer = setTimeout(function() {if (opt.loader!==undefined) opt.loader.css({display:"block"});},50);
2652
2653   
2654   loadImages(nextli,opt,1);  
2655   if (_R.preLoadAudio) _R.preLoadAudio(nextli,opt,1);
2656
2657   
2658   // WAIT FOR SWAP SLIDE PROGRESS
2659   
2660   
2661   waitForCurrentImages(nextli,opt,function() {           
2662
2663      
2664      // MANAGE BG VIDEOS
2665      nextli.find('.rs-background-video-layer').each(function() {
2666         var _nc = jQuery(this);          
2667         if (!_nc.hasClass("HasListener")) {
2668            _nc.data('bgvideo',1);
2669            if (_R.manageVideoLayer) _R.manageVideoLayer(_nc,opt);
2670         }
2671         if (_nc.find('.rs-fullvideo-cover').length==0)
2672            _nc.append('<div class="rs-fullvideo-cover"></div>')
2673      });
2674      swapSlideProgress(defimg,container)
2675   });         
2676
2677}
2678
2679//////////////////////////////////////
2680// -  PROGRESS SWAP THE SLIDES -  //
2681/////////////////////////////////////
2682var swapSlideProgress = function(defimg,container) {
2683   
2684   var actli = container.find('.active-revslide'), 
2685      nextli = container.find('.processing-revslide'),      
2686      actsh = actli.find('.slotholder'),
2687      nextsh = nextli.find('.slotholder'),
2688      opt = container[0].opt;
2689   
2690   opt.tonpause=false;
2691    
2692    opt.cd=0;    
2693            
2694    
2695    clearTimeout(opt.loadertimer);
2696    if (opt.loader!==undefined) opt.loader.css({display:"none"});
2697   // if ( opt.sliderType =="carousel") _R.prepareCarousel(opt);
2698   _R.setSize(opt);
2699   _R.slotSize(defimg,opt);
2700   
2701      if (_R.manageNavigation) _R.manageNavigation(opt);
2702      var data={};
2703      data.nextslide=nextli;
2704    data.currentslide=actli;
2705   container.trigger('revolution.slide.onbeforeswap',data);
2706
2707   opt.transition = 1;
2708   opt.videoplaying = false;
2709
2710   // IF DELAY HAS BEEN SET VIA THE SLIDE, WE TAKE THE NEW VALUE, OTHER WAY THE OLD ONE...
2711   if (nextli.data('delay')!=undefined) {
2712            opt.cd=0;
2713            opt.delay=nextli.data('delay');
2714   } else 
2715      opt.delay=opt.origcd;
2716
2717   
2718   if (nextli.data('ssop')=="true" || nextli.data('ssop')===true)
2719      opt.ssop = true
2720   else
2721      opt.ssop = false;
2722
2723   
2724
2725   container.trigger('nulltimer');
2726
2727   var ai = actli.index(),
2728      ni = nextli.index();
2729   opt.sdir = ni<ai ? 1 : 0;
2730   
2731   if (opt.sc_indicator=="arrow") { 
2732      if (ai==0 && ni==opt.slideamount-1) opt.sdir = 1;
2733      if (ai==opt.slideamount-1 && ni==0) opt.sdir = 0;  
2734   }
2735
2736   opt.lsdir = opt.lsdir === undefined ? opt.sdir : opt.lsdir; 
2737   opt.dirc = opt.lsdir != opt.sdir;
2738   opt.lsdir = opt.sdir;
2739
2740   ///////////////////////////
2741   // REMOVE THE CAPTIONS //
2742   ///////////////////////////
2743
2744
2745   
2746   if (actli.index() != nextli.index() && opt.firststart!=1)   
2747      if (_R.removeTheCaptions) _R.removeTheCaptions(actli,opt);        
2748      
2749    
2750   
2751   if (!nextli.hasClass('rs-pause-timer-once') && !nextli.hasClass("rs-pause-timer-always"))    
2752      container.trigger('restarttimer');     
2753    else
2754      opt.videoplaying = true;   
2755   
2756    nextli.removeClass("rs-pause-timer-once");
2757      
2758   var nexttrans,
2759      direction=-1,
2760      mtl;
2761
2762   opt.currentSlide = actli.index();
2763   opt.nextSlide = nextli.index();
2764
2765      
2766   // SELECT SLIDER TYPE
2767   if ( opt.sliderType =="carousel") {                         
2768      mtl = new punchgs.TimelineLite();      
2769      _R.prepareCarousel(opt,mtl);        
2770      letItFree(container,nextsh,actsh,nextli,actli,mtl);
2771      opt.transition = 0;
2772      opt.firststart = 0;
2773   } else { 
2774      
2775      mtl = new punchgs.TimelineLite({onComplete:function() {           
2776         letItFree(container,nextsh,actsh,nextli,actli,mtl);
2777      }});  
2778      mtl.add(punchgs.TweenLite.set(nextsh.find('.defaultimg'),{opacity:0}));
2779      mtl.pause();
2780
2781      if (_R.animateTheCaptions) 
2782         _R.animateTheCaptions({slide:nextli,opt:opt,preset:true});
2783
2784      if (opt.firststart==1) {
2785         punchgs.TweenLite.set(actli,{autoAlpha:0});        
2786         opt.firststart=0;
2787      }
2788
2789      
2790      punchgs.TweenLite.set(actli,{zIndex:18});
2791      punchgs.TweenLite.set(nextli,{autoAlpha:0,zIndex:20});
2792      
2793            
2794      // IF THERE IS AN OTHER FIRST SLIDE START HAS BEED SELECTED
2795      if (nextli.data('differentissplayed') =='prepared') {
2796         nextli.data('differentissplayed','done');
2797         nextli.data('transition',nextli.data('savedtransition'));
2798         nextli.data('slotamount',nextli.data('savedslotamount'));
2799         nextli.data('masterspeed',nextli.data('savedmasterspeed'));
2800      }
2801
2802
2803      if (nextli.data('fstransition') != undefined && nextli.data('differentissplayed') !="done") {
2804
2805         nextli.data('savedtransition',nextli.data('transition'));
2806         nextli.data('savedslotamount',nextli.data('slotamount'));
2807         nextli.data('savedmasterspeed',nextli.data('masterspeed'));
2808         nextli.data('transition',nextli.data('fstransition'));
2809         nextli.data('slotamount',nextli.data('fsslotamount'));
2810         nextli.data('masterspeed',nextli.data('fsmasterspeed'));
2811         nextli.data('differentissplayed','prepared');
2812      }
2813
2814      if (nextli.data('transition')==undefined) nextli.data('transition',"random");
2815      
2816      nexttrans = 0;    
2817      var transtext = nextli.data('transition') !== undefined ? nextli.data('transition').split(",") : "fade",
2818         curtransid = nextli.data('nexttransid') == undefined ? -1 : nextli.data('nexttransid');      
2819      if (nextli.data('randomtransition')=="on")
2820         curtransid = Math.round(Math.random()*transtext.length);
2821      else
2822         curtransid=curtransid+1;
2823
2824      if (curtransid==transtext.length) curtransid=0;
2825      nextli.data('nexttransid',curtransid);
2826
2827      var comingtransition = transtext[curtransid];
2828
2829      if (opt.ie) {
2830         if (comingtransition=="boxfade") comingtransition = "boxslide";
2831         if (comingtransition=="slotfade-vertical") comingtransition = "slotzoom-vertical";
2832         if (comingtransition=="slotfade-horizontal") comingtransition = "slotzoom-horizontal";
2833      }
2834
2835      if (_R.isIE(8)) 
2836         comingtransition = 11;  
2837      
2838
2839                  
2840      mtl = _R.animateSlide(nexttrans, comingtransition, container,  nextli, actli, nextsh, actsh,  mtl);   
2841      if (nextsh.data('kenburns')=="on") {
2842         _R.startKenBurn(nextsh,opt);           
2843         mtl.add(punchgs.TweenLite.set(nextsh,{autoAlpha:0}))
2844      }
2845      
2846      // SHOW FIRST LI && ANIMATE THE CAPTIONS
2847      mtl.pause();
2848   }
2849
2850   
2851
2852   if (_R.scrollHandling) {
2853      _R.scrollHandling(opt, true,0);     
2854      mtl.eventCallback("onUpdate",function() {
2855         _R.scrollHandling(opt, true,0);
2856      });
2857   }
2858   
2859   
2860
2861   // START PARALLAX IF NEEDED      
2862   if (opt.parallax.type!="off" && opt.parallax.firstgo==undefined && _R.scrollHandling) {
2863      opt.parallax.firstgo = true;
2864      opt.lastscrolltop = -999;
2865      _R.scrollHandling(opt,true,0);
2866      setTimeout(function() {
2867         opt.lastscrolltop = -999;
2868         _R.scrollHandling(opt,true,0);
2869      },210);
2870      setTimeout(function() {
2871         opt.lastscrolltop = -999;
2872         _R.scrollHandling(opt,true,0);
2873      },420);
2874   }
2875   
2876   
2877   
2878   if (_R.animateTheCaptions) {  
2879      if (opt.sliderType==="carousel" && opt.carousel.showLayersAllTime==="on") {
2880         // SHOW ALL LAYERS IN ALL SLIDES FOR CAROUSEL            
2881            jQuery.each(opt.li,function(i) {             
2882               if (!opt.carousel.allLayersStarted) {
2883                  if (opt.li[i] === nextli)
2884                     _R.animateTheCaptions({slide:jQuery(opt.li[i]),maintimeline:mtl,opt:opt,startslideanimat:0});   
2885                  else
2886                     _R.animateTheCaptions({slide:jQuery(opt.li[i]),opt:opt,startslideanimat:0});
2887                  }  
2888               else
2889                  _R.animateTheCaptions({slide:jQuery(opt.li[i]),opt:opt,recall:true});
2890            });
2891            opt.carousel.allLayersStarted = true;
2892      } else {
2893         _R.animateTheCaptions({slide:nextli, opt:opt,maintimeline:mtl,startslideanimat:0}); 
2894      }
2895   } else {
2896      if (mtl != undefined) setTimeout(function() {         
2897         mtl.resume();
2898      },30);
2899   }
2900   punchgs.TweenLite.to(nextli,0.001,{autoAlpha:1});
2901
2902
2903   
2904   //if (_R.callStaticDDDParallax) _R.callStaticDDDParallax(container,opt,nextli);  
2905   
2906}
2907
2908
2909//////////////////////////////////////////
2910// GIVE FREE THE TRANSITIOSN        //
2911//////////////////////////////////////////
2912var letItFree = function(container,nextsh,actsh,nextli,actli,mtl) {
2913   
2914
2915   var opt = container[0].opt;
2916   if (opt.sliderType==="carousel") {
2917      // CAROUSEL SLIDER
2918   }  else {
2919      opt.removePrepare = 0;
2920      punchgs.TweenLite.to(nextsh.find('.defaultimg'),0.001,{zIndex:20,autoAlpha:1,onComplete:function() {
2921         removeSlots(container,opt,nextli,1);
2922
2923      }});
2924      if (nextli.index()!=actli.index()) {
2925         punchgs.TweenLite.to(actli,0.2,{zIndex:18,autoAlpha:0,onComplete:function() {
2926            removeSlots(container,opt,actli,1);                   
2927         }});
2928      }
2929   }
2930
2931
2932   container.find('.active-revslide').removeClass("active-revslide");   
2933   
2934   container.find('.processing-revslide').removeClass("processing-revslide").addClass("active-revslide");
2935   opt.act=nextli.index();
2936   
2937   opt.c.attr('data-slideactive',container.find('.active-revslide').data('index')); 
2938      
2939   if (opt.parallax.type=="scroll" || opt.parallax.type=="scroll+mouse" || opt.parallax.type=="mouse+scroll") {
2940      opt.lastscrolltop = -999;
2941      _R.scrollHandling(opt);
2942   }
2943   
2944   mtl.clear();      
2945   
2946   
2947   if (actsh.data('kbtl')!=undefined) {
2948      actsh.data('kbtl').reverse();
2949      actsh.data('kbtl').timeScale(25);
2950   }  
2951   if (nextsh.data('kenburns')=="on") {      
2952      if (nextsh.data('kbtl')!=undefined) {
2953         nextsh.data('kbtl').timeScale(1);   
2954         nextsh.data('kbtl').play();                  
2955      }
2956      else
2957         _R.startKenBurn(nextsh,opt);                 
2958   }
2959
2960   nextli.find('.rs-background-video-layer').each(function(i) {      
2961      if (_ISM && (!opt.fallbacks.allowHTML5AutoPlayOnAndroid)) return false;
2962      var _nc = jQuery(this);
2963      
2964      // JASON 4th arg for Vimeo
2965      _R.resetVideo(_nc,opt,false,true);  
2966      
2967      punchgs.TweenLite.fromTo(_nc,1,{autoAlpha:0},{autoAlpha:1,ease:punchgs.Power3.easeInOut,delay:0.2,onComplete:function() {     
2968         if (_R.animcompleted) _R.animcompleted(_nc,opt);
2969      }});
2970   });
2971   
2972
2973   actli.find('.rs-background-video-layer').each(function(i) {    
2974      if (_ISM) return false;
2975      var _nc = jQuery(this);
2976      if (_R.stopVideo) {
2977         _R.resetVideo(_nc,opt);
2978         _R.stopVideo(_nc,opt);              
2979      }
2980      punchgs.TweenLite.to(_nc,1,{autoAlpha:0,ease:punchgs.Power3.easeInOut,delay:0.2});
2981   });
2982   // TIRGGER THE ON CHANGE EVENTS
2983   var data={};
2984   data.slideIndex=nextli.index()+1;
2985   data.slideLIIndex=nextli.index();
2986   data.slide = nextli;
2987   data.currentslide=nextli;
2988   data.prevslide = actli;
2989   opt.last_shown_slide = actli.index();
2990
2991   container.trigger('revolution.slide.onchange',data);
2992   container.trigger('revolution.slide.onafterswap',data);  
2993   
2994   if (opt.startWithSlide!==undefined && opt.startWithSlide!=="done" && opt.sliderType==="carousel") {
2995      var callslideindex = opt.startWithSlide;     
2996      for (var lis=0;lis<=opt.li.length-1;lis++) {
2997         var oindex = jQuery(opt.li[lis]).data('originalindex');        
2998         if (oindex === opt.startWithSlide)
2999            callslideindex = lis;
3000      }
3001      if (callslideindex!==0)
3002         _R.callingNewSlide(opt.c,callslideindex);
3003      opt.startWithSlide = "done";
3004   }
3005   
3006
3007   opt.duringslidechange = false;
3008
3009   
3010   var lastSlideLoop = actli.data('slide_on_focus_amount'),
3011      lastSlideMaxLoop = actli.data('hideafterloop'); 
3012   if (lastSlideMaxLoop!=0 && lastSlideMaxLoop<=lastSlideLoop) opt.c.revremoveslide(actli.index());
3013   
3014   
3015
3016   var _actli = opt.nextSlide === -1 || opt.nextSlide===undefined ? 0 : opt.nextSlide;
3017   if (opt.rowzones!=undefined) _actli = _actli>opt.rowzones.length ? opt.rowzones.length : _actli;
3018   
3019   if (opt.rowzones!=undefined && opt.rowzones.length>0 && opt.rowzones[_actli]!=undefined && _actli>=0 && _actli<=opt.rowzones.length && opt.rowzones[_actli].length>0) _R.setSize(opt);
3020   //if (_R.callStaticDDDParallax) _R.callStaticDDDParallax(container,opt,nextli);     
3021   
3022}
3023
3024
3025
3026
3027
3028///////////////////////////
3029// REMOVE THE LISTENERS //
3030///////////////////////////
3031var removeAllListeners = function(container,opt) {
3032   container.children().each(function() {
3033     try{ jQuery(this).die('click'); } catch(e) {}
3034     try{ jQuery(this).die('mouseenter');} catch(e) {}
3035     try{ jQuery(this).die('mouseleave');} catch(e) {}
3036     try{ jQuery(this).unbind('hover');} catch(e) {}
3037   })
3038   try{ container.die('click','mouseenter','mouseleave');} catch(e) {}
3039   clearInterval(opt.cdint);
3040   container=null;
3041}
3042
3043///////////////////////////
3044// -  countDown   -  //
3045/////////////////////////
3046var countDown = function(container,opt) {
3047   opt.cd=0;
3048   opt.loop=0;
3049   if (opt.stopAfterLoops!=undefined && opt.stopAfterLoops>-1)
3050         opt.looptogo=opt.stopAfterLoops;
3051   else
3052      opt.looptogo=9999999;
3053
3054   if (opt.stopAtSlide!=undefined && opt.stopAtSlide>-1)
3055         opt.lastslidetoshow=opt.stopAtSlide;
3056   else
3057         opt.lastslidetoshow=999;
3058
3059   opt.stopLoop="off";
3060
3061   if (opt.looptogo==0) opt.stopLoop="on";
3062
3063   
3064   var bt=container.find('.tp-bannertimer');
3065
3066   // LISTENERS  //container.trigger('stoptimer');
3067   container.on('stoptimer',function() {     
3068   
3069      var bt = jQuery(this).find('.tp-bannertimer');
3070      bt[0].tween.pause();
3071      if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"});
3072      opt.sliderstatus = "paused";
3073      _R.unToggleState(opt.slidertoggledby);
3074   });
3075
3076
3077   container.on('starttimer',function() {       
3078      if (opt.forcepause_viatoggle) return;
3079      if (opt.conthover!=1 && opt.videoplaying!=true && opt.width>opt.hideSliderAtLimit && opt.tonpause != true && opt.overnav !=true && opt.ssop!=true)
3080         if (opt.noloopanymore !== 1 && (!opt.viewPort.enable || opt.inviewport)) { 
3081            
3082            bt.css({visibility:"visible"});
3083            bt[0].tween.resume();
3084            opt.sliderstatus = "playing";
3085         }
3086
3087         if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"});
3088         _R.toggleState(opt.slidertoggledby);
3089   });
3090
3091
3092   container.on('restarttimer',function() {  
3093      if (opt.forcepause_viatoggle) return;     
3094      var bt = jQuery(this).find('.tp-bannertimer');
3095      if (opt.mouseoncontainer && opt.navigation.onHoverStop=="on" && (!_ISM)) return false; 
3096      if (opt.noloopanymore !== 1 && (!opt.viewPort.enable || opt.inviewport) && opt.ssop!=true) {
3097         bt.css({visibility:"visible"});
3098         bt[0].tween.kill();        
3099      
3100         bt[0].tween=punchgs.TweenLite.fromTo(bt,opt.delay/1000,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:countDownNext,delay:1});
3101         opt.sliderstatus = "playing";
3102      }
3103      if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"});
3104      _R.toggleState(opt.slidertoggledby);
3105   });
3106
3107   container.on('nulltimer',function() {                 
3108         bt[0].tween.kill();        
3109         bt[0].tween=punchgs.TweenLite.fromTo(bt,opt.delay/1000,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:countDownNext,delay:1});
3110         bt[0].tween.pause(0);
3111         if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"});
3112         opt.sliderstatus = "paused";
3113   });
3114
3115   var countDownNext = function() {
3116      if (jQuery('body').find(container).length==0) {
3117         removeAllListeners(container,opt);
3118         clearInterval(opt.cdint);
3119      }
3120
3121      container.trigger("revolution.slide.slideatend");
3122
3123      //STATE OF API CHANGED -> MOVE TO AIP BETTER
3124      if (container.data('conthover-changed') == 1) {
3125         opt.conthover= container.data('conthover');
3126         container.data('conthover-changed',0);
3127      }
3128
3129      _R.callingNewSlide(container,1);                                  
3130   }
3131
3132   bt[0].tween=punchgs.TweenLite.fromTo(bt,opt.delay/1000,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:countDownNext,delay:1});
3133   
3134
3135   if (opt.slideamount >1 && !(opt.stopAfterLoops==0 && opt.stopAtSlide==1)) {
3136      container.trigger("starttimer");
3137   }
3138   else {
3139      opt.noloopanymore = 1;
3140      
3141      container.trigger("nulltimer");     
3142   }
3143
3144   container.on('tp-mouseenter',function() { 
3145          opt.mouseoncontainer = true;       
3146         if (opt.navigation.onHoverStop=="on" && (!_ISM)) {
3147            container.trigger('stoptimer');
3148            container.trigger('revolution.slide.onpause');                       
3149         }
3150   });
3151   container.on('tp-mouseleft',function() {
3152         opt.mouseoncontainer = false;
3153         if (container.data('conthover')!=1 && opt.navigation.onHoverStop=="on" && ((opt.viewPort.enable==true && opt.inviewport) || opt.viewPort.enable==false)) {
3154            container.trigger('revolution.slide.onresume');
3155            container.trigger('starttimer');                         
3156         }
3157   });
3158   
3159}
3160
3161
3162 
3163
3164//////////////////////////////////////////////////////
3165// * Revolution Slider - NEEDFULL FUNCTIONS
3166// * @version: 1.0 (30.10.2014)
3167// * @author ThemePunch
3168//////////////////////////////////////////////////////
3169
3170
3171
3172//    -  BLUR / FOXUS FUNCTIONS ON BROWSER 
3173
3174var vis = (function(){
3175       var stateKey,
3176           eventKey,
3177           keys = {
3178                   hidden: "visibilitychange",
3179                   webkitHidden: "webkitvisibilitychange",
3180                   mozHidden: "mozvisibilitychange",
3181                   msHidden: "msvisibilitychange"
3182       };
3183       for (stateKey in keys) {
3184           if (stateKey in document) {
3185               eventKey = keys[stateKey];
3186               break;
3187           }
3188       }
3189       return function(c) {
3190           if (c) document.addEventListener(eventKey, c,{pasive:true});
3191           return !document[stateKey];
3192       }
3193   })();
3194
3195var restartOnFocus = function() {
3196   jQuery('.rev_redraw_on_blurfocus').each(function() {           
3197      var opt = jQuery(this)[0].opt;
3198      if (opt==undefined || opt.c==undefined || opt.c.length===0) return false;
3199      if (opt.windowfocused!=true) {
3200         opt.windowfocused = true;
3201          punchgs.TweenLite.delayedCall(0.3,function(){           
3202              // TAB IS ACTIVE, WE CAN START ANY PART OF THE SLIDER        
3203              if (opt.fallbacks.nextSlideOnWindowFocus=="on") opt.c.revnext();
3204              opt.c.revredraw();
3205              if (opt.lastsliderstatus=="playing")                      
3206            opt.c.revresume();
3207          });
3208      }
3209   })
3210}
3211
3212var lastStatBlur = function() {
3213   jQuery('.rev_redraw_on_blurfocus').each(function() {  
3214      var opt = jQuery(this)[0].opt;      
3215      opt.windowfocused = false;
3216      opt.lastsliderstatus = opt.sliderstatus;  
3217      opt.c.revpause(); 
3218      var actsh = opt.c.find('.active-revslide .slotholder'),
3219         nextsh = opt.c.find('.processing-revslide .slotholder');
3220
3221      if (nextsh.data('kenburns')=="on")           
3222         _R.stopKenBurn(nextsh,opt);
3223
3224      if (actsh.data('kenburns')=="on")            
3225         _R.stopKenBurn(actsh,opt);
3226   });
3227   
3228   
3229}
3230
3231var tabBlurringCheck = function() {
3232   var notIE = (document.documentMode === undefined),
3233       isChromium = window.chrome;
3234   if (jQuery('body').data('revslider_focus_blur_listener')===1) return;
3235   jQuery('body').data('revslider_focus_blur_listener',1);
3236   if (notIE && !isChromium) {
3237       // checks for Firefox and other  NON IE Chrome versions
3238       jQuery(window).on("focusin", function () {
3239         restartOnFocus();
3240       }).on("focusout", function () {
3241         lastStatBlur();                     
3242       });
3243   } else {
3244       // checks for IE and Chromium versions
3245       if (window.addEventListener) {              
3246           // bind focus event
3247           window.addEventListener("focus", function (event) {          
3248            restartOnFocus();
3249           }, {capture:false,passive:true});
3250           // bind blur event
3251           window.addEventListener("blur", function (event) {
3252            lastStatBlur();     
3253           }, {capture:false,passive:true});
3254
3255       } else {
3256           // bind focus event
3257           window.attachEvent("focus", function (event) {
3258            restartOnFocus();
3259           });
3260           // bind focus event
3261           window.attachEvent("blur", function (event) {
3262            lastStatBlur();     
3263           });
3264       }
3265   }
3266}
3267
3268
3269//    -  GET THE URL PARAMETER //
3270
3271var getUrlVars = function (hashdivider){
3272   var vars = [], hash;
3273   var hashes = window.location.href.slice(window.location.href.indexOf(hashdivider) + 1).split('_');
3274   for(var i = 0; i < hashes.length; i++)
3275   {
3276      hashes[i] = hashes[i].replace('%3D',"=");
3277      hash = hashes[i].split('=');
3278      vars.push(hash[0]);
3279      vars[hash[0]] = hash[1];
3280   }
3281   return vars;
3282}
3283})(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.