!function(e){jQuery.fn.QCslider=function(t){var i,a,l=jQuery(this),n={},d=1,r=0;function o(){var t=n.items.panel.eq(r);if(t.hasClass("video")){var a=t.attr("data-video"),l="player"+r,o=t.attr("data-muted"),u=t.attr("data-type");if("youtube"===u){t.html('<div class="include"><div id="'+l+'"></div></div>'),o="true"===o?1:0,i=new YT.Player(l,{videoId:a,playerVars:{allowfullscreen:!0,wmode:"transparent",cc_load_policy:0,iv_load_policy:0,modestbranding:0,theme:"white",origin:"https://www.youtube.com",disablekb:1,branding:0,autohide:0,showinfo:0,autoplay:1,controls:0,mute:o,border:0,html5:1,rel:0,fs:0},events:{onReady:function(e){"true"===o&&(e.target.mute(),e.target.setVolume(0));e.target.playVideo()},onStateChange:function(e){let i;e.data===YT.PlayerState.PLAYING&&(i=setInterval(p,50));e.data==YT.PlayerState.ENDED&&(clearInterval(i),t.html('<div class="include"><div id="'+l+'"></div></div>'),c(d))}}});var v=n.items.panel.eq(r).width(),m=n.items.panel.eq(r).height();function p(){var t=i.playerInfo.currentTime/i.playerInfo.duration*100;e("#barra").width(t+"%")}i.setSize({width:v,height:m})}else if("video"===u){"true"===o?t.html('<div class="include"><video src="'+a+'" preload="auto" muted autoplay="true" poster="" id="'+l+'"></video></div>'):t.html('<div class="include"><video src="'+a+'" preload="auto" autoplay="true" poster="" id="'+l+'"></video></div>'),e("#"+l).bind("timeupdate",function(){var t=e("#"+l)[0].currentTime/e("#"+l)[0].duration*100;e("#barra").width(t+"%")}),e("#"+l).on("ended",function(){t.html(" "),e("#"+l).unbind("timeupdate"),c(d)})}}else e("#barra").animate({width:"100%"},settings.duration,"linear",s)}function s(){e("#barra").css("width",0);var t=n.items.panel,i=e("#slider-controls li");d>=lengthSlider&&(d=0,r=lengthSlider-1),i.removeClass("active").eq(d).addClass("active"),t.eq(r).fadeOut("slow"),t.eq(d).fadeIn("slow"),r=d,d+=1,o()}function c(t){e("#barra").stop().css("width",0);var i=n.items.panel,a=e("#slider-controls li");n.items.panel.eq(r).hasClass("video")&&(vidp="player"+r,vtyp=n.items.panel.eq(r).attr("data-type"),"youtube"===vtyp?n.items.panel.eq(r).html('<div class="include"><div id="'+vidp+'"></div></div>'):"video"===vtyp&&n.items.panel.eq(r).html('<div class="include"></div>')),t>=lengthSlider?t=0:t<0&&(t=lengthSlider-1),a.removeClass("active").eq(t).addClass("active"),i.eq(r).fadeOut("slow"),i.eq(t).fadeIn("slow"),r=t,d=t+1,o()}return n.el=l,n.items={panel:n.el.find("li")},lengthSlider=n.items.panel.length,a={start:0,duration:8e3},console.log("QCSlider V1.4.3"),settings=jQuery.extend(a,t),function(){console.log("QCSlider Load");var t="",i=document.createElement("script");i.src="https://www.youtube.com/iframe_api";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(i,a),o();for(var l=0;l<lengthSlider;l++)t+=0==l?'<li class="active"></li>':"<li></li>";e("#slider-controls").html(t).on("click","li",function(t){var i=e(this);r!==i.index()&&c(i.index())}),e("#rht-control").on("click",function(e){c(d)}),e("#lft-control").on("click",function(e){c(r-1)})}(),n}}(jQuery);