").append(Te,Me).appendTo(O),Te.bind("mouseover",function(){J&&J.playing()||g()}),Te.bind("mouseout",function(){J&&J.playing()||v()})}var Fe,Se={none:function(t,e,n,i){Fe&&clearTimeout(Fe),Fe=setTimeout(function(){e.html(i).show()},t.noDelay?0:t.duration/2)}};Se[t.captionEffect]||(Se[t.captionEffect]=window["ws_caption_"+t.captionEffect]),(fe.length||de.length)&&y(),d(G,U,!0),t.stopOnHover&&(this.bind("mouseover",function(){J&&J.playing()||g(),he=!0}),this.bind("mouseout",function(){J&&J.playing()||v(),he=!1})),J&&J.playing()||v();var Ce=A.find("audio").get(0),Ee=t.autoPlay;if(Ce){if(k(Ce).insertAfter(A),window.Audio&&Ce.canPlayType&&Ce.canPlayType("audio/mp3"))Ce.loop="loop",t.autoPlay&&(Ce.autoplay="autoplay",setTimeout(function(){Ce.play()},100));else{Ce=Ce.src;var ke=Ce.substring(0,Ce.length-/[^\\\/]+$/.exec(Ce)[0].length),Ae="wsSound"+Math.round(9999*Math.random());k("
").appendTo(A).get(0).id=Ae;var Pe="wsSL"+Math.round(9999*Math.random());window[Pe]={onInit:function(){}},swfobject.createSWF({data:ke+"player_mp3_js.swf",width:"1",height:"1"},{allowScriptAccess:"always",loop:!0,FlashVars:"listener="+Pe+"&loop=1&autoplay="+(t.autoPlay?1:0)+"&mp3="+Ce},Ae),Ce=0}A.bind("stop",function(){Ee=!1,Ce?Ce.pause():k(Ae).SetVariable("method:pause","")}),A.bind("start",function(){Ce?Ce.play():k(Ae).SetVariable("method:play","")})}P.wsStart=s,P.wsRestart=v,P.wsStop=m;var je=k('
');if(t.playPause&&(je.addClass(t.autoPlay?"ws_pause":"ws_play"),je.click(function(){return F(),!1}),we.append(je)),t.keyboardControl&&k(document).on("keyup",function(t){switch(t.which){case 32:F();break;case 37:w(t,G-1,0);break;case 39:w(t,G+1,1)}}),t.scrollControl&&A.on("DOMMouseScroll mousewheel",function(t){t.originalEvent.wheelDelta<0||t.originalEvent.detail>0?w(null,G+1,1):w(null,G-1,0)}),"function"==typeof wowsliderVideo){var Oe=k('
').appendTo(O);J=new wowsliderVideo(A,t,l),"undefined"!=typeof $f&&(J.vimeo(!0),J.start(G)),window.onYouTubeIframeAPIReady=function(){J.youtube(!0),J.start(G)},Oe.on("click touchend",function(){Z||J.play(G,1)})}var qe=0;if(t.fullScreen){var Ie=function(){for(var t,e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenchange"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitfullscreenchange"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitfullscreenchange"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozfullscreenchange"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","MSFullscreenChange"]],i={},a=0,o=n.length;o>a;a++)if(t=n[a],t&&t[1]in document){for(a=0,e=t.length;e>a;a++)i[n[0][a]]=t[a];return i}return!1}();if(Ie){var De=0;document.addEventListener(Ie.fullscreenchange,function(){S()?(qe=1,E()):(De&&(De=0,A.unwrap()),qe=0,E()),B[0].step||l()}),k("
").on("click",C).appendTo(O)}}return t.responsive&&(k(E),k(window).on("load resize",E)),this}},jQuery.extend(jQuery.easing,{easeInOutExpo:function(t,e,n,i,a){return 0==e?n:e==a?n+i:(e/=a/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(-Math.pow(2,-10*--e)+2)+n},easeOutCirc:function(t,e,n,i,a){return i*Math.sqrt(1-(e=e/a-1)*e)+n},easeOutCubic:function(t,e,n,i,a){return i*((e=e/a-1)*e*e+1)+n},easeOutElastic1:function(t,e,n,i,a){var o=Math.PI/2,s=1.70158,r=0,c=i;if(0==e)return n;if(1==(e/=a))return n+i;if(r||(r=.3*a),c
o&&(o=0);var s=a?o/a:1;1>s?(t(s),requestAnimationFrame(i)):e(1)};return i(),{stop:e}}function l(t,e,n){return t+(e-t)*n}function u(e,n){return"linear"==n?e:"swing"==n?t.easing[n]?t.easing[n](e):e:t.easing[n]?t.easing[n](1,e,0,1,1,1):e}function f(t,e,n,i){if("object"==typeof e){var a={};for(var o in e)a[o]=f(t,e[o],n[o],i);return a}var s=["px","%","in","cm","mm","pt","pc","em","ex","ch","rem","vh","vw","vmin","vmax","deg","rad","grad","turn"],r="";return"string"==typeof e?r=e:"string"==typeof n&&(r=n),r=function(t,e,n){for(var i in e)if(t.indexOf(e[i])>-1)return e[i];return p[n]?p[n]:""}(r,s,t),e=parseFloat(e),n=parseFloat(n),l(e,n,i)+r}if("undefined"!=typeof e){e.jquery||"function"==typeof e||(n=e.from,i=e.to,a=e.duration,o=e.delay,s=e.easing,r=e.callback,e=e.each||e.obj);var d="num";if(e.jquery&&(d="obj"),"undefined"!=typeof e&&"undefined"!=typeof n&&"undefined"!=typeof i){"function"==typeof o&&(r=o,o=0),"function"==typeof s&&(r=s,s=0),"string"==typeof o&&(s=o,o=0),a=a||0,o=o||0,s=s||0,r=r||0;var p={opacity:0,top:"px",left:"px",right:"px",bottom:"px",width:"px",height:"px",translate:"px",rotate:"deg",rotateX:"deg",rotateY:"deg",scale:0},h=c(function(t){if(t=u(t,s),"num"===d){var a=l(n,i,t);e(a)}else{var a={transform:""};for(var o in n)if("undefined"!=typeof p[o]){var r=f(o,n[o],i[o],t);switch(o){case"translate":a.transform+=" translate3d("+r[0]+","+r[1]+","+r[2]+")";break;case"rotate":a.transform+=" rotate("+r+")";break;case"rotateX":a.transform+=" rotateX("+r+")";break;case"rotateY":a.transform+=" rotateY("+r+")";break;case"scale":a.transform+="object"==typeof r?" scale("+r[0]+", "+r[1]+")":" scale("+r+")";break;default:a[o]=r}}""===a.transform&&delete a.transform,e.css(a)}});return h}}}window.wowAnimate=e}(jQuery),Date.now||(Date.now=function(){return(new Date).getTime()}),function(){"use strict";for(var t=["webkit","moz"],e=0;eChange effect: ");
// prepare effects links
var effectsLinks = '';
for (var e = 0; e < effects; e++) {
if(e < allEfects.length)
effectsLinks += ''+allEfects[e].replace("_"," ")+' ';
}
// all effects list
var effectsMore = '';
if(effects < allEfects.length) {
for(var k = effects; k < allEfects.length; k++) {
var exist = 0;
for(var s = 0; s < effects.length; s++) {
if(effects[s] == allEfects[k]) {
exist = 1;
break;
}
}
if(!exist) {
effectsMore += '' + allEfects[k].replace("_"," ") + '';
}
}
effectsMore = 'More ^';
}
cont.append(effectsLinks + effectsMore);
// click on effect button event
cont.on('click', '[data-effect]', function() {
var curEffect = $(this).attr('data-effect');
$.getScript(effectsPath+curEffect+".js", function(){
callback(curEffect);
});
return false;
});
// fix firefox drag event
cont.on('dragstart', '.effmore', function(e) {
e.preventDefault();
})
}
}
function selectEffect(new_effect){
$("#effbuttons .checked").removeClass('checked');
var curItem = $("#effbuttons [data-effect='"+new_effect+"']");
curItem.addClass('checked');
// add checked to More button
if(curItem.parents('.effmore')[0]) {
curItem.parents('.effmore').addClass('checked');
}
};
function controlDeviceButtons(wow, callback) {
// device buttons
var sliderCont = wow.parent(),
curResponsive = 1;
function resizeWnd() {
// apply after transition
if(curResponsive > 1)
sliderCont.css('width', '100%');
$(window).resize();
}
$('#devices').on('click', 'a', function(e) {
var thisClass = this.className;
e.preventDefault();
if(/laptop|tablet|mobile/g.test(thisClass)) {
$('#devices').find('.laptop, .tablet, .mobile').removeClass('checked');
if(curResponsive > 1) {
curResponsive = 1;
$('#devices').find('.boxed, .fullwidth, .fullscreen').removeClass('checked');
$('#devices .boxed').addClass('checked');
}
$('>div', sliderCont).css('height','');
if(/laptop/g.test(thisClass)) {
sliderCont.css('maxWidth', sliderCont.width()).animate({
maxWidth: curResponsive>1?$(window).width():960
}, resizeWnd);
} else if(/tablet/g.test(thisClass)) {
sliderCont.css('maxWidth', sliderCont.width()).animate({
maxWidth: 700
}, resizeWnd);
} else if(/mobile/g.test(thisClass)) {
sliderCont.css('maxWidth', sliderCont.width()).animate({
maxWidth: 500
}, resizeWnd);
}
$(this).addClass('checked');
}
else {
if(/boxed/g.test(thisClass)) {
curResponsive = 1;
sliderCont.css('maxWidth', '').removeClass('fullwidth');
} else if(/fullwidth/g.test(thisClass)) {
sliderCont.css('maxWidth', 'none').addClass('fullwidth');
curResponsive = 2;
} else if(/fullscreen/g.test(thisClass)) {
sliderCont.css('maxWidth', 'none');
$('#'+wow.attr('id')+' .ws_fullscreen').click();
return;
}
$('#devices').find('.boxed, .fullwidth, .fullscreen').removeClass('checked');
if(curResponsive > 1) {
$('#devices').find('.tablet, .mobile').removeClass('checked');
$('#devices .laptop').addClass('checked');
resizeWnd();
}
$(this).addClass('checked');
}
callback({
responsive: curResponsive
});
});
}
var cSlide, bkpCont, wowInstance, firstInitBtns;
// rewrite slider
// window.wowReInitor = function (wow,options){
var default_wowSlider = $.fn.wowSlider;
var default_options;
var newOptions;
$.fn.wowSlider = function (options) {
if(!default_options) {
default_options = options;
}
var wow = $(this);
if(!newOptions) {
newOptions = $.extend({},options);
}
// add current effect if no in effects list
/*
if (newOptions.effect && (effects.join("|").indexOf(newOptions.effect)<0))
effects[effects.length] = newOptions.effect;
*/
// add fullscreen api
newOptions.fullScreen = true;
// change sizes when click on device buttons
if(!firstInitBtns) {
firstInitBtns = 1;
if(wow.attr('data-fullscreen')) {
wow.parent().css('max-width', 'none');
}
if(wow.attr('data-no-devices')) {
$('#devices').remove();
} else {
controlDeviceButtons(wow, function(newOpts) {
if(newOptions.responsive !== newOpts.responsive) {
newOptions.responsive = newOpts.responsive;
newOptions.forceStart = 0;
wowReInitor(wowInstance, newOptions);
}
});
if(newOptions.responsive == 2) {
$('#devices a.fullwidth').click();
}
}
if(wow.attr('data-effects')) {
$('#devices').remove();
allEfects = wow.attr('data-effects').split("|");
}
}
// get new effect script, then start
$.getScript(effectsPath+newOptions.effect+".js", function(){
newOptions.support = default_wowSlider.support;
// change duration in brick effect
if(newOptions.effect == 'brick') newOptions.duration = 5500;
else newOptions.duration = default_options.duration;
// recreate html or init effects
if (!bkpCont){//first start
bkpCont = $(document.createElement("div")).append(wow.clone()).html();
createEffects(function(eff){
newOptions.effect = eff;
newOptions.forceStart = 1;
wowReInitor(wowInstance, newOptions);
//reinitSlider(new_o);
});
selectEffect(newOptions.effect);
}
else {
wow.get(0).wsStop();
wow = $(bkpCont).replaceAll(wow);
}
wowInstance = wow; // save instance for effect
if (!newOptions.effect)
newOptions.effect = (allEfects[Math.floor(Math.random()*allEfects.length)]) || "blinds";
var new_opt = $.extend({
startSlide:cSlide,
onStep:function(num){cSlide=num}
},newOptions);
// run slider
//var result = wow.wowSlider(new_opt);
var result = default_wowSlider.apply(wow, [new_opt]);
if (isNaN(cSlide))
cSlide = 0;
else if(newOptions.forceStart)
wow.get(0).wsStart(cSlide+1);
selectEffect(new_opt.effect);
return result;
});
}
// for old compability
window.wowReInitor = function (wow,options){
$(wow).wowSlider(options);
};
})(jQuery);