1/* <![CDATA[ */ 2 // et_switcher plugin v2 3 (function($) 4 { 5 $.fn.et_shortcodes_switcher = function(options) 6 { 7 var defaults = 8 { 9 slides: '>div', 10 activeClass: 'active', 11 linksNav: '', 12 findParent: true, //use parent elements to define active states 13 lengthElement: 'li', //parent element, used only if findParent is set to true 14 useArrows: false, 15 arrowLeft: 'a#prev-arrow', 16 arrowRight: 'a#next-arrow', 17 auto: false, 18 autoSpeed: 5000, 19 slidePadding: '', 20 pauseOnHover: true, 21 fx: 'fade', 22 sliderType: '' 23 }; 24 25 var options = $.extend(defaults, options); 26 27 return this.each(function() 28 { 29 30 var slidesContainer = jQuery(this).parent().css('position','relative'), 31 $slides = jQuery(this).css({'overflow':'hidden','position':'relative'}), 32 $slide = $slides.find(options.slides).css({'opacity':'1','position':'absolute','top':'0px','left':'0px','display':'none'}), 33 slidesNum = $slide.length, 34 zIndex = slidesNum, 35 currentPosition = 1, 36 slideHeight = 0, 37 $activeSlide, 38 $nextSlide; 39 40 if (options.fx === 'slide') { 41 $slide.css({'opacity':'0','position':'absolute','top':'0px','left':'0px','display':'block'}); 42 } else { 43 $slide.filter(':first').css({'display':'block'}); 44 } 45 46 if (options.slidePadding != '') $slide.css('padding',options.slidePadding); 47 48 $slide.each(function(){ 49 jQuery(this).css('z-index',zIndex).addClass('clearfix'); 50 if (options.fx === 'slide') zIndex--; 51 52 slideH = jQuery(this).innerHeight(); 53 if (slideH > slideHeight) slideHeight = slideH; 54 }); 55 56 //check left tabs container height 57 if ( slidesContainer.hasClass('tabs-left') ) { 58 var leftTabsHeight = slidesContainer.find('ul.et-tabs-control').innerHeight(); 59 if ( leftTabsHeight > slideHeight ) slideHeight = leftTabsHeight; 60 } 61 62 slidesContainer.find('.et-learn-more').not('.et-open').find('.learn-more-content').css({'display':'none','visibility': 'visible'}); 63 64 if ( jQuery.browser.msie ) { 65 if ( slidesContainer.hasClass('et-simple-slider') ) $slides.css('height', slideHeight+10); 66 else $slides.css('height', slideHeight+40); 67 } else { 68 $slides.css('height', slideHeight); 69 } 70 $slides.css('width', $slides.width()); 71 72 var slideWidth = $slide.width(), 73 slideOuterWidth = $slide.outerWidth(); 74 75 if ( jQuery.browser.msie && !slidesContainer.hasClass('et-simple-slider') ) { 76 $slide.css('width',slideWidth-22); 77 } else { 78 $slide.css('width',slideWidth); 79 } 80 81 $slide.filter(':first').css('opacity','1'); 82 83 if (options.sliderType != '') { 84 if (options.sliderType === 'images') { 85 controllersHtml = '<div class="controllers-wrapper"><div class="controllers"><a href="#" class="left-arrow">Previous</a>'; 86 for ($i=1; $i<=slidesNum; $i++) { 87 controllersHtml += '<a class="switch" href="#">'+$i+'</a>'; 88 } 89 controllersHtml += '<a href="#" class="right-arrow">Next</a></div><div class="controllers-right"></div></div>'; 90 $controllersWrap = jQuery(controllersHtml).prependTo($slides.parent()); 91 jQuery('.controllers-wrapper .controllers').css('width', 65 + 18*slidesNum); 92 } 93 94 var etimage_width = $slide.width(); 95 96 slidesContainer.css({'width':etimage_width}); 97 $slides.css({'width':etimage_width}); 98 99 if (options.sliderType === 'images') { 100 slidesContainer.css({'height':$slide.height()}); 101 $slides.css({'height':$slide.height()}); 102 103 var controllers_width = $controllersWrap.width(), 104 leftPosition = Math.round((etimage_width - controllers_width) / 2); 105 106 $controllersWrap.css({left: leftPosition}); 107 } 108 } 109 110 111 if (options.linksNav != '') { 112 var linkSwitcher = jQuery(options.linksNav); 113 114 var linkSwitcherTab = ''; 115 if (options.findParent) linkSwitcherTab = linkSwitcher.parent(); 116 else linkSwitcherTab = linkSwitcher; 117 118 if (!linkSwitcherTab.filter('.active').length) linkSwitcherTab.filter(':first').addClass('active'); 119 120 linkSwitcher.click(function(){ 121 122 var targetElement; 123 124 if (options.findParent) targetElement = jQuery(this).parent(); 125 else targetElement = jQuery(this); 126 127 var orderNum = targetElement.prevAll(options.lengthElement).length+1; 128 129 if (orderNum >
129 currentPosition) gotoSlide(orderNum, 1); 130 else gotoSlide(orderNum, -1); 131 132 return false; 133 }); 134 } 135 136 137 if (options.useArrows) { 138 var $right_arrow = jQuery(options.arrowRight), 139 $left_arrow = jQuery(options.arrowLeft); 140 141 $right_arrow.click(function(){ 142 if (currentPosition === slidesNum) 143 gotoSlide(1,1); 144 else 145 gotoSlide(currentPosition+1),1; 146 147 if (options.linksNav != '') changeTab(); 148 149 return false; 150 }); 151 152 $left_arrow.click(function(){ 153 if (currentPosition === 1) 154 gotoSlide(slidesNum,-1); 155 else 156 gotoSlide(currentPosition-1,-1); 157 158 if (options.linksNav != '') changeTab(); 159 160 return false; 161 }); 162 163 } 164 165 166 function changeTab(){ 167 if (linkSwitcherTab != '') { 168 linkSwitcherTab.siblings().removeClass('active'); 169 linkSwitcherTab.filter(':eq('+(currentPosition-1)+')').addClass('active'); 170 } 171 } 172 173 function gotoSlide(slideNumber,dir){ 174 if ($slide.filter(':animated').length) return; 175 176 $slide.css('opacity','0'); 177 178 $activeSlide = $slide.filter(':eq('+(currentPosition-1)+')').css('opacity','1'); 179 180 if (currentPosition === slideNumber) return; 181 182 $nextSlide = $slide.filter(':eq('+(slideNumber-1)+')').css('opacity','1'); 183 184 if ((currentPosition > slideNumber || currentPosition === 1) && (dir === -1)) { 185 if (options.fx === 'slide') slideBack(500); 186 if (options.fx === 'fade') slideFade(500); 187 } else { 188 if (options.fx === 'slide') slideForward(500); 189 if (options.fx === 'fade') slideFade(500); 190 } 191 192 currentPosition = $nextSlide.prevAll().length + 1; 193 194 if (options.linksNav != '') changeTab(); 195 196 if (typeof interval_shortcodes != 'undefined' && options.auto) { 197 clearInterval(interval_shortcodes); 198 auto_rotate(); 199 } 200 201 return false; 202 } 203 204 205 if (options.auto) { 206 auto_rotate(); 207 var pauseSlider = false;
208 } 209 210 if (options.pauseOnHover) { 211 slidesContainer.hover(function(){ 212 pauseSlider = true; 213 },function(){ 214 pauseSlider = false; 215 }); 216 } 217 218 function auto_rotate(){ 219 220 interval_shortcodes = setInterval(function(){ 221 if (!pauseSlider) { 222 if (currentPosition === slidesNum) 223 gotoSlide(1,1); 224 else 225 gotoSlide(currentPosition+1),1; 226 227 if (options.linksNav != '') changeTab(); 228 } 229 },options.autoSpeed); 230 231 } 232 233 function slideFade(speed){ 234 $activeSlide.css({zIndex: slidesNum}).fadeOut(700); 235 $nextSlide.css({zIndex: (slidesNum+1)}).fadeIn(700); 236 } 237 238 function slideForward(speed){ 239 $nextSlide.css('left',slideOuterWidth+'px'); 240 $activeSlide.animate({left: '-'+slideOuterWidth,opacity:0},speed); 241 $nextSlide.animate({left: 0,opacity:1},speed); 242 } 243 244 function slideBack(speed){ 245 $nextSlide.css('left','-'+slideOuterWidth+'px'); 246 $activeSlide.animate({left: slideOuterWidth,opacity:0},speed); 247 $nextSlide.animate({left: 0,opacity:1},speed); 248 } 249 250 }); 251 } 252 })(jQuery); 253 // end et_switcher plugin v2 254 255 /////// Shortcodes Javascript /////// 256 jQuery(document).ready(function($){ 257 $et_tooltip = $('.et-tooltip'); 258 $et_tooltip.on('mouseover mouseout', function(event){ 259 if (event.type == 'mouseover') { 260 $(this).find('.et-tooltip-box').animate({ opacity: 'show', bottom: '25px' }, 300); 261 } else { 262 $(this).find('.et-tooltip-box').animate({ opacity: 'hide', bottom: '35px' }, 300); 263 } 264 }); 265 // learn more 266 $et_learn_more = $('.et-learn-more .heading-more'); 267 $et_learn_more.on('click', function() { 268 if ( $(this).hasClass('open') ) 269 $(this).removeClass('open'); 270 else 271 $(this).addClass('open'); 272 273 $(this).parent('.et-learn-more').find('.learn-more-content').animate({ opacity: 'toggle', height: 'toggle' }, 300); 274 }); 275 276 $('.et-learn-more').not('.et-open').find('.learn-more-content').css( { 'visibility' : 'visible', 'display' : 'none' } ); 277 }); 278/* ]]> */
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.