Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
(function($)
{
$.fn.et_shortcodes_switcher = function(options)
{
var defaults =
{
slides: '>div',
activeClass: 'active',
linksNav: '',
findParent: true, //use parent elements to define active states
lengthElement: 'li', //parent element, used only if findParent is set to true
useArrows: false,
arrowLeft: 'a#prev-arrow',
arrowRight: 'a#next-arrow',
auto: false,
autoSpeed: 5000,
slidePadding: '',
pauseOnHover: true,
fx: 'fade',
sliderType: ''
};
var options = $.extend(defaults, options);
return this.each(function()
{
var slidesContainer = jQuery(this).parent().css('position','relative'),
$slides = jQuery(this).css({'overflow':'hidden','position':'relative'}),
$slide = $slides.find(options.slides).css({'opacity':'1','position':'absolute','top':'0px','left':'0px','display':'none'}),
slidesNum = $slide.length,
zIndex = slidesNum,
currentPosition = 1,
slideHeight = 0,
$activeSlide,
$nextSlide;
if (options.fx === 'slide') {
$slide.css({'opacity':'0','position':'absolute','top':'0px','left':'0px','display':'block'});
} else {
$slide.filter(':first').css({'display':'block'});
}
if (options.slidePadding != '') $slide.css('padding',options.slidePadding);
$slide.each(function(){
jQuery(this).css('z-index',zIndex).addClass('clearfix');
if (options.fx === 'slide') zIndex--;
slideH = jQuery(this).innerHeight();
if (slideH > slideHeight) slideHeight = slideH;
});
$slides.css('height', slideHeight);
$slides.css('width', $slides.width());
var slideWidth = $slide.width(),
slideOuterWidth = $slide.outerWidth();
$slide.css('width',slideWidth);
$slide.filter(':first').css('opacity','1');
if (options.sliderType != '') {
if (options.sliderType === 'images') {
controllersHtml = '