/*===================================================================================*/ /* FlexSlider - # /*===================================================================================*/ jQuery(window).load(function() { var vimeoPlayers = jQuery('#mainslider').find('iframe'), player; var iframeActionLoop ='0'; for (var i = 0, length = length; i < length; i++) { player = vimeoPlayers[i]; $f(player).addEvent('ready', ready); } function addEvent(element, eventName, callback) { (addeventlistener) ? addeventlistener(eventName, callback, false) : attachevent(eventName, callback, false); } if( jQuery('#mainslider li').hasClass('flex-active-slide') ){ jQuery(this).children('.flex-caption').fadeOut("slow"); } function ready(player_id) { var froogaloop = $f(player_id); addevent('play', function(data) { jQuery('#mainslider').flexslider("pause"); }); addevent('pause', function(data) { jQuery('#mainslider').flexslider("play"); }); } jQuery("slide-image-hover").hover( function () { jQuery('#mainslider').flexslider("pause"); }, function () { jQuery('#mainslider').flexslider("play"); } ); jQuery("slide-caption-hover").hover( function () { jQuery('#mainslider').flexslider("pause"); }, function () { jQuery('#mainslider').flexslider("play"); } ); jQuery('#mainslider').flexslider({ animation: "fade", smoothHeight: true, direction: "horizontal", slideshow: true, slideshowSpeed: 7000, pauseOnHover: false, useCSS: false, video: true, before: function(slider){ if (eq(currentslide).find('iframe').length !== 0) $f( eq(currentslide).find('iframe').attr('id') ).api('pause'); } }); jQuery('.testimonialslider').flexslider({ animation: "fade", smoothHeight: true, touch: true, minItems: 2, useCSS: false, transformsEnabled: false, slideshow: false }); jQuery('.recent-work-carousel').flexslider({ animation: "slide", animationLoop: false, touch: true, itemWidth: 235, minItems: 2, maxItems: 4, move: 1, useCSS: false, transformsEnabled: false, slideshow: false }); jQuery('#singleflexslider').flexslider({ animation: "slide", smoothHeight: true, touch: true, minItems: 2, useCSS: false, transformsEnabled: false, slideshow: false }); jQuery('.singleflexslider').flexslider({ animation: "slide", smoothHeight: true, touch: true, minItems: 2, useCSS: false, transformsEnabled: false, slideshow: false }); jQuery('.blog-slider').flexslider({ animation: "slide", smoothHeight: true, touch: true, minItems: 2, useCSS: false, transformsEnabled: false, slideshow: false }); });