!function(t){function e(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^]*)"),i=e.exec(location.search);return null===i?null:decodeURIComponent(i[1].replace(/\+/g," "))}t.fn.Video=function(t){return new u(this,t)};var i="mousemove keydown DOMMouseScroll mousewheel mousedown reset.idle",s={instanceName:"player1",instanceTheme:"dark",autohideControls:5,hideControlsOnMouseOut:!1,playerLayout:"fixedSize",playerOrientation:"LTR",videoPlayerWidth:768,videoPlayerHeight:432,videoRatio:16/9,videoRatioStretch:!1,iOSPlaysinline:!0,autoplay:!1,colorAccent:"#00adef",videoAnimationTime:350,playSpecificVideo:0,progressBarThickness:3,progressBarThicknessOnMouseover:6,tooltipFontSize:12,videoPlayerShadow:"effect1",loadRandomVideoOnStart:!1,shuffle:!1,posterImg:"",posterImgOnVideoFinish:"assets/images/images/poster2.jpg",onFinish:"Play next video",nowPlayingText:!0,showAllControls:!0,allowSkipAd:!0,infoShow:!0,nextShow:!0,rewindShow:!0,qualityShow:!0,lightBox:!1,lightBoxAutoplay:!1,lightBoxThumbnail:"assets/images/images/poster.jpg",lightBoxThumbnailWidth:400,lightBoxThumbnailHeight:220,lightBoxCloseOnOutsideClick:!0,playlist:"Right playlist",playlistScrollType:"inset-2",playlistBehaviourOnPageload:"opened (default)",vimeoColor:"00adef",youtubeControls:"custom controls",youtubeSkin:"dark",youtubeColor:"red",youtubeQuality:"default",youtubeShowRelatedVideos:!0,HTML5VideoQuality:"SD",preloadSelfHosted:"none",rightClickMenu:!0,hideVideoSource:!1,shareShow:!0,facebookShow:!0,twitterShow:!0,googlePlusShow:!0,facebookShareName:"Stellar video player",facebookShareLink:"http://codecanyon.net/",facebookShareDescription:"Stellar Video Player is stunning, modern, responsive, fully customisable high-end video player for WordPress that support advertising and the most popular video platforms like YouTube, Vimeo or self-hosting videos (mp4).",facebookSharePicture:"https://0.s3.envato.com/files/123866118/preview.jpg",twitterText:"Stellar video player",twitterLink:"http://codecanyon.net/",twitterHashtags:"wordpressvideoplayer",twitterVia:"Creative media",googlePlus:"http://codecanyon.net/",logoShow:!0,logoClickable:!0,logoPath:"assets/images/images/logo.png",logoGoToLink:"http://codecanyon.net/",logoPosition:"bottom-left",embedShow:!0,embedCodeSrc:"www.yourwebsite.com/videoplayer/index.html",embedShareLink:"www.yourwebsite.com/videoplayer/index.html",showGlobalPrerollAds:!1,globalPrerollAds:"url1;url2;url3;url4;url5",globalPrerollAdsSkipTimer:5,globalPrerollAdsGotoLink:"http://codecanyon.net/",advertisementTitle:"Advertisement",skipAdvertisementText:"Skip advertisement",skipAdText:"You can skip this ad in",playBtnTooltipTxt:"Play",pauseBtnTooltipTxt:"Pause",rewindBtnTooltipTxt:"Rewind",downloadVideoBtnTooltipTxt:"Download video",qualityBtnOpenedTooltipTxt:"Close quality",qualityBtnClosedTooltipTxt:"Select quality",muteBtnTooltipTxt:"Mute",unmuteBtnTooltipTxt:"Unmute",fullscreenBtnTooltipTxt:"Fullscreen",exitFullscreenBtnTooltipTxt:"Exit fullscreen",infoBtnTooltipTxt:"Show info",embedBtnTooltipTxt:"Embed",shareBtnTooltipTxt:"Share",volumeTooltipTxt:"Volume",playlistBtnClosedTooltipTxt:"Show playlist",playlistBtnOpenedTooltipTxt:"Hide playlist",facebookBtnTooltipTxt:"Share on Facebook",twitterBtnTooltipTxt:"Share on Twitter",googlePlusBtnTooltipTxt:"Share on Google+",lastBtnTooltipTxt:"Go to last video",firstBtnTooltipTxt:"Go to first video",nextBtnTooltipTxt:"Next video",previousBtnTooltipTxt:"Previous video",playlistSearchText:"Search for video...",nextVideoInPlaylistText:"UP NEXT",autoplayNextVideoInPlaylistOn:"Autoplay next video on",autoplayNextVideoInPlaylistOff:"Autoplay next video off",countVideos:"of",shuffleBtnOnTooltipTxt:"Random on",shuffleBtnOffTooltipTxt:"Random off",embedWindowTitle2:"EMBED PLAYER IN YOUR SITE:",embedWindowTitle3:"SHARE CURRENT VIDEO:",copyTxt:"Copy",copiedTxt:"Copied!",youtubePlaylistID:"",youtubeChannelID:"",videos:[{videoType:"youtube",title:"Youtube video",youtubeID:"Ts2vpJpoLoc",vimeoID:"119641053",mp4HD:"http://creativeinteractivemedia.com/player/videos/Pieces.mp4",mp4SD:"http://creativeinteractivemedia.com/player/videos/PiecesSD.mp4",enable_mp4_download:!1,imageUrl:"assets/images/poster2.jpg",imageTimer:4,prerollAD:!1,prerollGotoLink:"http://codecanyon.net/",preroll_mp4:"http://creativeinteractivemedia.com/player/videos/Short_Elegant_Logo_Reveal.mp4",prerollSkipTimer:5,midrollAD:!1,midrollAD_displayTime:"00:10",midrollGotoLink:"http://codecanyon.net/",midroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Explode.mp4",midrollSkipTimer:5,postrollAD:!1,postrollGotoLink:"http://codecanyon.net/",postroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Light.mp4",postrollSkipTimer:5,popupImg:"assets/images/popup.jpg",popupAdShow:!1,popupAdStartTime:"00:03",popupAdEndTime:"00:07",popupAdGoToLink:"http://codecanyon.net/",description:"Video description goes here.",thumbImg:"assets/images/pic1.jpg",info:"Video info goes here. This text can be HTML formatted , find out more . You can disable this info window in player options. Lorem ipsum dolor sit amet, eu pri dolores theophrastus. Posidonium vituperatoribus cu mel, cum feugiat nostrum sapientem ne. Vis ea summo persius, unum velit erant in eos, pri ut suas iriure euripidis. Ad augue expetendis sea. Ne usu saperet appetere honestatis, ne qui nulla debitis sententiae."},{videoType:"vimeo",title:"Vimeo vimeo",youtubeID:"Ts2vpJpoLoc",vimeoID:"119641053",mp4HD:"http://creativeinteractivemedia.com/player/videos/Pieces.mp4",mp4SD:"http://creativeinteractivemedia.com/player/videos/PiecesSD.mp4",enable_mp4_download:!1,imageUrl:"assets/images/poster2.jpg",imageTimer:4,prerollAD:!1,prerollGotoLink:"http://codecanyon.net/",preroll_mp4:"http://creativeinteractivemedia.com/player/videos/Short_Elegant_Logo_Reveal.mp4",prerollSkipTimer:5,midrollAD:!1,midrollAD_displayTime:"00:10",midrollGotoLink:"http://codecanyon.net/",midroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Explode.mp4",midrollSkipTimer:5,postrollAD:!1,postrollGotoLink:"http://codecanyon.net/",postroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Light.mp4",postrollSkipTimer:5,popupImg:"assets/images/popup.jpg",popupAdShow:!1,popupAdStartTime:"00:03",popupAdEndTime:"00:07",popupAdGoToLink:"http://codecanyon.net/",description:"Video description goes here.",thumbImg:"assets/images/pic1.jpg",info:"Video info goes here. This text can be HTML formatted , find out more . You can disable this info window in player options. Lorem ipsum dolor sit amet, eu pri dolores theophrastus. Posidonium vituperatoribus cu mel, cum feugiat nostrum sapientem ne. Vis ea summo persius, unum velit erant in eos, pri ut suas iriure euripidis. Ad augue expetendis sea. Ne usu saperet appetere honestatis, ne qui nulla debitis sententiae."},{videoType:"HTML5",title:"Video title",youtubeID:"0dJO0HyE8xE",vimeoID:"119641053",mp4HD:"http://creativeinteractivemedia.com/player/videos/Pieces.mp4",mp4SD:"http://creativeinteractivemedia.com/player/videos/PiecesSD.mp4",enable_mp4_download:!0,imageUrl:"assets/images/poster2.jpg",imageTimer:4,prerollAD:!1,prerollGotoLink:"http://codecanyon.net/",preroll_mp4:"http://creativeinteractivemedia.com/player/videos/Short_Elegant_Logo_Reveal.mp4",prerollSkipTimer:5,midrollAD:!1,midrollAD_displayTime:"00:10",midrollGotoLink:"http://codecanyon.net/",midroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Explode.mp4",midrollSkipTimer:5,postrollAD:!1,postrollGotoLink:"http://codecanyon.net/",postroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Light.mp4",postrollSkipTimer:5,popupImg:"assets/images/popup.jpg",popupAdShow:!1,popupAdStartTime:"00:03",popupAdEndTime:"00:07",popupAdGoToLink:"http://codecanyon.net/",description:"Video description goes here.",thumbImg:"assets/images/pic1.jpg",info:"Video info goes here. This text can be HTML formatted , find out more . You can disable this info window in player options. Lorem ipsum dolor sit amet, eu pri dolores theophrastus. Posidonium vituperatoribus cu mel, cum feugiat nostrum sapientem ne. Vis ea summo persius, unum velit erant in eos, pri ut suas iriure euripidis. Ad augue expetendis sea. Ne usu saperet appetere honestatis, ne qui nulla debitis sententiae."},{videoType:"HTML5",title:"Video title",youtubeID:"0dJO0HyE8xE",vimeoID:"119641053",mp4HD:"http://creativeinteractivemedia.com/player/videos/Pieces.mp4",mp4SD:"http://creativeinteractivemedia.com/player/videos/PiecesSD.mp4",enable_mp4_download:!0,imageUrl:"assets/images/poster2.jpg",imageTimer:4,prerollAD:!1,prerollGotoLink:"http://codecanyon.net/",preroll_mp4:"http://creativeinteractivemedia.com/player/videos/Short_Elegant_Logo_Reveal.mp4",prerollSkipTimer:5,midrollAD:!1,midrollAD_displayTime:"00:10",midrollGotoLink:"http://codecanyon.net/",midroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Explode.mp4",midrollSkipTimer:5,postrollAD:!1,postrollGotoLink:"http://codecanyon.net/",postroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Light.mp4",postrollSkipTimer:5,popupImg:"assets/images/popup.jpg",popupAdShow:!1,popupAdStartTime:"00:03",popupAdEndTime:"00:07",popupAdGoToLink:"http://codecanyon.net/",description:"Video description goes here.",thumbImg:"assets/images/pic1.jpg",info:"Video info goes here. This text can be HTML formatted , find out more . You can disable this info window in player options. Lorem ipsum dolor sit amet, eu pri dolores theophrastus. Posidonium vituperatoribus cu mel, cum feugiat nostrum sapientem ne. Vis ea summo persius, unum velit erant in eos, pri ut suas iriure euripidis. Ad augue expetendis sea. Ne usu saperet appetere honestatis, ne qui nulla debitis sententiae."},{videoType:"HTML5",title:"Video title",youtubeID:"0dJO0HyE8xE",vimeoID:"119641053",mp4HD:"http://creativeinteractivemedia.com/player/videos/Pieces.mp4",mp4SD:"http://creativeinteractivemedia.com/player/videos/PiecesSD.mp4",enable_mp4_download:!0,imageUrl:"assets/images/poster2.jpg",imageTimer:4,prerollAD:!1,prerollGotoLink:"http://codecanyon.net/",preroll_mp4:"http://creativeinteractivemedia.com/player/videos/Short_Elegant_Logo_Reveal.mp4",prerollSkipTimer:5,midrollAD:!1,midrollAD_displayTime:"00:10",midrollGotoLink:"http://codecanyon.net/",midroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Explode.mp4",midrollSkipTimer:5,postrollAD:!1,postrollGotoLink:"http://codecanyon.net/",postroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Light.mp4",postrollSkipTimer:5,popupImg:"assets/images/popup.jpg",popupAdShow:!1,popupAdStartTime:"00:03",popupAdEndTime:"00:07",popupAdGoToLink:"http://codecanyon.net/",description:"Video description goes here.",thumbImg:"assets/images/pic1.jpg",info:"Video info goes here. This text can be HTML formatted , find out more . You can disable this info window in player options. Lorem ipsum dolor sit amet, eu pri dolores theophrastus. Posidonium vituperatoribus cu mel, cum feugiat nostrum sapientem ne. Vis ea summo persius, unum velit erant in eos, pri ut suas iriure euripidis. Ad augue expetendis sea. Ne usu saperet appetere honestatis, ne qui nulla debitis sententiae."},{videoType:"HTML5",title:"Video title",youtubeID:"0dJO0HyE8xE",vimeoID:"119641053",mp4HD:"http://creativeinteractivemedia.com/player/videos/Pieces.mp4",mp4SD:"http://creativeinteractivemedia.com/player/videos/PiecesSD.mp4",enable_mp4_download:!0,imageUrl:"assets/images/poster2.jpg",imageTimer:4,prerollAD:!1,prerollGotoLink:"http://codecanyon.net/",preroll_mp4:"http://creativeinteractivemedia.com/player/videos/Short_Elegant_Logo_Reveal.mp4",prerollSkipTimer:5,midrollAD:!1,midrollAD_displayTime:"00:10",midrollGotoLink:"http://codecanyon.net/",midroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Explode.mp4",midrollSkipTimer:5,postrollAD:!1,postrollGotoLink:"http://codecanyon.net/",postroll_mp4:"http://creativeinteractivemedia.com/player/videos/Logo_Light.mp4",postrollSkipTimer:5,popupImg:"assets/images/popup.jpg",popupAdShow:!1,popupAdStartTime:"00:03",popupAdEndTime:"00:07",popupAdGoToLink:"http://codecanyon.net/",description:"Video description goes here.",thumbImg:"assets/images/pic1.jpg",info:"Video info goes here. This text can be HTML formatted , find out more . You can disable this info window in player options. Lorem ipsum dolor sit amet, eu pri dolores theophrastus. Posidonium vituperatoribus cu mel, cum feugiat nostrum sapientem ne. Vis ea summo persius, unum velit erant in eos, pri ut suas iriure euripidis. Ad augue expetendis sea. Ne usu saperet appetere honestatis, ne qui nulla debitis sententiae."}]},o={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/WPDesktop/i)},any:function(){return o.Android()||o.BlackBerry()||o.iOS()||o.Opera()||o.Windows()}},a=o.any()?"touchend":"click",l=o.any()?"touchstart":"mousedown",n=o.any()?"touchmove":"mousemove",p=o.any()?"touchend":"mouseup",d="onorientationchange"in window?"orientationchange":"resize",h="webkitCancelFullScreen"in document,m="mozCancelFullScreen"in document,c="msExitFullscreen"in document,y={id:e("id")},u=function(e,i){var r=this;switch(this._class=u,this.parent=e,this.parentWidth=this.parent.width(),this.parentHeight=this.parent.height(),this.windowWidth=t(window).width(),this.windowHeight=t(window).height(),this.options=t.extend({},s,i),this.sources=this.options.srcs||this.options.sources,this.state=null,this._inFullscreen=!1,this.stretching=!1,this.infoOn=!1,this.lightBoxOn=!1,this.adOn=!1,this.skipCountOn=!1,this.skipBoxOn=!1,this.nextVideoBoxOn=!1,this.shareOn=!1,this.videoPlayingAD=!1,this.embedOn=!1,pw=!1,this.loaded=!1,this.readyList=[],this.videoAdStarted=!1,this.youtubeReady=!1,this.ADTriggered=!1,this.volPerc=1,this.html5STARTED=!1,this.YTAPIReady=!1,this.isYoutubeAPICreated=!1,this.ytSkin=this.options.youtubeSkin,this.ytColor=this.options.youtubeColor,this.ytSkin.toString(),this.ytColor.toString(),this.youtubeControls=this.options.youtubeControls,this.midrollPlayed=!1,this.postrollPlayed=!1,this.prerollActive=!0,this.midrollActive=!1,this.postrollActive=!1,this.qualityBtnEnabled=!1,this.lightBoxThumbnail,this.lightBoxOverlay,this.lightBoxInitiated=!1,this.globalPrerollAds_arr=r.options.globalPrerollAds.split(";"),this.poster2Showing=!1,this.shareBtnEnabled=!1,this.embedBtnEnabled=!1,this.videoAnimationTime=r.options.videoAnimationTime,this.vimeoProtocol="http"==document.location.protocol?"http":"https",this._isAnimation=!1,this.options.youtubeShowRelatedVideos){case!0:r.ytShowRelatedVideos=1;break;case!1:r.ytShowRelatedVideos=0}if(this.isMobile=o,this.RESIZE_EV=d,this.CLICK_EV=a,this.START_EV=l,this.MOVE_EV=n,this.END_EV=p,this.canPlay=!1,this.myVideo=document.createElement("video"),r.deviceAgent=navigator.userAgent.toLowerCase(),r.agentID=r.deviceAgent.match(/(iphone|ipod)/),"fitToBrowser"==this.options.playerLayout||"fitToBrowser"==i.playerLayout){var h=t("#Stellar_video_player");t.each(h,function(){var e=t("
").addClass("fixedCont").css({position:"fixed",width:"100%",height:"100%",top:0,left:0,background:"#000000",zIndex:2147483647});h.parent().append(e),h.appendTo(e)})}if(this.setupElement(),this.setupElementAD(),this.options.rightClickMenu||(t("#Stellar_video_player").bind("contextmenu",function(){return!1}),t(".Stellar_video_player").bind("contextmenu",function(){return!1}),this.options.lightBox&&t(".stellar_vp_mainContainer").bind("contextmenu",function(){return!1})),t(i.videos).each(function(){"youtube"==this.videoType&&(r.includeYoutubeAPI=!0)}),this.includeYoutubeAPI){var m=document.createElement("script");m.src="https://www.youtube.com/iframe_api";var c=document.getElementsByTagName("script")[0];if(c.parentNode.insertBefore(m,c),"default controls"==this.youtubeControls&&(""==this.options.posterImg,this.element.css("visibility","hidden")),"YouTube playlist"!=this.options.videoType&&void 0!=this.options.videoType&&(this.options.youtubePlaylistID=""),"YouTube channel"!=this.options.videoType&&void 0!=this.options.videoType&&(this.options.youtubeChannelID=""),""!=this.options.youtubePlaylistID||""!=this.options.youtubeChannelID){var y=this.options.youtubePlaylistID,v=this.options.youtubeChannelID;this.url;var _="https://www.googleapis.com/youtube/v3/search?order=date&maxResults=50&part=snippet&channelId="+v+"&key=AIzaSyClbVoeyPLBHb9n6Abm0z-AlrzNKeWLKTc",f="https://www.googleapis.com/youtube/v3/playlistItems?&maxResults=50&part=snippet&playlistId="+y+"&key=AIzaSyClbVoeyPLBHb9n6Abm0z-AlrzNKeWLKTc";""!=y?this.url=f:""!=v&&(this.url=_),this.id=-1,this.youtube_array=new Array,this.ads_array=new Array,this.data,t(this.options.videos).each(function(){var t={prerollAD:this.prerollAD,prerollGotoLink:this.prerollGotoLink,preroll_mp4:this.preroll_mp4,prerollSkipTimer:this.prerollSkipTimer,midrollAD:this.midrollAD,midrollAD_displayTime:this.midrollAD_displayTime,midrollGotoLink:this.midrollGotoLink,midroll_mp4:this.midroll_mp4,midrollSkipTimer:this.midrollSkipTimer,postrollAD:this.postrollAD,postrollGotoLink:this.postrollGotoLink,postroll_mp4:this.postroll_mp4,postrollSkipTimer:this.postrollSkipTimer,popupAdShow:this.popupAdShow,popupImg:this.popupImg,popupAdStartTime:this.popupAdStartTime,popupAdEndTime:this.popupAdEndTime,popupAdGoToLink:this.popupAdGoToLink};r.ads_array.push(t)}),this.requestYTList()}else this.init(),this.waitAPIReady()}else this.init()};u.fn=u.prototype,u.fn.waitAPIReady=function(){var t=this,e=!1;if(!this.YTAPIReady)if("undefined"!=typeof YT&&"undefined"!=typeof YT.Player)this.YTAPIReady=!0,this.isYoutubeAPICreated?this.createYoutubeInstance():this.setupYoutubeAPI();else var i=setInterval(function(){"function"!=typeof YT.Player||e||(e=!0,clearInterval(i),t.waitAPIReady())},400)},u.fn.setupYoutubeAPI=function(){var t=this;this.isYoutubeAPICreated||(this.isYoutubeAPICreated=!0,this.YTAPIReady?this.createYoutubeInstance():window.onYouTubeIframeAPIReady||(window.onYouTubePlayerAPIReady=function(){t.YTAPIReady=!0,t.createYoutubeInstance()}))},u.fn.createYoutubeInstance=function(){var t=0;this.options.iOSPlaysinline&&(t=1),"custom controls"==this.options.youtubeControls?this.youtubePlayer=new YT.Player(this.options.instanceName+"youtube",{height:"100%",width:"100%",events:{onReady:this._playlist.onPlayerReady,onStateChange:this._playlist.onPlayerStateChange,onPlaybackQualityChange:this.onPlayerPlaybackQualityChange},playerVars:{rel:this.ytShowRelatedVideos,playsinline:t,wmode:"transparent",controls:0,enablejsapi:1,iv_load_policy:3,showinfo:0}}):"default controls"==this.options.youtubeControls&&(this.youtubePlayer=new YT.Player(this.options.instanceName+"youtube",{height:"100%",width:"100%",events:{onReady:this._playlist.onPlayerReady,onStateChange:this._playlist.onPlayerStateChange,onPlaybackQualityChange:this.onPlayerPlaybackQualityChange},playerVars:{theme:this.ytSkin,color:this.ytColor,rel:this.ytShowRelatedVideos,playsinline:t,wmode:"transparent",controls:1,enablejsapi:1,iv_load_policy:3,modestbranding:0,showinfo:1,autohide:1}}))},u.fn.requestYTList=function(){var e=this;void 0!=e.nextPageToken?url=this.url+"&pageToken="+e.nextPageToken:url=this.url,t.ajax({url:url,success:function(i){e.data=i,e.nextPageToken=i.nextPageToken,t.each(i.items,function(t,i){e.id=e.id+1;var s=i.snippet.title,o=i.snippet.description,a=i.snippet.channelTitle;if(""!=e.options.youtubePlaylistID)var l=i.snippet.resourceId.videoId;if(""!=e.options.youtubeChannelID)var l=i.id;var n;n=void 0!=i.snippet.thumbnails?i.snippet.thumbnails["default"].url:"";var r={prerollAD:!1,prerollGotoLink:"prerollGotoLink",preroll_mp4:"preroll_mp4",prerollSkipTimer:"prerollSkipTimer",midrollAD:!1,midrollAD_displayTime:"midrollAD_displayTime",midrollGotoLink:"midrollGotoLink",midroll_mp4:"midroll_mp4",midrollSkipTimer:"midrollSkipTimer",postrollAD:!1,postrollGotoLink:"postrollGotoLink",postroll_mp4:"postroll_mp4",postrollSkipTimer:"postrollSkipTimer",popupAdShow:!1,popupImg:"popupImg",popupAdStartTime:"popupAdStartTime",popupAdEndTime:"popupAdEndTime",popupAdGoToLink:"popupAdGoToLink"};e.ads_array.push(r);var p={id:e.id,title:s,videoType:"youtube",youtubeID:l,youtubeIDStartSeconds:"youtubeIDStartSeconds",youtubeIDEndSeconds:"youtubeIDEndSeconds",vimeoID:this.vimeoID,video_path_mp4HD:this.mp4HD,enable_mp4_download:this.enable_mp4_download,prerollAD:e.ads_array[e.id].prerollAD,prerollGotoLink:e.ads_array[e.id].prerollGotoLink,preroll_mp4:e.ads_array[e.id].preroll_mp4,prerollSkipTimer:e.ads_array[e.id].prerollSkipTimer,midrollAD:e.ads_array[e.id].midrollAD,midrollAD_displayTime:e.ads_array[e.id].midrollAD_displayTime,midrollGotoLink:e.ads_array[e.id].midrollGotoLink,midroll_mp4:e.ads_array[e.id].midroll_mp4,midrollSkipTimer:e.ads_array[e.id].midrollSkipTimer,postrollAD:e.ads_array[e.id].postrollAD,postrollGotoLink:e.ads_array[e.id].postrollGotoLink,postroll_mp4:e.ads_array[e.id].postroll_mp4,postrollSkipTimer:e.ads_array[e.id].postrollSkipTimer,popupAdShow:e.ads_array[e.id].popupAdShow,popupImg:e.ads_array[e.id].popupImg,popupAdStartTime:e.ads_array[e.id].popupAdStartTime,popupAdEndTime:e.ads_array[e.id].popupAdEndTime,popupAdGoToLink:e.ads_array[e.id].popupAdGoToLink,description:a,thumbImg:n,info:o};e.youtube_array.push(p)}),void 0!=i.nextPageToken?e.requestYTList():(e.init(),e.waitAPIReady())}})},u.fn.init=function(){var e=this;e.preloader=t("
"),e.preloader.addClass("stellar_vp_preloader"),e.element.append(e.preloader),e.preloaderAD=t("
"),e.preloaderAD.addClass("stellar_vp_preloader"),e.elementAD.append(e.preloaderAD),this.videoElement=t(" "),this.videoElement.addClass("stellar_vp_videoPlayer"),this.videoElement.attr({width:this.options.width,height:this.options.height,preload:this.options.preloadSelfHosted,controls:this.options.controls}),this.videoElementAD=t(" "),this.videoElementAD.addClass("stellar_vp_videoPlayerAD"),this.videoElementAD.attr({width:this.options.width,height:this.options.height,preload:this.options.preloadSelfHosted,controls:this.options.controls}),o.iOS()&&e.options.iOSPlaysinline&&(this.videoElement.attr("playsinline","").attr("webkit-playsinline",""),this.videoElementAD.attr("playsinline","").attr("webkit-playsinline",""),this.options.autoplay&&(this.videoElement.attr("muted",""),this.videoElement.muted=!0,this.videoElement.attr("autoplay","autoplay"))),this.controls=t("
"),this.controls.addClass("stellar_vp_controls"),this.controls.addClass("stellar_vp_disabled"),this.element&&this.element.append(this.controls),this.options.showAllControls||this.controls.hide(),this.nowPlayingTitle=t("
").addClass("stellar_vp_nowPlayingTitle").bind(e.CLICK_EV,function(){e.togglePlay()}),this.nowPlayingTitleControlBar=t("
").addClass("stellar_vp_nowPlayingTitleControlBar"),this.controls.addClass("stellar_vp_bg "+this.options.instanceTheme),this.options.showAllControls||this.nowPlayingTitle.hide(),this.element&&this.element.append(this.nowPlayingTitle),e._playlist=new PLAYER.Playlist(t,e,e.options,e.mainContainer,e.element,e.preloader,e.preloaderAD,e.myVideo,this.canPlay,e.CLICK_EV,y,pw,e.deviceAgent,e.agentID,e.youtube_array,e.isMobile),"Right playlist"==e.options.playlist?(e.playerWidth=e.options.videoPlayerWidth-e._playlist.playlistW,e.playerHeight=e.options.videoPlayerHeight):"Bottom playlist"==e.options.playlist?(e.playerWidth=e.options.videoPlayerWidth,e.playerHeight=e.options.videoPlayerHeight-e._playlist.playlistH):"Off"==e.options.playlist&&(e.playerWidth=e.options.videoPlayerWidth,e.playerHeight=e.options.videoPlayerHeight),e.playlistWidth=e._playlist.playlistW,e.initPlayer(),e.resize(),e.resizeAll(),e.autohideControls()},u.fn.initPlayer=function(){var e=this;this.setupHTML5Video(),this.setupHTML5VideoAD(),this.setupEvents(),this.change("initial"),this.setupControls(),this.load(),this.setupAutoplay(),this.setupLightBox(),this.setupElements(),this.element.bind("idle",t.proxy(this.idle,this)),this.element.bind("state.videoPlayer",t.proxy(function(){this.element.trigger("reset.idle")},this)),this.secondsFormat=function(t){isNaN(t)&&(t=0);var e=[],i=Math.floor(t/60);i>60&&(i%=60);var s=Math.floor(t/3600),o=0==t?0:t%60;o=Math.round(o);var a=function(t){return 10>t?"0"+t:t};return s>0&&e.push(a(s)),e.push(a(i)),e.push(a(o)),e.join(":")};var e=this;t(window).resize(function(){e._inFullscreen||e.resizeAll()}),t(window).bind(this.RESIZE_EV,function(){e.resizeAll()}),t(document).bind("webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",function(t){e.resize(t)}),this.resize=function(){document.webkitIsFullScreen||document.fullscreenElement||document.mozFullScreen||document.msieFullScreen||document.msFullscreenElement?(e._playlist.hidePlaylist(),e.element.addClass("stellar_vp_fullScreen"),e.elementAD.addClass("stellar_vp_fullScreen"),t(e.mainContainer).find(".fa-stellar-desktop-expand").removeClass("fa-stellar-desktop-expand").addClass("fa-stellar-desktop-compress"),t(e.mainContainer).find(".fa-stellar-desktop-expand-zoom").removeClass("fa-stellar-desktop-expand-zoom").addClass("fa-stellar-desktop-compress"),t(e.fsEnterADBox).find(".fa-stellar-expandAD").removeClass("fa-stellar-expandAD").addClass("fa-stellar-compressAD"),e.element.width("100%"),e.element.height("100%"),e.elementAD.width("100%"),e.elementAD.height("100%"),e.mainContainer.width("100%"),e.mainContainer.height("100%"),e.mainContainer.css("position","fixed"),e.mainContainer.css("left",0),e.mainContainer.css("top",0),e.rewindBtnWrapper.show(),e.resizeVideoTrack(),e.mainContainer.parent().css("position","relative"),e._inFullscreen=!0):(e._playlist.showPlaylist(),e.element.removeClass("stellar_vp_fullScreen"),e.elementAD.removeClass("stellar_vp_fullScreen"),t(e.mainContainer).find(".fa-stellar-desktop-compress").removeClass("fa-stellar-desktop-compress").addClass("fa-stellar-desktop-expand"),t(e.mainContainer).find(".fa-stellar-desktop-compress-zoom").removeClass("fa-stellar-desktop-compress-zoom").addClass("fa-stellar-desktop-expand"),t(e.fsEnterADBox).find(".fa-stellar-compressAD").removeClass("fa-stellar-compressAD").addClass("fa-stellar-expandAD"),e.mainContainer.css("left",""),e.mainContainer.css("top",""),"fitToContainer"==e.options.playerLayout||"fitToBrowser"==e.options.playerLayout?(e.mainContainer.width("100%"),e.mainContainer.height("100%")):"fixedSize"==e.options.playerLayout&&(e.mainContainer.width(e.options.videoPlayerWidth),e.mainContainer.height(e.options.videoPlayerHeight)),e.mainContainer.css("position","absolute"),e.element.css({zIndex:455558}),(1==e._playlist.videos_array[e._playlist.videoid].prerollAD||"yes"==e._playlist.videos_array[e._playlist.videoid].prerollAD||e.options.showGlobalPrerollAds)&&(!e._playlist.videoAdPlayed&&e.videoAdStarted?e.elementAD.css({zIndex:455559}):e.elementAD.css({zIndex:455557})),e.mainContainer.parent().css("zIndex",1),"fitToContainer"!=this.options.playerLayout&&"fixedSize"!=this.options.playerLayout||e.mainContainer.parent().css("position","relative"),e._inFullscreen=!1,e.resizeAll(),e.setInitialSize()),e.resizeVideoTrack(),e.positionOverScreenButtons(),e.positionLogo(),e.positionEmbed(),e.positionPopup(),e.positionQualityWindow(),e.positionShareMask(),e.resizeBars(),e.options.hideControlsOnMouseOut&&e.hideControls()}},u.fn.setInitialSize=function(){if(!this._isAnimation)if("fitToContainer"==this.options.playerLayout||"fitToBrowser"==this.options.playerLayout){if("Right playlist"==this.options.playlist){if(this.options.videoRatioStretch)var e=(this.parent.width()-this._playlist.playlist.width())/this.options.videoRatio;else var e=this.parent.width()/this.options.videoRatio;this.mainContainer.height(e)}else if("Bottom playlist"==this.options.playlist){if(this.options.videoRatioStretch)var e=this.parent.width()/this.options.videoRatio+this._playlist.playlist.height();else var e=this.parent.width()/this.options.videoRatio;this.mainContainer.height(e)}else{var e=this.parent.width()/this.options.videoRatio;this.mainContainer.height(e)}this.parent.height(e),this.stretching?"Right playlist"==this.options.playlist?(this.element.width(this.parent.parent().width()),this.element.height(this._playlist.playlist.height())):"Bottom playlist"==this.options.playlist?(this.element.width(this.parent.parent().width()),this.element.height(this.mainContainer.height())):"Off"==this.options.playlist&&(this.element.width(this.parent.parent().width()),this.element.height(this.parent.parent().height())):"Right playlist"==this.options.playlist?(this.element.width(this.parent.parent().width()-this._playlist.playlist.width()),this.element.height(this._playlist.playlist.height())):"Bottom playlist"==this.options.playlist?(this.element.width(this.parent.parent().width()),this.element.height(this.mainContainer.height()-this._playlist.playlist.height())):"Off"==this.options.playlist&&(this.element.width(this.parent.parent().width()),this.element.height(this.parent.height())),this.elementAD.width(this.element.width()),this.elementAD.height(this.element.height())}else"fixedSize"==this.options.playerLayout&&("Right playlist"==this.options.playlist?(this.mainContainer.css({width:this.newPlayerWidth,height:this.newPlayerHeight}),this.element.css({width:this.newPlayerWidth,height:this.newPlayerHeight})):"Bottom playlist"==this.options.playlist?(this.element.width(this.newPlayerWidth),this.mainContainer.css({width:this.newPlayerWidth,height:this.newPlayerHeight})):"Off"==this.options.playlist&&(this.element.css({width:this.newPlayerWidth,height:this.newPlayerHeight}),this.mainContainer.css({width:this.newPlayerWidth,height:this.newPlayerHeight})),this.stretching?"Right playlist"==this.options.playlist?this.element.width(t(this.mainContainer).width()):"Bottom playlist"==this.options.playlist?this.element.height(this.newPlayerHeight):"Off"==this.options.playlist&&this.element.width(t(this.mainContainer).width()):"Right playlist"==this.options.playlist?(this.element.width(t(this.mainContainer).width()-this._playlist.playlist.width()),this._playlist.resizePlaylist(this.newPlayerWidth,this.newPlayerHeight)):"Bottom playlist"==this.options.playlist?(this.element.height(this.newPlayerHeight-this._playlist.playlistH),this._playlist.resizePlaylist(this.newPlayerWidth,this.newPlayerHeight)):"Off"==this.options.playlist&&this.element.width(t(this.mainContainer).width()))},u.fn.fullscreenAvailable=function(){return h||m||c},u.fn.setupLightBox=function(){var e=this;if(this.options.lightBox){this.options.playerLayout="fixedSize";var i=this.mainContainer.parent();t.each(i,function(){e.lightBoxOverlay=t("
").addClass("stellar_vp_lightBoxOverlay").hide().css({opacity:0}),e.lightBoxCloseBtnWrapper=t("
").addClass("stellar_vp_lightBoxCloseBtnWrapper").addClass("stellar_vp_bg "+e.options.instanceTheme).addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.toggleLightBox()}),e.mainContainer.append(e.lightBoxCloseBtnWrapper),e.lightBoxCloseBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_lightBoxCloseBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+e.options.instanceTheme).addClass("fa-stellar-times"),
e.lightBoxCloseBtnWrapper.append(e.lightBoxCloseBtn),e.lightBoxOverlayTransparent=t("
").addClass("stellar_vp_lightBoxOverlayTransparent").bind(e.CLICK_EV,function(){e.options.lightBoxCloseOnOutsideClick&&e.toggleLightBox()}).appendTo(e.lightBoxOverlay),e.mainContainer.addClass("stellar_vp_lightBoxBorder"),i.parent().append(e.lightBoxOverlay),e.mainContainer.appendTo(e.lightBoxOverlay),e.lightBoxThumbnailWrap=t("
").addClass("stellar_vp_lightBoxThumbnailWrap").bind(e.CLICK_EV,function(){e.toggleLightBox()}).css({cursor:"pointer",width:e.options.lightBoxThumbnailWidth,height:e.options.lightBoxThumbnailHeight}).appendTo(i),e.lightBoxThumbnail=t(' ').attr("src",e.options.lightBoxThumbnail).appendTo(e.lightBoxThumbnailWrap),e.lightBoxPlayButton=t("
"),e.lightBoxPlayButton.addClass("stellar_vp_playButtonScreen").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-playScreen "+e.options.instanceTheme).appendTo(e.lightBoxThumbnailWrap)})}},u.fn.setColorAccent=function(e,i){t(".fa-stellar-playScreen").css({color:e}),t(i).hasClass("fa-stellar-random")&&t(".fa-stellar-random").css({color:e}),t(i).hasClass("fa-stellar-random-zoom")&&t(".fa-stellar-random-zoom").css({color:e}),t(i).hasClass("fa-stellar-toggle-off")&&t(".fa-stellar-toggle-off").css({color:e}),t(i).hasClass("fa-stellar-toggle-on")&&t(".fa-stellar-toggle-on").css({color:e}),t(i).hasClass("fa-stellar-toggle-off-zoom")&&t(".fa-stellar-toggle-off-zoom").css({color:e}),t(i).hasClass("fa-stellar-toggle-on-zoom")&&t(".fa-stellar-toggle-on-zoom").css({color:e}),t(i).hasClass("fa-stellar-cog")&&t(".fa-stellar-cog").css({color:e}),t(i).hasClass("fa-stellar-cog-zoom")&&t(".fa-stellar-cog-zoom").css({color:e}),t(i).hasClass("fa-stellar-external-link")&&t(".fa-stellar-external-link").css({color:e}),t(i).hasClass("fa-stellar-external-link-zoom")&&t(".fa-stellar-external-link-zoom").css({color:e}),t(i).hasClass("fa-stellar-code")&&t(".fa-stellar-code").css({color:e}),t(i).hasClass("fa-stellar-code-zoom")&&t(".fa-stellar-code-zoom").css({color:e})},u.fn.removeColorAccent=function(e){t(e).hasClass("fa-stellar-random")&&t(".fa-stellar-random").css("color",""),t(e).hasClass("fa-stellar-random-zoom")&&t(".fa-stellar-random-zoom").css("color",""),t(e).hasClass("fa-stellar-toggle-off")&&t(".fa-stellar-toggle-off").css("color",""),t(e).hasClass("fa-stellar-toggle-off-zoom")&&t(".fa-stellar-toggle-off-zoom").css("color",""),t(e).hasClass("fa-stellar-toggle-on")&&t(".fa-stellar-toggle-on").css("color",""),t(e).hasClass("fa-stellar-toggle-on-zoom")&&t(".fa-stellar-toggle-on-zoom").css("color",""),t(e).hasClass("fa-stellar-cog")&&t(".fa-stellar-cog").css("color",""),t(e).hasClass("fa-stellar-cog-zoom")&&t(".fa-stellar-cog-zoom").css("color",""),t(e).hasClass("fa-stellar-chevron-right")&&t(".fa-stellar-chevron-right").css("color",""),t(e).hasClass("fa-stellar-chevron-right-zoom")&&t(".fa-stellar-chevron-right-zoom").css("color",""),t(e).hasClass("fa-stellar-chevron-left")&&t(".fa-stellar-chevron-left").css("color",""),t(e).hasClass("fa-stellar-chevron-left-zoom")&&t(".fa-stellar-chevron-left-zoom").css("color",""),t(e).hasClass("fa-stellar-external-link")&&t(".fa-stellar-external-link").css("color",""),t(e).hasClass("fa-stellar-external-link-zoom")&&t(".fa-stellar-external-link-zoom").css("color",""),t(e).hasClass("fa-stellar-code")&&t(".fa-stellar-code").css("color",""),t(e).hasClass("fa-stellar-code-zoom")&&t(".fa-stellar-code-zoom").css("color",""),t(e).hasClass("fa-stellar-download")&&t(".fa-stellar-download").css("color",""),t(e).hasClass("fa-stellar-download-zoom")&&t(".fa-stellar-download-zoom").css("color","")},u.fn.resizeAll=function(){var e=this;if("fitToContainer"==e.options.playerLayout||"fitToBrowser"==e.options.playerLayout){if("Right playlist"==this.options.playlist){if(this.options.videoRatioStretch)var i=(this.parent.width()-this._playlist.playlist.width())/this.options.videoRatio;else var i=this.parent.width()/this.options.videoRatio;this.mainContainer.height(i)}else if("Bottom playlist"==this.options.playlist){if(this.options.videoRatioStretch)var i=this.parent.width()/this.options.videoRatio+this._playlist.playlist.height();else var i=this.parent.width()/this.options.videoRatio;this.mainContainer.height(i)}else{var i=this.parent.width()/this.options.videoRatio;this.mainContainer.height(i)}switch(this.parent.height(i),e.options.playlist){case"Right playlist":this.stretching?((this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&(this.parent.width()<362?this.downloadBtnLink.hide():this.downloadBtnLink.show()),this.qualityBtnWrapper.show(),this.parent.width()<327?this.shareBtnWrapper.hide():this.shareBtnWrapper.show(),this.embedBtnWrapper.show(),this.rewindBtnWrapper.show(),this.parent.width()<300?this.volumeTrackWrapper.css("width",48):this.volumeTrackWrapper.css("width",62)):((this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&(this.parent.width()<665?e.downloadBtnLink.hide():e.downloadBtnLink.show()),e.options.shareShow&&(this.parent.width()<626?e.shareBtnWrapper.hide():e.shareBtnWrapper.show()),e.options.embedShow&&(this.parent.width()<598?e.embedBtnWrapper.hide():e.embedBtnWrapper.show()),this.parent.width()<565?e.rewindBtnWrapper.hide():e.rewindBtnWrapper.show(),this.parent.width()<522?(this.mainContainer.find(".stellar_vp_nextTxtWrapper").hide(),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperRight").hide(),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperLeft").css({left:0}),this._playlist.playlist.css({width:130}),this.mainContainer.find(".stellar_vp_itemRight").hide(),this.mainContainer.find("#stellar_vp_input").css({width:90}),this.mainContainer.find(".stellar_vp_playlistBarSearch_bottom").css({width:90}),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperSearch").css({left:"50%",marginLeft:-45}),(this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&(this.parent.width()<492?e.downloadBtnLink.hide():e.downloadBtnLink.show()),e.options.shareShow&&(this.parent.width()<460?e.shareBtnWrapper.hide():e.shareBtnWrapper.show()),e.options.embedShow&&(this.parent.width()<426?e.embedBtnWrapper.hide():e.embedBtnWrapper.show()),this.rewindBtnWrapper.show(),this.parent.width()<394?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),this.parent.width()<360?this.qualityBtnWrapper.hide():this.qualityBtnWrapper.show(),this.parent.width()<332?this.volumeTrackWrapper.css("width",48):this.volumeTrackWrapper.css("width",62),this.parent.width()<330?this._playlist.nextBtn.hide():this._playlist.nextBtn.show()):(this._playlist.playlist.css({width:300}),this.mainContainer.find(".stellar_vp_nextTxtWrapper").show(),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperRight").show(),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperLeft").css({left:73}),this.mainContainer.find(".stellar_vp_itemRight").show(),this.mainContainer.find("#stellar_vp_input").css({width:200}),this.mainContainer.find(".stellar_vp_playlistBarSearch_bottom").css({width:200}),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperSearch").css({left:"50px",marginLeft:""}))),this.parent.width()<522?this._playlist.playlist.css({width:130}):this._playlist.playlist.css({width:300}),this.mainContainer.height()<220?(this.transformElement(this.playButtonScreen,.8,"center center"),this.transformElement(this.toggleAdPlayBox,.8,"center center"),this.transformElement(this.skipAdCount,.8,"bottom right"),this.transformElement(this.skipAdBox,.8,"bottom right"),this.transformElement(this.nextVideoBox_mask,.8,"bottom left"),this.transformElement(this.qualityWindow_mask,.8,"bottom center"),this.transformElement(this.logoImg,.6,"bottom left"),this.transformElement(this.adImg,.6,"center bottom"),this.transformElement(this.nowPlayingTitle.find(".stellar_vp_nowPlayingText"),.6,"top left"),t(this.nowPlayingTitle).css({height:30}),this.toolTip[0].style.setProperty("font-size",e.options.tooltipFontSize-2+"px","important")):(this.transformElement(this.playButtonScreen,1,"center center"),this.transformElement(this.toggleAdPlayBox,1,"center center"),this.transformElement(this.skipAdCount,1,"bottom right"),this.transformElement(this.skipAdBox,1,"bottom right"),this.transformElement(this.nextVideoBox_mask,1,"bottom left"),this.transformElement(this.qualityWindow_mask,1,"bottom center"),this.transformElement(this.logoImg,1,"bottom left"),this.transformElement(this.adImg,1,"center bottom"),this.transformElement(this.nowPlayingTitle.find(".stellar_vp_nowPlayingText"),1,"top left"),t(this.nowPlayingTitle).css({height:70}),this.toolTip[0].style.setProperty("font-size",e.options.tooltipFontSize+"px","important"));break;case"Bottom playlist":this.parent.width()<580?(this.transformElement(this.playButtonScreen,.8,"center center"),this.transformElement(this.toggleAdPlayBox,.8,"center center"),this.transformElement(this.skipAdCount,.8,"bottom right"),this.transformElement(this.skipAdBox,.8,"bottom right"),this.transformElement(this.nextVideoBox_mask,.8,"bottom left"),this.transformElement(this.qualityWindow_mask,.8,"bottom center"),this.transformElement(this.logoImg,.6,"bottom left"),this.transformElement(this.adImg,.6,"center bottom"),this.transformElement(this.nowPlayingTitle.find(".stellar_vp_nowPlayingText"),.6,"top left"),t(this.nowPlayingTitle).css({height:30}),this.toolTip[0].style.setProperty("font-size",e.options.tooltipFontSize-2+"px","important"),t(this._playlist.playlist).css({height:127}),this._playlist.playlistH=t(this._playlist.playlist).height(),this.parent.width()<448?(this.mainContainer.find("#stellar_vp_input").css({width:90}),this.mainContainer.find(".stellar_vp_playlistBarSearch_bottom").css({width:90}),t(this._playlist.playlist).css({height:92}),this._playlist.playlistH=t(this._playlist.playlist).height(),this.mainContainer.find(".stellar_vp_itemLeft").css({width:44,height:44}),this.mainContainer.find(".stellar_vp_itemSelected").css({width:74,height:44}),this.mainContainer.find(".stellar_vp_itemUnselected").css({width:74,height:44}),this.mainContainer.find(".stellar_vp_itemRight_bottom").hide(),this.mainContainer.find(".stellar_vp_thumbnail_image").css("height","100%"),this.mainContainer.find(".stellar_vp_thumbnail_imageSelected").css("height","100%"),this.mainContainer.find(".stellar_vp_itemHoverBox").css("height","100%"),this.mainContainer.find(".stellar_vp_itemHoverBox").css("width","100%"),this.options.shareShow&&(this.parent.width()<330?this.shareBtnWrapper.hide():this.shareBtnWrapper.show()),this.options.embedShow&&(this.parent.width()<294?this.embedBtnWrapper.hide():this.embedBtnWrapper.show()),this.parent.width()<264?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),this.parent.width()<230?this.qualityBtnWrapper.hide():this.qualityBtnWrapper.show(),(this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&(this.parent.width()<362?this.downloadBtnLink.hide():this.downloadBtnLink.show())):(this.mainContainer.find("#stellar_vp_input").css({width:200}),this.mainContainer.find(".stellar_vp_playlistBarSearch_bottom").css({width:200}),this._playlist.playlistH=t(this._playlist.playlist).height(),this.mainContainer.find(".stellar_vp_itemLeft").css({width:80,height:80}),this.mainContainer.find(".stellar_vp_itemSelected").css({width:300,height:86}),this.mainContainer.find(".stellar_vp_itemUnselected").css({width:300,height:86}),this.mainContainer.find(".stellar_vp_itemRight_bottom").show(),this.mainContainer.find(".stellar_vp_thumbnail_image").css("height",""),this.mainContainer.find(".stellar_vp_thumbnail_imageSelected").css("height",""),this.mainContainer.find(".stellar_vp_itemHoverBox").css("height",""),this.mainContainer.find(".stellar_vp_itemHoverBox").css("width",""))):(this.transformElement(this.playButtonScreen,1,"center center"),this.transformElement(this.toggleAdPlayBox,1,"center center"),this.transformElement(this.skipAdCount,1,"bottom right"),this.transformElement(this.skipAdBox,1,"bottom right"),this.transformElement(this.nextVideoBox_mask,1,"bottom left"),this.transformElement(this.qualityWindow_mask,1,"bottom center"),this.transformElement(this.logoImg,1,"bottom left"),this.transformElement(this.adImg,1,"center bottom"),this.transformElement(this.nowPlayingTitle.find(".stellar_vp_nowPlayingText"),1,"top left"),t(this.nowPlayingTitle).css({height:70}),this.toolTip[0].style.setProperty("font-size",e.options.tooltipFontSize+"px","important"),this.mainContainer.find("#stellar_vp_input").css({width:200}),this.mainContainer.find(".stellar_vp_playlistBarSearch_bottom").css({width:200}),this._playlist.playlistH=t(this._playlist.playlist).height(),this.mainContainer.find(".stellar_vp_itemLeft").css({width:80,height:80}),this.mainContainer.find(".stellar_vp_itemSelected").css({width:300,height:86}),this.mainContainer.find(".stellar_vp_itemUnselected").css({width:300,height:86}),this.mainContainer.find(".stellar_vp_itemRight_bottom").show(),this.mainContainer.find(".stellar_vp_thumbnail_image").css("height",""),this.mainContainer.find(".stellar_vp_thumbnail_imageSelected").css("height",""),this.mainContainer.find(".stellar_vp_itemHoverBox").css("height",""),this.mainContainer.find(".stellar_vp_itemHoverBox").css("width",""),t(this._playlist.playlist).css({height:146}));case"Off":this.parent.width()<289?e.rewindBtnWrapper.hide():e.rewindBtnWrapper.show()}e._playlist.resizePlaylist(),e.setInitialSize(),e.resizeVideoTrack(),e.positionOverScreenButtons(),e.resizeBars(),e.positionLogo(),e.positionEmbed(),e.positionPopup(),e.positionQualityWindow(),e.positionShareMask(),e.positionElementsDuringAnimation()}else if("fixedSize"==e.options.playerLayout){if(e.newPlayerWidth=t(window).width()-e.mainContainer.position().left-48,e.newPlayerHeight=e.newPlayerWidth/(e.options.videoPlayerWidth/e.options.videoPlayerHeight),e.newPlayerWidth=s?(l(),e=!0,t.trigger("idle",!0)):a+=o};t.bind(i,l);var r=setInterval(n,o);t.on("unload",function(){clearInterval(r)})},u.fn.resizeBars=function(){"youtube"==this._playlist.videos_array[this._playlist.videoid].videoType||"YouTube"==this.options.videoType?void 0!=this.youtubePlayer&&this._playlist.youtubeSTARTED&&(this.progressWidth=this.youtubePlayer.getCurrentTime()/this.youtubePlayer.getDuration()*this.videoTrack.width(),this.videoTrackProgress.css("width",this.progressWidth),this.progressIdleWidth=this.youtubePlayer.getCurrentTime()/this.youtubePlayer.getDuration()*this.progressIdleTrack.width(),this.progressIdle.css("width",this.progressIdleWidth),this.buffered=this.youtubePlayer.getVideoLoadedFraction(),this.downloadWidth=this.buffered*this.videoTrack.width(),this.videoTrackDownload.css("width",this.downloadWidth),this.progressIdleDownloadWidth=this.buffered*this.progressIdleTrack.width(),this.progressIdleDownload.css("width",this.progressIdleDownloadWidth)):"HTML5"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=this.options.videoType||(this.downloadWidth=this.buffered/this.video.duration*this.videoTrack.width(),this.videoTrackDownload.css("width",this.downloadWidth),this.progressWidth=this.video.currentTime/this.video.duration*this.videoTrack.width(),this.videoTrackProgress.css("width",this.progressWidth),this.progressIdleDownloadWidth=this.buffered/this.video.duration*this.progressIdleTrack.width(),this.progressIdleDownload.css("width",this.progressIdleDownloadWidth),this.progressIdleWidth=this.video.currentTime/this.video.duration*this.progressIdleTrack.width(),this.progressIdle.css("width",this.progressIdleWidth),this.progressWidthAD=this.videoAD.currentTime/this.videoAD.duration*this.elementAD.width(),this.progressAD.css("width",this.progressWidthAD))},u.fn.createPopup=function(){var e=this;this.adImg=t("
"),this.adImg.addClass("stellar_vp_popup"),this.image=new Image,this.image.src=this._playlist.videos_array[this._playlist.videoid].popupImg,t(this.image).on("load",function(){e.adImg.append(e.image),e.positionPopup(),e.adImg.append(e.adClose)}),this.element.append(this.adImg),this.adImg.hide(),this.adImg.css({opacity:0}),this.popupBtnClose=t("
"),this.popupBtnClose.addClass("stellar_vp_btnClose stellar_vp_themeColorText"),this.infoWindow.append(this.popupBtnClose),this.popupBtnClose.css({bottom:0}),this.adImg.append(this.popupBtnClose),this.popupBtnCloseIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-times-circle").addClass("stellar_vp_themeColor"),this.popupBtnClose.append(this.popupBtnCloseIcon),this.popupBtnClose.bind(this.CLICK_EV,t.proxy(function(){e.adOn=!0,e.togglePopup()},this)),this.popupBtnClose.mouseover(function(){t(this).stop().animate({opacity:.7},200)}),this.popupBtnClose.mouseout(function(){t(this).stop().animate({
opacity:1},200)})},u.fn.positionPopup=function(){var t=this;this.adImg.css({bottom:t.controls.height()+20,left:t.element.width()/2-this.adImg.width()/2})},u.fn.newAd=function(){var e=this;this.adImg.hide(),this.image.src="",this.image.src=this._playlist.videos_array[this._playlist.videoid].popupImg,this.adOn||t(this.image).bind(this.START_EV,function(){window.open(e._playlist.videos_array[e._playlist.videoid].popupAdGoToLink),"youtube"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"YouTube"!=e.options.videoType||e.youtubePlayer.pauseVideo(),"HTML5"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=e.options.videoType||e.pause(),"vimeo"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"Vimeo"!=e.options.videoType||e._playlist.vimeoPlayer.pause()})},u.fn.createLogo=function(){var e=this;this.logoImg=t("
"),this.logoImg.addClass("stellar_vp_logo"),this.img=new Image,this.img.src=e.options.logoPath,t(this.img).on("load",function(){e.logoImg.append(e.img),e.positionLogo()}),e.options.logoShow&&this.element.append(this.logoImg),e.options.logoClickable&&(this.logoImg.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.logoGoToLink)},this)),this.logoImg.mouseover(function(){t(this).stop().animate({opacity:.8},200)}),this.logoImg.mouseout(function(){t(this).stop().animate({opacity:1},200)}),t(".stellar_vp_logo").css("cursor","pointer"))},u.fn.positionVolumeTrackWrapper=function(){this.volumeTrackWrapper.css({left:this.unmuteBtnWrapper.position().left+this.unmuteBtnWrapper.width()})},u.fn.positionEmbed=function(){t(".stellar_vp_embedWrapp").css({top:t(".stellar_vp_embedWindow").height()/2-t(".stellar_vp_embedWrapp").height()/2})},u.fn.positionLogo=function(){var t,e=this;"youtube"==e._playlist.videos_array[e._playlist.videoid].videoType||"YouTube"==e.options.videoType?t=70:"HTML5"==e._playlist.videos_array[e._playlist.videoid].videoType||"HTML5 (self-hosted)"==e.options.videoType?t=70:"vimeo"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"Vimeo"!=e.options.videoType||(t=55),"bottom-right"==e.options.logoPosition?this.logoImg.css({bottom:t,right:buttonsMargin}):"bottom-left"==e.options.logoPosition?this.logoImg.css({bottom:t,left:buttonsMargin}):"top-left"==e.options.logoPosition&&this.logoImg.css({top:20,left:20})},u.fn.positionQualityWindow=function(){var t=this;this.qualityWindow_mask.css({left:t.controlsBtnsWrapperRight.position().left+t.qualityBtnWrapper.position().left-50+16-4,bottom:this.controls.height()+6+20})},u.fn.positionShareMask=function(){var t=this;this.shareWindow_mask.css({left:t.controlsBtnsWrapperRight.position().left+t.shareBtn.position().left-55.5+16-2.5,bottom:this.controls.height()+6+20})},u.fn.showVideoElements=function(){this.videoElement.show(),this.videoElementAD.show()},u.fn.hideVideoElements=function(){this.videoElement.hide(),this.videoElementAD.hide()},u.fn.createAds=function(){var e=this;adsImg=t("
"),adsImg.addClass("ads"),image=new Image,image.src=e._playlist.videos_array[0].adsPath,t(image).on("load",function(){adsImg.append(image),e.positionAds()}),this.element.append(adsImg),adsImg.hide()},u.fn.positionAds=function(){var t=this;adsImg.css({bottom:t.controls.height()+5,left:t.element.width()/2-adsImg.width()/2})},u.fn.setupAutoplay=function(){var t=this;this.options.lightBox||(t.options.autoplay?t.isMobile.any()?t.playButtonScreen.show():t.play():t.options.autoplay||(t.pause(),t.preloader.hide()))},u.fn.createNowPlayingText=function(){var t=this;t.options.loadRandomVideoOnStart?(this.nowPlayingTitle.append(''+this._playlist.videos_array[t._playlist.rand].title+"
"),this.nowPlayingTitleControlBar.append(''+this._playlist.videos_array[t._playlist.rand].title+"
")):(this.nowPlayingTitle.append(''+this._playlist.videos_array[0].title+"
"),this.nowPlayingTitleControlBar.append(''+this._playlist.videos_array[0].title+"
")),this.nowPlayingTitleW=this.nowPlayingTitle.width(),this.options.nowPlayingText||this.nowPlayingTitle.hide()},u.fn.createInfoWindowContent=function(){var t=this;t.options.loadRandomVideoOnStart?(this.infoWindow.append(''+this._playlist.videos_array[t._playlist.rand].title+"
"),this.infoWindow.append(''+this._playlist.videos_array[t._playlist.rand].info_text+"
")):(this.infoWindow.append(''+this._playlist.videos_array[0].title+"
"),this.infoWindow.append(''+this._playlist.videos_array[0].info_text+"
")),this.infoWindow.css({top:t.screenBtnsWindow.position().top+t.infoBtn.height()+10,right:-20,opecity:0}).hide()},u.fn.createNextVideoBox=function(){var e=this;this.nextVideoBox_mask=t("
"),this.nextVideoBox_mask.addClass("stellar_vp_nextVideoBoxMask").hide(),this.element&&this.element.append(this.nextVideoBox_mask),this.nextVideoBox=t("
").addClass("stellar_vp_nextVideoBox").addClass("stellar_vp_bg "+this.options.instanceTheme),this.nextVideoBox_mask.append(this.nextVideoBox),this.i=document.createElement("img"),this.i.src=e._playlist.videos_array[e._playlist.videoid+1].thumbnail_image,this.nextVideoBox.append(this.i),t(".stellar_vp_nextVideoBox img").addClass("stellar_vp_nextVideoBoxImage stellar_vp_themeColorThumbBorder"),this.nextVideoBoxTitle=t("
").addClass("stellar_vp_nextVideoBoxContentLeft"),this.nextVideoBox.append(this.nextVideoBoxTitle),this.nextVideoBoxTitle.append(''+e._playlist.videos_array[e._playlist.videoid+1].title+"
"),t(this.nextVideoBoxTitle).find(".stellar_vp_nextVideoBoxTitle").addClass("stellar_vp_controlsColor "+this.options.instanceTheme),this.nextVideoBox_mask.css({left:e.timeElapsed.position().left+e.timeElapsed.width()+10,bottom:e.controls.height()+6}),this.nextVideoBox.css({top:e.nextVideoBox.height(),opacity:0}),this._playlist.nextBtn.mouseover(function(){e.nextVideoBoxOn=!1,e.toggleNextVideoBox()}),this._playlist.nextBtn.mouseout(function(){e.nextVideoBoxOn=!0,e.toggleNextVideoBox()})},u.fn.createSkipAd=function(){var e=this;this.skipAdBox=t("
").addClass("stellar_vp_skipAdBox").bind(e.CLICK_EV,function(){e.closeAD()}).hide(),this.elementAD.append(this.skipAdBox),this.skipAdBoxContentLeft=t("
").addClass("stellar_vp_skipAdBoxContentLeft"),this.skipAdBox.append(this.skipAdBoxContentLeft),this.skipAdBoxContentLeft.append(''+this.options.skipAdvertisementText+"
"),this.skipAdBoxIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-step-forward-ad"),this.skipAdBox.append(this.skipAdBoxIcon)},u.fn.createSkipAdCount=function(){var e=this;this.skipAdCount=t("
").addClass("stellar_vp_skipAdCount").hide(),this.elementAD.append(this.skipAdCount),this.i=document.createElement("img"),this.i.src=e._playlist.videos_array[e._playlist.videoid].thumbnail_image,this.skipAdCount.append(this.i),t(".stellar_vp_skipAdCount img").addClass("stellar_vp_skipAdCountImage stellar_vp_themeColorThumbBorder"),this.skipAdCountContentLeft=t("
").addClass("stellar_vp_skipAdCountContentLeft"),this.skipAdCount.append(this.skipAdCountContentLeft),this.skipAdCountContentLeft.append('
'),this.skipAdCount.css({right:-this.skipAdCount.width(),bottom:28}).hide()},u.fn.createAdTogglePlay=function(){var e=this;this.toggleAdPlayBox=t("
").addClass("stellar_vp_toggleAdPlayBox").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-playScreen "+this.options.instanceTheme).bind(e.CLICK_EV,function(){e.togglePlayAD(),e.ADTriggered=!0}).hide(),this.elementAD.append(this.toggleAdPlayBox)},u.fn.createVideoAdTitleInsideAD=function(){this.videoAdBoxInside=t("
"),this.videoAdBoxInside.addClass("stellar_vp_videoAdBoxInside"),this.elementAD.append(this.videoAdBoxInside),this.videoAdBoxInside.append(''+this.options.advertisementTitle+"
"),this.videoAdBoxInside.append(this.timeLeftInside),this.videoAdBoxInside.hide()},u.fn.createEmbedWindowContent=function(){var e=this;t(this.embedWindow).append('
'),t(".stellar_vp_embedWrapp").append(''+e.options.embedWindowTitle2+"
"),this.embedTxt=t("
").addClass("stellar_vp_embedText").addClass("stellar_vp_embedText "+this.options.instanceTheme),t(".stellar_vp_embedWrapp").append(this.embedTxt),this.copy=t("
").attr("title","Copy to clipboard").attr("id","stellar_vp_copy").addClass("copyBtn").addClass(this.options.instanceTheme),t(".stellar_vp_embedWrapp").append(this.copy),t(".stellar_vp_embedWrapp").find("#stellar_vp_copy").append(''+e.options.copyTxt+"
"),t(".stellar_vp_embedWrapp").append(''+e.options.embedWindowTitle3+"
"),this.embedTxt2=t("
").addClass("stellar_vp_embedText2").addClass("stellar_vp_embedText "+this.options.instanceTheme),t(".stellar_vp_embedWrapp").append(this.embedTxt2),this.copy2=t("
").attr("title","Copy to clipboard").attr("id","stellar_vp_copy2").addClass("copyBtn").addClass(this.options.instanceTheme),t(".stellar_vp_embedWrapp").append(this.copy2),t(".stellar_vp_embedWrapp").find("#stellar_vp_copy2").append(''+e.options.copyTxt+"
");var i=this.options.embedCodeSrc,s=this.options.videoPlayerWidth,o=this.options.videoPlayerHeight;t(".stellar_vp_embedWrapp").find(".stellar_vp_embedText").text(""),this.updateEmbedText2(),this.copy.bind(this.CLICK_EV,function(){var i=t(" ");t("body").append(i),i.val(e.embedTxt.text()).select(),document.execCommand("copy"),i.remove(),t(e.copy2).find(".stellar_vp_copyInside").text(e.options.copyTxt),t(this).find(".stellar_vp_copyInside").text(e.options.copiedTxt),t(e.embedTxt).addClass("stellar_vp_highlightText"),t(e.embedTxt2).removeClass("stellar_vp_highlightText")}),this.copy2.bind(this.CLICK_EV,function(){var i=t(" ");t("body").append(i),i.val(e.embedTxt2.text()).select(),document.execCommand("copy"),i.remove(),t(e.copy).find(".stellar_vp_copyInside").text(e.options.copyTxt),t(this).find(".stellar_vp_copyInside").text(e.options.copiedTxt),t(e.embedTxt2).addClass("stellar_vp_highlightText"),t(e.embedTxt).removeClass("stellar_vp_highlightText")})},u.fn.updateEmbedText2=function(){var e=window.location.href;e.indexOf("?id=")>=0?(e=e.split("?")[0],t(this.embedWindow).find(".stellar_vp_embedText2").text(e+"?id="+this._playlist.videoid)):t(this.embedWindow).find(".stellar_vp_embedText2").text(e+"?id="+this._playlist.videoid),t(this.copy).find(".stellar_vp_copyInside").text(this.options.copyTxt),t(this.copy2).find(".stellar_vp_copyInside").text(this.options.copyTxt),t(this.embedTxt).removeClass("stellar_vp_highlightText"),t(this.embedTxt2).removeClass("stellar_vp_highlightText")},u.fn.updateNextBtnImg=function(){this._playlist.videoid+1==this._playlist.videos_array.length?this.i.src=this._playlist.videos_array[0].thumbnail_image:this.i.src=this._playlist.videos_array[this._playlist.videoid+1].thumbnail_image},u.fn.ready=function(t){this.readyList.push(t),this.loaded&&t.call(this)},u.fn.load=function(e){var i=this;e&&(this.sources=e),"string"==typeof this.sources&&(this.sources={src:this.sources}),t.isArray(this.sources)||(this.sources=[this.sources]),this.ready(function(){this.change("loading"),"HTML5"!=i._playlist.videos_array[this._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=i.options.videoType||this.video.loadSources(this.sources)})},u.fn.closeAD=function(){var t=this;clearInterval(t.myInterval),t.videoPlayingAD=!0,t.togglePlayAD(),t._playlist.videoAdPlayed=!0,t.resetPlayerAD(),t.elementAD.css({zIndex:1}),t.videoElementAD.empty(),t.videoAdBoxInside.hide(),t.removeListenerProgressAD(),t.options.allowSkipAd&&(t.skipAdBox.hide(),t.skipAdCount.hide()),t.fsEnterADBox.hide(),t.toggleAdPlayBox.hide(),t.progressADBg.hide(),"youtube"==t._playlist.videos_array[t._playlist.videoid].videoType||"YouTube"==t.options.videoType?(t.ytWrapper.css({visibility:"visible"}),t.hideVideoElements(),void 0!=t.youtubePlayer&&this.youtubePlayer.playVideo()):"HTML5"==t._playlist.videos_array[t._playlist.videoid].videoType||"HTML5 (self-hosted)"==t.options.videoType?(t.showVideoElements(),t.togglePlay(),t.video.play()):"vimeo"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"Vimeo"!=t.options.videoType||(t.hideVideoElements(),void 0!=t._playlist.vimeoPlayer&&(t.isMobile.any()||t._playlist.vimeoPlayer.play()))},u.fn.openAD=function(){var e=this;e.showVideoElements(),e.progressADBg.show(),e.elementAD.css({zIndex:555559}),e.ytWrapper.css({visibility:"hidden"}),e.videoAdBoxInside.show(),e.options.allowSkipAd&&(e.skipBoxOn=!0,e.toggleSkipAdBox(),e.skipCountOn=!1,e.toggleSkipAdCount()),e.fsEnterADBox.show(),e._inFullscreen||e.resizeAll(),this.isMobile.any()?e.ADTriggered||(e.toggleAdPlayBox.show(),e.videoPlayingAD=!0,e.togglePlayAD()):e.toggleAdPlayBox.hide(),this.options.allowSkipAd&&(this.setSkipTimer(),t(".stellar_vp_skipAdCountTitle").text(this.options.skipAdText+" "+e.counter+" s"),this.i.src=e._playlist.videos_array[e._playlist.videoid].thumbnail_image)},u.fn.loadAD=function(e,i){switch(this.preloaderAD.stop().animate({opacity:1},0,function(){t(this).show()}),e&&(this.sourcesAD=e),"string"==typeof this.sourcesAD&&(this.sourcesAD={src:this.sourcesAD}),t.isArray(this.sourcesAD)||(this.sourcesAD=[this.sourcesAD]),this.ready(function(){this.change("loading"),this.videoAD.loadSources(this.sourcesAD)}),i){case"prerollActive":this.prerollActive=!0,this.midrollActive=!1,this.postrollActive=!1;break;case"midrollActive":this.prerollActive=!1,this.midrollActive=!0,this.postrollActive=!1;break;case"postrollActive":this.prerollActive=!1,this.midrollActive=!1,this.postrollActive=!0}},u.fn.play=function(){var t=this;this.playButtonScreen.hide(),this.playBtn.removeClass("fa-stellar-play").addClass("fa-stellar-pause"),t.mouseOverPlayBtn&&this.playBtn.removeClass("fa-stellar-play-zoom").addClass("fa-stellar-pause-zoom"),"HTML5"==t._playlist.videos_array[t._playlist.videoid].videoType||"HTML5 (self-hosted)"==t.options.videoType?t.video.play():"youtube"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"YouTube"!=t.options.videoType||t.video.pause(),1!=t._playlist.videos_array[t._playlist.videoid].prerollAD&&"yes"!=t._playlist.videos_array[t._playlist.videoid].prerollAD||0!=t.videoAdStarted||t.options.showGlobalPrerollAds||(t.video.pause(),t.videoAdStarted||1!=t._playlist.videos_array[t._playlist.videoid].prerollAD&&"yes"!=t._playlist.videos_array[t._playlist.videoid].prerollAD||(t.myVideo.canPlayType&&t.myVideo.canPlayType("video/mp4").replace(/no/,"")&&(t.canPlay=!0,t.video_pathAD=t._playlist.videos_array[t._playlist.videoid].preroll_mp4),t.loadAD(t.video_pathAD,"prerollActive"),t.openAD()),t.videoAdStarted=!0),this.options.showGlobalPrerollAds&&0==t.videoAdStarted&&(t.video.pause(),!t.videoAdStarted&&t.options.showGlobalPrerollAds&&(t.myVideo.canPlayType&&t.myVideo.canPlayType("video/mp4").replace(/no/,"")&&(t.canPlay=!0,t.video_pathAD=this.globalPrerollAds_arr[this.getGlobalPrerollRandomNumber()]),t.loadAD(t.video_pathAD),t.openAD()),t.videoAdStarted=!0)},u.fn.pause=function(){var t=this;"HTML5"==this._playlist.videos_array[this._playlist.videoid].videoType||"HTML5 (self-hosted)"==this.options.videoType?(this.html5STARTED||""==this.options.posterImg)&&(this.is_iOSVolumeButtonScreen?this.playButtonScreen.hide():this.playButtonScreen.show()):"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=this.options.videoType||(t._playlist.youtubeSTARTED||""==this.options.posterImg?this.playButtonScreen.show():this.playButtonScreen.hide()),this.playBtn.removeClass("fa-stellar-pause").addClass("fa-stellar-play"),t.mouseOverPlayBtn&&this.playBtn.removeClass("fa-stellar-pause-zoom").addClass("fa-stellar-play-zoom"),t.video.pause()},u.fn.stop=function(){this.seek(0),this.pause()},u.fn.hideOverlay=function(){var t=this;void 0!=t.overlay&&(t.overlay.hide(),t.poster2Showing=!1,t.playButtonPoster.hide(),"youtube"==t._playlist.videos_array[t._playlist.videoid].videoType||"YouTube"==t.options.videoType?(t.youtubePlayer.playVideo(),"default controls"==t.options.youtubeControls&&t.element.css("visibility","hidden")):"HTML5"==t._playlist.videos_array[t._playlist.videoid].videoType||"HTML5 (self-hosted)"==t.options.videoType?t.togglePlay():"vimeo"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"Vimeo"!=t.options.videoType||(t.hideCustomControls(),t.hideVideoElements(),void 0!=t._playlist.vimeoPlayer&&(t.isMobile.any()||t._playlist.vimeoPlayer.play())))},u.fn.togglePlay=function(){"stellar_vp_playing"==this.state?(this.pause(),"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=this.options.videoType||this.youtubePlayer.pauseVideo()):(this.play(),"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=this.options.videoType||this.youtubePlayer.playVideo())},u.fn.toggleNextVideoBox=function(){var e=this;this.nextVideoBoxOn?(this.nextVideoBox.stop().animate({top:e.nextVideoBox.height(),opacity:0},200,function(){t(e.nextVideoBox_mask).hide()}),this.nextVideoBoxOn=!1):(this.nextVideoBox_mask.show(),this.nextVideoBox.stop().animate({top:0,opacity:1},500),this.nextVideoBoxOn=!0)},u.fn.toggleSkipAdBox=function(){this.skipBoxOn?(this.skipAdBox.stop().animate({right:-(this.skipAdBox.width()-2),bottom:28},200,function(){t(this).hide()}),this.skipBoxOn=!1):(this.skipAdBox.show(),this.addListenerProgressAD(),this.skipAdBox.stop().animate({right:10,bottom:28},500),this.skipBoxOn=!0)},u.fn.toggleSkipAdCount=function(){this.skipCountOn?(this.skipAdCount.stop().animate({right:-(this.skipAdCount.width()-2),bottom:28},200,function(){t(this).hide()}),this.skipCountOn=!1):(this.skipAdCount.show(),this.skipAdCount.stop().animate({right:10,bottom:28},500),this.skipCountOn=!0)},u.fn.toggleInfoWindow=function(){this.infoOn?(this.infoWindow.stop().animate({right:-20,opacity:0},200,function(){t(this).hide()}),this.infoOn=!1):(this.infoWindow.show(),this.infoWindow.stop().animate({right:0,opacity:1},200),this.infoOn=!0)},u.fn.toggleLightBox=function(){this.lightBoxOn?(this.lightBoxOverlay.stop().animate({opacity:0},300,function(){t(this).hide()}),this.lightBoxOn=!1,this.pause(),this.YTAPIReady&&this.youtubePlayer.pauseVideo(),this._playlist.vimeoPlayer&&this._playlist.vimeoPlayer.pause(),this.videoPlayingAD=!0,this.togglePlayAD(),t(".stellar_vp_lightBoxThumbnailWrap").each(function(){t(this).find(".stellar_vp_playButtonScreen").css({zIndex:2147483647})})):(this.lightBoxOverlay.show(),this.lightBoxOverlay.stop().animate({opacity:1},300),this.lightBoxOn=!0,this.options.lightBoxAutoplay&&(this.lightBoxInitiated?1==this._playlist.videos_array[this._playlist.videoid].prerollAD||"yes"==this._playlist.videos_array[this._playlist.videoid].prerollAD||this.options.showGlobalPrerollAds?this._playlist.videoAdPlayed?(this.play(),this.YTAPIReady&&this.youtubePlayer.playVideo(),this._playlist.vimeoPlayer&&this._playlist.vimeoPlayer.play()):(this.videoPlayingAD=!1,this.togglePlayAD()):(this.play(),this.YTAPIReady&&this.youtubePlayer.playVideo(),this._playlist.vimeoPlayer&&this._playlist.vimeoPlayer.play()):(this.playVideoById(this._playlist.videoid),this.lightBoxInitiated=!0)),t(".stellar_vp_lightBoxThumbnailWrap").each(function(){t(this).find(".stellar_vp_playButtonScreen").css({zIndex:2147483646})})),this.resizeAll()},u.fn.toggleQualityWindow=function(e){var i,s=this;i=e?e:0,this.qualityOn?(this.qualityWindow.stop().delay(i).animate({top:200,opacity:0},200,function(){t(s.qualityWindow_mask).hide()}),this.qualityOn=!1):(this.qualityWindow_mask.show(),this.qualityWindow.stop().delay(i).animate({top:0,opacity:1},500),this.qualityOn=!0)},u.fn.togglePopup=function(){this.adOn?(this.adImg.animate({opacity:0},0,function(){t(this).hide()}),this.adOn=!1):this.adOn||(this.adImg.show(),this.adImg.animate({opacity:1},500),this.adOn=!0)},u.fn.toggleShuffleBtn=function(){this.shuffleBtnEnabled?(this.removeColorAccent(t("#stellar_vp_shuffleBtn")),t(this._playlist.shuffleBtnIcon).removeClass("stellar_vp_enabled_shuffle"),this.shuffleBtnEnabled=!1):(t(this.mainContainer).find(".fa-stellar-random").addClass("stellar_vp_themeColorButton"),t(this.mainContainer).find(".fa-stellar-random-zoom").addClass("stellar_vp_themeColorButton"),t(this._playlist.shuffleBtnIcon).addClass("stellar_vp_enabled_shuffle"),this.shuffleBtnEnabled=!0,this.setColorAccent(t(".stellar_vp_Progress").css("backgroundColor"),t("#stellar_vp_shuffleBtn")))},u.fn.toggleAutoplayBtn=function(){this.toggleAutoplayBtnEnabled?(this.removeColorAccent(t("#stellar_vp_toggleAutoplayBtn")),t(this.mainContainer).find(".fa-stellar-toggle-on").removeClass("fa-stellar-toggle-on").addClass("fa-stellar-toggle-off"),t(this.mainContainer).find(".fa-stellar-toggle-on-zoom").removeClass("fa-stellar-toggle-on-zoom").addClass("fa-stellar-toggle-off-zoom"),t(this._playlist.toggleAutoplayBtnIcon).removeClass("stellar_vp_enabled_autoplay"),this.toggleAutoplayBtnEnabled=!1):(t(this.mainContainer).find(".fa-stellar-toggle-off").removeClass("fa-stellar-toggle-off").addClass("fa-stellar-toggle-on"),t(this.mainContainer).find(".fa-stellar-toggle-off-zoom").removeClass("fa-stellar-toggle-off-zoom").addClass("fa-stellar-toggle-on-zoom"),t(this.mainContainer).find(".fa-stellar-toggle-on").addClass("stellar_vp_themeColorButton"),t(this._playlist.toggleAutoplayBtnIcon).addClass("stellar_vp_enabled_autoplay"),this.toggleAutoplayBtnEnabled=!0,this.setColorAccent(t(".stellar_vp_Progress").css("backgroundColor"),t("#stellar_vp_toggleAutoplayBtn")))},u.fn.toggleQualityBtn=function(){this.qualityBtnEnabled?(this.removeColorAccent(t("#stellar_vp_qualityBtn")),this.qualityBtn.removeClass("stellar_vp_enabled_quality"),this.qualityBtnEnabled=!1):(t(this.mainContainer).find(".fa-stellar-cog").addClass("stellar_vp_themeColorButton"),t(this.mainContainer).find(".fa-stellar-cog-zoom").addClass("stellar_vp_themeColorButton"),this.qualityBtn.addClass("stellar_vp_enabled_quality"),this.qualityBtnEnabled=!0,this.setColorAccent(t(".stellar_vp_Progress").css("backgroundColor"),t("#stellar_vp_qualityBtn")))},u.fn.toggleShareBtn=function(){this.shareBtnEnabled?(this.removeColorAccent(t("#stellar_vp_shareBtn")),this.shareBtn.removeClass("stellar_vp_enabled_share"),this.shareBtnEnabled=!1):(t(this.mainContainer).find(".fa-stellar-external").addClass("stellar_vp_themeColorButton"),t(this.mainContainer).find(".fa-stellar-external-zoom").addClass("stellar_vp_themeColorButton"),this.shareBtn.addClass("stellar_vp_enabled_share"),this.shareBtnEnabled=!0,this.setColorAccent(t(".stellar_vp_Progress").css("backgroundColor"),t("#stellar_vp_shareBtn")))},u.fn.toggleEmbedBtn=function(){this.embedBtnEnabled?(this.removeColorAccent(t("#stellar_vp_embedBtn")),this.embedBtn.removeClass("stellar_vp_enabled_embed"),this.embedBtnEnabled=!1,this.logoImg.show()):(t(this.mainContainer).find(".fa-stellar-code").addClass("stellar_vp_themeColorButton"),t(this.mainContainer).find(".fa-stellar-code-zoom").addClass("stellar_vp_themeColorButton"),this.embedBtn.addClass("stellar_vp_enabled_embed"),this.embedBtnEnabled=!0,this.setColorAccent(t(".stellar_vp_Progress").css("backgroundColor"),t("#stellar_vp_embedBtn")),this.logoImg.hide())},u.fn.toggleShareWindow=function(){var e=this;this.shareOn?(this.shareWindow.stop().delay(0).animate({top:32,opacity:0},200,function(){t(e.shareWindow_mask).hide()}),this.shareOn=!1):(this.shareWindow_mask.show(),this.shareWindow.stop().delay(0).animate({top:0,opacity:1},200),this.shareOn=!0)},u.fn.togglePlayAD=function(){this.videoPlayingAD?(this.videoAD.pause(),this.videoPlayingAD=!1,this.toggleAdPlayBox.show()):(this.videoAD.play(),this.videoPlayingAD=!0,this.toggleAdPlayBox.hide())},u.fn.toggleEmbedWindow=function(){this.embedOn?(t(this.embedWindow).stop().animate({top:-this.embedWindow.height()},200,function(){t(this).hide()}),this.embedOn=!1):(t(this.embedWindow).show(),t(this.embedWindow).stop().animate({top:0},500),this.embedOn=!0),this.adjustSidebarBtnVisibility(),this.positionEmbed()},u.fn.adjustSidebarBtnVisibility=function(){this.embedOn?("Right playlist"==this.options.playlist&&!this._inFullscreen&&this.stretching&&this.sidebarBtn.hide(),"Bottom playlist"==this.options.playlist&&this.sidebarBtn.hide()):("Right playlist"==this.options.playlist&&!this._inFullscreen&&this.stretching&&this.sidebarBtn.show(),"Bottom playlist"==this.options.playlist&&this.sidebarBtn.show())},u.fn.toggleFullScreen=function(t){var e=this,t=document.body;this.fullscreenAvailable()?this._inFullscreen?(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),"fitToContainer"!=this.options.playerLayout&&"fixedSize"!=this.options.playerLayout||this.mainContainer.parent().css("position","relative"),e.mainContainer.parent().css("zIndex",1),this._inFullscreen=!1):(t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen(),this.mainContainer.parent().css("position","relative"),e.mainContainer.parent().css("zIndex",2147483647),this._inFullscreen=!0):this.simulateFullscreenToggle()},u.fn.simulateFullscreenToggle=function(){var e=this;this._inFullscreen?(e._playlist.showPlaylist(),e.element.removeClass("stellar_vp_fullScreen"),e.elementAD.removeClass("stellar_vp_fullScreen"),t(e.mainContainer).find(".fa-stellar-desktop-compress").removeClass("fa-stellar-desktop-compress").addClass("fa-stellar-desktop-expand"),t(e.mainContainer).find(".fa-stellar-desktop-compress-zoom").removeClass("fa-stellar-desktop-compress-zoom").addClass("fa-stellar-desktop-expand"),t(e.fsEnterADBox).find(".fa-stellar-compressAD").removeClass("fa-stellar-compressAD").addClass("fa-stellar-expandAD"),e.mainContainer.css("left",""),e.mainContainer.css("top",""),"fitToContainer"==e.options.playerLayout||"fitToBrowser"==e.options.playerLayout?(e.mainContainer.width("100%"),e.mainContainer.height("100%")):"fixedSize"==e.options.playerLayout&&(e.mainContainer.width(e.options.videoPlayerWidth),e.mainContainer.height(e.options.videoPlayerHeight)),e.mainContainer.css("position","absolute"),e.element.css({zIndex:455558}),(1==e._playlist.videos_array[e._playlist.videoid].prerollAD||"yes"==e._playlist.videos_array[e._playlist.videoid].prerollAD||e.options.showGlobalPrerollAds)&&(!e._playlist.videoAdPlayed&&e.videoAdStarted?e.elementAD.css({zIndex:455559}):e.elementAD.css({zIndex:455557})),e.mainContainer.css("zIndex",999999),"fitToContainer"!=this.options.playerLayout&&"fixedSize"!=this.options.playerLayout||e.mainContainer.parent().css("position","relative"),e._inFullscreen=!1,e.resizeAll(),e.setInitialSize()):(e._playlist.hidePlaylist(),e.element.addClass("stellar_vp_fullScreen"),e.elementAD.addClass("stellar_vp_fullScreen"),t(e.mainContainer).find(".fa-stellar-desktop-expand").removeClass("fa-stellar-desktop-expand").addClass("fa-stellar-desktop-compress"),t(e.mainContainer).find(".fa-stellar-desktop-expand-zoom").removeClass("fa-stellar-desktop-expand-zoom").addClass("fa-stellar-desktop-compress"),t(e.fsEnterADBox).find(".fa-stellar-expandAD").removeClass("fa-stellar-expandAD").addClass("fa-stellar-compressAD"),e.element.width(window.innerWidth),e.element.height(window.innerHeight),e.elementAD.width(window.innerWidth),e.elementAD.height(window.innerHeight),e.mainContainer.width(window.innerWidth),e.mainContainer.height(window.innerHeight),e.mainContainer.css("position","fixed"),e.mainContainer.css("left",0),e.mainContainer.css("top",0),e.rewindBtnWrapper.show(),e.resizeVideoTrack(),e.mainContainer.parent().css("position","relative"),e._inFullscreen=!0),e.resizeVideoTrack(),e.positionOverScreenButtons(),e.positionLogo(),e.positionEmbed(),e.positionPopup(),e.positionQualityWindow(),e.positionShareMask(),e.resizeBars(),e.options.hideControlsOnMouseOut&&e.hideControls()},u.fn.seek=function(t){this.video.setCurrentTime(t)},u.fn.setVolume=function(t){this.video.setVolume(t)},u.fn.getVolume=function(){return this.video.getVolume()},u.fn.mute=function(t){"undefined"==typeof t&&(t=!0),this.setVolume(t?1:0)},u.fn.remove=function(){this.element.remove()},u.fn.bind=function(){this.videoElement.bind.apply(this.videoElement,arguments)},u.fn.one=function(){this.videoElement.one.apply(this.videoElement,arguments)},u.fn.trigger=function(){this.videoElement.trigger.apply(this.videoElement,arguments)};for(var v=["click","dblclick","onerror","onloadeddata","oncanplay","ondurationchange","ontimeupdate","onprogress","onpause","onplay","onended","onvolumechange"],_=0;_ "),this.mainContainer.addClass("stellar_vp_mainContainer"),"fitToContainer"==this.options.playerLayout||"fitToBrowser"==this.options.playerLayout?this.mainContainer.css({width:"100%",height:"100%",position:"absolute",background:"#000000",zIndex:999999}):"fixedSize"==this.options.playerLayout&&this.mainContainer.css({width:this.options.videoPlayerWidth,height:this.options.videoPlayerHeight,position:"absolute",background:"#000000",zIndex:999999}),this.options.videoPlayerShadow){case"effect1":this.mainContainer.addClass("stellar_vp_effect1");break;case"effect2":this.mainContainer.addClass("stellar_vp_effect2");break;case"effect3":this.mainContainer.addClass("stellar_vp_effect3");break;case"effect4":this.mainContainer.addClass("stellar_vp_effect4");break;case"effect5":this.mainContainer.addClass("stellar_vp_effect5");break;case"effect6":this.mainContainer.addClass("stellar_vp_effect6");break;case"off":}this.parent.append(this.mainContainer),this.mainContainer.parent().css("zIndex",1),this.options.lightBox&&(this.mainContainerBG=t("
"),this.mainContainerBG.addClass("stellar_vp_mainContainerBG"),this.mainContainer.append(this.mainContainerBG)),this.element=t("
"),this.element.addClass("stellar_vp_videoPlayer"),this.mainContainer.append(this.element),this.ytWrapper=t("
"),this.ytWrapper.addClass("stellar_vp_ytWrapper"),this.element.append(this.ytWrapper),this.ytPlayer=t("
"),this.ytPlayer.attr("id",e.options.instanceName+"youtube"),this.ytWrapper.append(this.ytPlayer),this.imageWrapper=t("
"),this.imageWrapper.addClass("stellar_vp_imageWrapper"),this.element.append(this.imageWrapper),this.imageDisplayed=document.createElement("img"),this.imageWrapper.append(this.imageDisplayed),t(".stellar_vp_imageWrapper img").attr("id","stellar_vp_imageDisplayed")},u.fn.setupElementAD=function(){this.elementAD=t("
"),this.elementAD.addClass("stellar_vp_videoPlayerAD"),this.mainContainer.append(this.elementAD)},u.fn.idle=function(e,i){
var s=this;i?"stellar_vp_playing"==this.state&&(this.options.showAllControls||s.controls.hide(),s.controls.stop().animate({bottom:-44},300,function(){s.videoTrackWrapper.hide()}),s.progressIdleTrack.stop().delay(800).animate({bottom:0},300),s.screenBtnsWindow.stop().animate({top:-s.screenBtnsWindow.height()},300),s.nowPlayingTitle.stop().animate({top:-s.nowPlayingTitle.height()},300),s.logoImg.stop().animate({opacity:0},300),s.timeTotal.stop().animate({opacity:0},300),s.timeElapsed.stop().animate({opacity:0},300),this.qualityOn=!0,this.toggleQualityWindow(),this.qualityBtnEnabled=!0,this.toggleQualityBtn(),this.shareOn=!0,this.toggleShareWindow(),this.shareBtnEnabled=!0,this.toggleShareBtn(),this.embedOn=!0,this.toggleEmbedWindow(),this.embedBtnEnabled=!0,this.toggleEmbedBtn(),this.infoOn=!0,this.toggleInfoWindow(),t(this.toolTip).stop().animate({opacity:0},50,function(){s.toolTip.hide()}),s.invisibleWrapper.show()):(s.options.showAllControls||s.controls.hide(),s.videoTrackWrapper.show(),s.controls.stop().animate({bottom:0},300),s.progressIdleTrack.stop().animate({bottom:-s.options.progressBarThicknessOnMouseover},100),s.screenBtnsWindow.stop().animate({top:0},300),s.nowPlayingTitle.stop().animate({top:0},300),s.logoImg.stop().animate({opacity:1},300),s.timeTotal.stop().animate({opacity:1},300),s.timeElapsed.stop().animate({opacity:1},300),this.invisibleWrapper.hide())},u.fn.hideControls=function(){var e=this;t(this.element).hover(function(){e.options.showAllControls||e.controls.hide(),e.videoTrackWrapper.show(),e.controls.stop().animate({bottom:0},300),e.progressIdleTrack.stop().animate({bottom:-e.options.progressBarThicknessOnMouseover},100),e.screenBtnsWindow.stop().animate({top:0},300),e.nowPlayingTitle.stop().animate({top:0},300),e.logoImg.stop().animate({opacity:1},300),e.timeTotal.stop().animate({opacity:1},300),e.timeElapsed.stop().animate({opacity:1},300)},function(){e.options.showAllControls||e.controls.hide(),e.controls.stop().animate({bottom:-44},300,function(){e.videoTrackWrapper.hide()}),e.progressIdleTrack.stop().delay(800).animate({bottom:0},300),e.screenBtnsWindow.stop().animate({top:-e.screenBtnsWindow.height()},300),e.nowPlayingTitle.stop().animate({top:-e.nowPlayingTitle.height()},300),e.logoImg.stop().animate({opacity:0},300),e.timeTotal.stop().animate({opacity:0},300),e.timeElapsed.stop().animate({opacity:0},300)})},u.fn.change=function(t){this.state=t,this.element&&(this.element.attr("data-state",this.state),this.element.trigger("state.videoPlayer",this.state))},u.fn.setupHTML5Video=function(){this.element&&this.element.append(this.videoElement),this.video=this.videoElement[0],this.element&&(this.element.width(this.playerWidth),this.element.height(this.playerHeight));var e=this;this.video.loadSources=function(t){e.videoElement.empty();for(var i in t)if(-1!=t[i].src.indexOf("m3u8")){if(Hls.isSupported()){var s=new Hls;s.loadSource(t[i].src),s.attachMedia(e.video),s.on(Hls.Events.MANIFEST_PARSED,function(){})}}else e.videoElement.attr("src",t[i].src);e.video.load()},this.video.getStartTime=function(){return this.startTime||0},this.video.getEndTime=function(){return this.duration==1/0&&this.buffered?this.buffered.end(this.buffered.length-1):(this.startTime||0)+this.duration},this.video.getCurrentTime=function(){try{return this.currentTime}catch(t){return 0}};var e=this;this.video.setCurrentTime=function(t){this.currentTime=t},this.video.getVolume=function(){return this.volume},this.video.setVolume=function(t){t>1&&(t=1),e.options.showAllControls?this.volume=t:this.volume=1},this.videoElement.dblclick(t.proxy(function(){this.toggleFullScreen()},this)),this.videoElement.bind(this.CLICK_EV,t.proxy(function(){this.togglePlay()},this)),this.triggerReady()},u.fn.setupHTML5VideoAD=function(){this.elementAD&&this.elementAD.append(this.videoElementAD),this.videoAD=this.videoElementAD[0],this.elementAD&&(this.elementAD.width(0),this.elementAD.height(0));var e=this;this.videoAD.loadSources=function(t){e.videoElementAD.empty();for(var i in t)if(-1!=t[i].src.indexOf("m3u8")){if(Hls.isSupported()){var s=new Hls;s.loadSource(t[i].src),s.attachMedia(e.videoAD),s.on(Hls.Events.MANIFEST_PARSED,function(){})}}else e.videoElementAD.attr("src",t[i].src);e.videoAD.load(),e.isMobile.any()?e.videoPlayingAD=!0:e.videoPlayingAD=!1,e.togglePlayAD()},this.videoAD.getStartTime=function(){return this.startTime||0},this.videoAD.getEndTime=function(){return isNaN(this.duration)?void 0:this.duration==1/0&&this.buffered?this.buffered.end(this.buffered.length-1):(this.startTime||0)+this.duration},this.videoAD.getCurrentTime=function(){try{return this.currentTime}catch(t){return 0}},this.videoAD.setCurrentTime=function(t){this.currentTime=t},this.videoAD.getVolume=function(){return this.volume},this.videoAD.setVolume=function(t){this.volume=t},this.videoElementAD.dblclick(t.proxy(function(){this.toggleFullScreen()},this)),this.triggerReady(),this.videoElementAD.bind(this.CLICK_EV,t.proxy(function(){this.options.showGlobalPrerollAds?""!=this.options.globalPrerollAdsGotoLink&&"globalPrerollAdsGotoLink"!=this.options.globalPrerollAdsGotoLink&&(window.open(this.options.globalPrerollAdsGotoLink),this.videoPlayingAD=!0,this.togglePlayAD()):(""==this._playlist.videos_array[this._playlist.videoid].prerollGotoLink||"prerollGotoLink"==this._playlist.videos_array[this._playlist.videoid].prerollGotoLink||1!=this._playlist.videos_array[this._playlist.videoid].prerollAD&&"yes"!=this._playlist.videos_array[this._playlist.videoid].prerollAD||(this.prerollActive&&window.open(this._playlist.videos_array[this._playlist.videoid].prerollGotoLink),this.videoPlayingAD=!0,this.togglePlayAD()),""==this._playlist.videos_array[this._playlist.videoid].midrollGotoLink||"midrollGotoLink"==this._playlist.videos_array[this._playlist.videoid].midrollGotoLink||1!=this._playlist.videos_array[this._playlist.videoid].midrollAD&&"yes"!=this._playlist.videos_array[this._playlist.videoid].midrollAD||(this.midrollActive&&window.open(this._playlist.videos_array[this._playlist.videoid].midrollGotoLink),this.videoPlayingAD=!0,this.togglePlayAD()),""==this._playlist.videos_array[this._playlist.videoid].postrollGotoLink||"postrollGotoLink"==this._playlist.videos_array[this._playlist.videoid].postrollGotoLink||1!=this._playlist.videos_array[this._playlist.videoid].postrollAD&&"yes"!=this._playlist.videos_array[this._playlist.videoid].postrollAD||(this.postrollActive&&window.open(this._playlist.videos_array[this._playlist.videoid].postrollGotoLink),this.videoPlayingAD=!0,this.togglePlayAD()))},this))},u.fn.setupButtonsOnScreen=function(){var e=this;this.screenBtnsWindow=t("
"),this.screenBtnsWindow.addClass("stellar_vp_screenBtnsWindow"),this.element&&this.element.append(this.screenBtnsWindow),this.options.showAllControls||this.screenBtnsWindow.hide(),this.infoBtn=t("
").addClass("stellar_vp_infoBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.infoBtn),this.infoBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-info-circle"),this.infoBtn.append(this.infoBtnIcon),this.youtubeBtn=t("
").addClass("stellar_vp_youtubeBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.youtubeBtn),this.youtubeBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-youtube"),this.youtubeBtn.append(this.youtubeBtnIcon),this.youtubeBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.youtubeGoToLink)},this)),this.faceBtn=t("
").addClass("stellar_vp_faceBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.faceBtn),this.faceBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-face"),this.faceBtn.append(this.faceBtnIcon),this.faceBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.facebookGoToLink)},this)),this.instagramBtn=t("
").addClass("stellar_vp_faceBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.instagramBtn),this.instagramBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-instagram"),this.instagramBtn.append(this.instagramBtnIcon),this.instagramBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.instagramGoToLink)},this)),this.magazineBtn=t("
").addClass("stellar_vp_faceBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.magazineBtn),this.magazineBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-newspaper-o"),this.magazineBtn.append(this.magazineBtnIcon),this.magazineBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.magazineGoToLink)},this)),this.livestreamBtn=t("
").addClass("stellar_vp_faceBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.livestreamBtn),this.livestreamBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-circle"),this.livestreamBtn.append(this.livestreamBtnIcon),this.livestreamBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.livestreamGoToLink)},this)),this.membersBtn=t("
").addClass("stellar_vp_faceBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.membersBtn),this.membersBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-user"),this.membersBtn.append(this.membersBtnIcon),this.membersBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.membersGoToLink)},this)),this.shoppingBtn=t("
").addClass("stellar_vp_faceBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.screenBtnsWindow.append(this.shoppingBtn),this.shoppingBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-shopping-chart"),this.shoppingBtn.append(this.shoppingBtnIcon),this.shoppingBtn.bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.shopGoToLink)},this)),this.sidebarBtn=t("
").addClass("stellar_vp_sidebarBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.sidebarBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen "+this.options.instanceTheme).addClass("fa-stellar-chevron-circle-right"),this.sidebarBtn.append(this.sidebarBtnIcon),this.sidebarBtn.bind(this.CLICK_EV,function(){e.toggleStretch(),e.resizeAll()}),this.shareWindow=t("
"),this.shareWindow.addClass("stellar_vp_shareWindow"),this.shareWindow_mask=t("
"),this.shareWindow_mask.addClass("stellar_vp_shareWindowMask").hide(),this.element&&this.element.append(this.shareWindow_mask),this.shareWindow_mask.append(this.shareWindow),this.positionShareMask(),this.shareWindow.css({top:32,opacity:0}),this.facebookBtn=t("
").addClass("stellar_vp_facebookBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_socialBtn").addClass("stellar_vp_bg"),this.element&&this.shareWindow.append(this.facebookBtn),this.facebookBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("fa-stellar-facebook"),this.facebookBtn.append(this.facebookBtnIcon),this.twitterBtn=t("
").addClass("stellar_vp_twitterBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_socialBtn").addClass("stellar_vp_bg"),this.element&&this.shareWindow.append(this.twitterBtn),this.twitterBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("fa-stellar-twitter"),this.twitterBtn.append(this.twitterBtnIcon),this.mailBtn=t("
").addClass("stellar_vp_mailBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_socialBtn").addClass("stellar_vp_bg"),this.element&&this.shareWindow.append(this.mailBtn),this.mailBtnIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("fa-stellar-google-plus"),this.mailBtn.append(this.mailBtnIcon),this.facebookBtn.bind(this.CLICK_EV,t.proxy(function(){e.pause(),e.YTAPIReady&&e.youtubePlayer.pauseVideo();var i=t(window).width()/2-300,s=t(window).height()/2-200,o=window.open("https://www.facebook.com/dialog/feed?app_id=787376644686729&display=popup&name="+e.options.facebookShareName+"&link="+e.options.facebookShareLink+"&redirect_uri=https://facebook.com&description="+e.options.facebookShareDescription+"&picture="+e.options.facebookSharePicture,"popup","width=600, height=400, top="+s+", left="+i);window.focus&&o.focus()},this)),this.twitterBtn.bind(this.CLICK_EV,t.proxy(function(){e.pause(),e.YTAPIReady&&e.youtubePlayer.pauseVideo();var i=t(window).width()/2-300,s=t(window).height()/2-200,o=window.open("https://twitter.com/intent/tweet?text="+e.options.twitterText+"&url="+e.options.twitterLink+"&hashtags="+e.options.twitterHashtags+"&via="+e.options.twitterVia,"popup","width=600, height=400, top="+s+", left="+i);window.focus&&o.focus()},this)),this.mailBtn.bind(this.CLICK_EV,t.proxy(function(){e.pause(),e.YTAPIReady&&e.youtubePlayer.pauseVideo();var i=t(window).width()/2-300,s=t(window).height()/2-200,o=window.open("https://plus.google.com/share?url="+e.options.googlePlus,"popup","width=600, height=400, top="+s+", left="+i);window.focus&&o.focus()},this)),t(".stellar_vp_infoBtn, .stellar_vp_sidebarBtn, .stellar_vp_facebookBtn, .stellar_vp_twitterBtn, .stellar_vp_mailBtn").mouseover(function(){t(this).find(".stellar-icon-overScreen").removeClass("stellar-icon-overScreen").addClass("stellar-icon-overScreen-hover")}),t(".stellar_vp_infoBtn, .stellar_vp_sidebarBtn, .stellar_vp_facebookBtn, .stellar_vp_twitterBtn, .stellar_vp_mailBtn").mouseout(function(){t(this).find(".stellar-icon-overScreen-hover").removeClass("stellar-icon-overScreen-hover").addClass("stellar-icon-overScreen")}),t(".stellar_vp_btnOverScreen").mouseover(function(){}),t(".stellar_vp_btnOverScreen").mouseout(function(){}),e.options.shareShow||this.shareBtn.hide(),e.options.embedShow||this.embedBtn.hide(),e.options.infoShow||this.infoBtn.hide(),e.options.facebookShow||this.facebookBtn.hide(),e.options.twitterShow||this.twitterBtn.hide(),e.options.googlePlusShow||this.mailBtn.hide(),buttonsMargin=5,this.positionOverScreenButtons()},u.fn.convertHex=function(t,e){return t=t.replace("#",""),r=parseInt(t.substring(0,2),16),g=parseInt(t.substring(2,4),16),b=parseInt(t.substring(4,6),16),result="rgba("+r+","+g+","+b+","+e+")",result},u.fn.toggleStretch=function(){var e=this;this.stretching?(e.shrinkPlayer(),this.stretching=!1,t(this.sidebarBtn).find(".fa-stellar-chevron-circle-left").removeClass("fa-stellar-chevron-circle-left").addClass("fa-stellar-chevron-circle-right"),t(this.sidebarBtn).find(".fa-stellar-chevron-circle-left-zoom").removeClass("fa-stellar-chevron-circle-left-zoom").addClass("fa-stellar-chevron-circle-right-zoom"),"Right playlist"==this.options.playlist&&this.screenBtnsWindow.css({right:0}),"Bottom playlist"==this.options.playlist&&this.screenBtnsWindow.css({right:0})):(e.stretchPlayer(),this.stretching=!0,t(this.sidebarBtn).find(".fa-stellar-chevron-circle-right").removeClass("fa-stellar-chevron-circle-right").addClass("fa-stellar-chevron-circle-left"),t(this.sidebarBtn).find(".fa-stellar-chevron-circle-right-zoom").removeClass("fa-stellar-chevron-circle-right-zoom").addClass("fa-stellar-chevron-circle-left-zoom"),"Right playlist"==this.options.playlist&&this.screenBtnsWindow.css({right:e.sidebarBtn.width()+5}),"Bottom playlist"==this.options.playlist&&this.screenBtnsWindow.css({right:0})),this.resizeVideoTrack(),this.positionOverScreenButtons(),this.positionLogo(),this.positionEmbed(),this.positionPopup(),this.positionQualityWindow(),this.positionShareMask(),this.resizeBars(),this.resizeAll()},u.fn.stretchPlayer=function(){var e=this;"Right playlist"==this.options.playlist?t(e.element).stop().animate({width:e.mainContainer.width()},{duration:e.options.videoAnimationTime,step:function(){e.positionElementsDuringAnimation(),e._isAnimation=!0},complete:function(){e._isAnimation=!1}}):"Bottom playlist"==this.options.playlist&&t(e.element).stop().animate({height:e.mainContainer.height()},{duration:e.options.videoAnimationTime,step:function(){e.positionElementsDuringAnimation(),e._isAnimation=!0},complete:function(){e._isAnimation=!1}}),t(e._playlist.playlist).stop().animate({opacity:0},{duration:e.options.videoAnimationTime,step:function(){}})},u.fn.shrinkPlayer=function(){var e=this;"Right playlist"==this.options.playlist?t(e.element).stop().animate({width:e.mainContainer.width()-e._playlist.playlist.width()},{duration:e.options.videoAnimationTime,step:function(){e.positionElementsDuringAnimation(),e.elementAD.width(e.element.width()),e.elementAD.height(e.element.height()),e._isAnimation=!0},complete:function(){e._isAnimation=!1}}):"Bottom playlist"==this.options.playlist&&t(e.element).stop().animate({height:e.mainContainer.height()-e._playlist.playlist.height()},{duration:e.options.videoAnimationTime,step:function(){e.positionElementsDuringAnimation(),e.elementAD.width(e.element.width()),e.elementAD.height(e.element.height()),e._isAnimation=!0},complete:function(){e._isAnimation=!1}}),t(e._playlist.playlist).stop().animate({opacity:1},{duration:e.options.videoAnimationTime,step:function(){}})},u.fn.positionOverScreenButtons=function(){var t=this;this.element&&(this._inFullscreen?(this.sidebarBtn.hide(),this.screenBtnsWindow.css({right:0})):"Right playlist"==this.options.playlist?(this.sidebarBtn.show(),this.stretching?this.screenBtnsWindow.css({right:t.sidebarBtn.width()+5}):this.screenBtnsWindow.css({right:0})):"Bottom playlist"==this.options.playlist?(this.sidebarBtn.show(),this.screenBtnsWindow.css({right:t.sidebarBtn.width()+5})):(this.sidebarBtn.hide(),this.screenBtnsWindow.css({right:0})))},u.fn.setupButtons=function(){var e=this,e=this;if(this.controlsBtnsWrapperRight=t("
"),this.controlsBtnsWrapperRight.addClass("stellar_vp_controlsBtnsWrapperRight"),this.controls.append(this.controlsBtnsWrapperRight),this.playBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_controlsBtn_play").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.togglePlay()}),this.playBtn=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-play").attr("id","stellar_vp_playBtn"),this.playBtnWrapper.append(this.playBtn),this._playlist.controlsBtnsWrapperLeft.prepend(this.playBtnWrapper),this.rewindBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.seek(0),e.play(),void 0!=e.youtubePlayer&&(e.youtubePlayer.seekTo(0),e.youtubePlayer.playVideo())}),this.rewindBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_rewindBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-retweet"),this.rewindBtnWrapper.append(this.rewindBtn),this.shareBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.toggleShareWindow(),e.toggleShareBtn()}),this.shareBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_shareBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-external-link"),this.shareBtnWrapper.append(this.shareBtn),this.embedBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.toggleEmbedWindow(),e.toggleEmbedBtn()}),this.embedBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_embedBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-code"),this.embedBtnWrapper.append(this.embedBtn),this.qualityBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.toggleQualityBtn(),e.toggleQualityWindow(),t(this).children(":first").toggleClass("fa-stellar-rotate-90")}),this.qualityBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_qualityBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-cog"),this.qualityBtnWrapper.append(this.qualityBtn),this.HD_indicator=t("
").addClass("stellar_vp_HD_indicator").addClass("stellar-icon-general").addClass("stellar_vp_qualityWindowText").text("HD").hide(),this.qualityBtnWrapper.append(this.HD_indicator),this.downloadBtnLink=t(" ").attr("href",this._playlist.videos_array[this._playlist.videoid].video_path_mp4HD).attr("download","").hide(),this.downloadBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){}),this.downloadBtnLink.append(this.downloadBtnWrapper),this.downloadBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_downloadBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-download"),this.downloadBtnWrapper.append(this.downloadBtn),"HTML5"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=this.options.videoType||!this._playlist.videos_array[this._playlist.videoid].enable_mp4_download&&"yes"!=this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||this.downloadBtnLink.show(),e.options.shuffle?(this.shuffleBtnEnabled=!1,this.toggleShuffleBtn()):this.shuffleBtnEnabled=!1,"Play next video"==e.options.onFinish?(this.toggleAutoplayBtnEnabled=!1,this.toggleAutoplayBtn()):this.toggleAutoplayBtnEnabled=!1,this.playButtonScreen=t("
"),this.playButtonScreen.addClass("stellar_vp_playButtonScreen").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-playScreen "+this.options.instanceTheme).hide(),this.playButtonScreen.bind(this.CLICK_EV,t.proxy(function(){this.togglePlay()},this)),o.iOS()&&this.options.autoplay){var i=!0;this.iOSVolumeButtonScreen=t("
"),this.iOSVolumeButtonScreen.addClass("stellar_vp_iOSVolumeButtonScreen").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-iOSBtnScreen "+this.options.instanceTheme).addClass("pulse"),this.iOSVolumeButtonScreen.bind(this.CLICK_EV,t.proxy(function(){i&&(this.removeiOSAutoplay(),this.iOSVolumeButtonScreen.hide(),i=!1)},this)),this.element&&this.element.append(this.iOSVolumeButtonScreen)}this.element&&this.element.append(this.playButtonScreen),this.fsBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(this.CLICK_EV,t.proxy(function(){this.toggleFullScreen()},this)),this.fsEnter=t(" "),this.fsEnter.attr("aria-hidden","true").attr("id","stellar_vp_fsBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-desktop-expand"),this.fsBtnWrapper.append(this.fsEnter),this.fsEnterADBox=t("
").addClass("stellar_vp_fsEnterADBox").hide(),this.elementAD.append(this.fsEnterADBox),this.fsEnterAD=t(" "),this.fsEnterAD.attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-expandAD").bind(this.CLICK_EV,t.proxy(function(){this.toggleFullScreen()},this)).mouseover(function(){t(this).stop().animate({opacity:.75},200)}).mouseout(function(){t(this).stop().animate({opacity:1},200)}),this.fsEnterADBox.append(this.fsEnterAD),1!=this._playlist.videos_array[this._playlist.videoid].enable_mp4_download&&"yes"!=this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||this.controlsBtnsWrapperRight.append(this.downloadBtnLink),this.options.shareShow&&this.controlsBtnsWrapperRight.append(this.shareBtnWrapper),this.options.embedShow&&this.controlsBtnsWrapperRight.append(this.embedBtnWrapper),this.options.rewindShow&&this.controlsBtnsWrapperRight.append(this.rewindBtnWrapper),this.options.qualityShow&&this.controlsBtnsWrapperRight.append(this.qualityBtnWrapper),this.controlsBtnsWrapperRight.append(this.fsBtnWrapper),this.playButtonScreen.mouseover(function(){t(this).stop().animate({opacity:.85},200)}),this.playButtonScreen.mouseout(function(){t(this).stop().animate({opacity:1},200)}),this.controlsMenu=t(''),this.controls.append(this.controlsMenu),t("#magazineInside .name").text(e.options.menuMagazineText),t("#shopInside .name").text(e.options.menuShopText),t("#eventsInside .name").text(e.options.menuEventsText),t("#contactsInside .name").text(e.options.menuContactsText),t("#magazineInside").bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.menuMagazineGotoLink)},this)),t("#shopInside").bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.menuShopGotoLink)},this)),t("#eventsInside").bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.menuEventsGotoLink)},this)),t("#contactsInside").bind(this.CLICK_EV,t.proxy(function(){window.open(e.options.menuContactsGotoLink)},this)),""==e.options.menuMagazineText&&t("#magazineInside").hide(),""==e.options.menuShopText&&t("#shopInside").hide(),""==e.options.menuEventsText&&t("#eventsInside").hide(),""==e.options.menuContactsText&&t("#contactsInside").hide(),t(".menuBtn").mouseover(function(){t(this).stop().animate({opacity:.6},200)}),t(".menuBtn").mouseout(function(){t(this).stop().animate({opacity:1},200)})},u.fn.createInfoWindow=function(){this.infoWindow=t("
"),this.infoWindow.addClass("stellar_vp_infoWindow"),this.infoWindow.addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.element.append(this.infoWindow),this.infoBtnClose=t("
"),this.infoBtnClose.addClass("stellar_vp_btnClose stellar_vp_themeColorText"),this.infoWindow.append(this.infoBtnClose),this.infoBtnClose.css({bottom:0}),this.infoBtnCloseIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-times-circle").addClass("stellar_vp_themeColor"),this.infoBtnClose.append(this.infoBtnCloseIcon),this.infoBtn.bind(this.CLICK_EV,t.proxy(function(){this.toggleInfoWindow()},this)),this.infoBtnClose.bind(this.CLICK_EV,t.proxy(function(){this.toggleInfoWindow()},this)),this.infoBtnClose.mouseover(function(){t(this).stop().animate({opacity:.7},200)}),this.infoBtnClose.mouseout(function(){t(this).stop().animate({opacity:1},200)})},u.fn.createQualityWindow=function(){var e=this;this.qualityWindow_mask=t("
"),this.qualityWindow_mask.addClass("stellar_vp_qualityWindowMask"),this.element&&this.element.append(this.qualityWindow_mask),this.qualityWindow=t("
"),this.qualityWindow.addClass("stellar_vp_qualityWindow"),this.qualityWindow.addClass("stellar_vp_bg "+this.options.instanceTheme),this.element&&this.qualityWindow_mask.append(this.qualityWindow),this.qualityWindow_mask.css({left:e.controlsBtnsWrapperRight.position().left+e.qualityBtnWrapper.position().left-50+16-4,bottom:this.controls.height()+6}).hide(),this.qualityWindow.css({top:200,opacity:0}),this.createQualityWindowByType(),this.positionQualityWindow()},u.fn.initStateYTQualityMenu=function(){var e=this.selectedYoutubeQuality||this.options.youtubeQuality;switch(e){case"hd1080":t(".hd1080").append(this.qualityCheck),this.HD_indicator.show();break;case"hd720":t(".hd720").append(this.qualityCheck),this.HD_indicator.show();break;case"large":t(".large").append(this.qualityCheck),this.HD_indicator.hide();break;case"medium":t(".medium").append(this.qualityCheck),this.HD_indicator.hide();break;case"small":t(".small").append(this.qualityCheck),this.HD_indicator.hide();break;case"tiny":t(".default").append(this.qualityCheck),this.HD_indicator.hide();break;case"default":t(".default").append(this.qualityCheck),this.HD_indicator.hide()}},u.fn.initStateHTML5QualityMenu=function(){var e=this.selectedHTML5Quality||this.options.HTML5VideoQuality;switch(e){case"HD":t(".HD").append(this.qualityCheck),this.HD_indicator.show();break;case"SD":t(".SD").append(this.qualityCheck),this.HD_indicator.hide()}},u.fn.updateYoutubeQuality=function(t){if(this.youtubePlayer.getPlaybackQuality()!=t){if("unknown"==this.youtubePlayer.getPlaybackQuality())return void this.youtubePlayer.setPlaybackQuality(t);var e=this.youtubePlayer.getCurrentTime();this.youtubePlayer.stopVideo(),this.youtubePlayer.setPlaybackQuality(t),this.youtubePlayer.playVideo(),this.youtubePlayer.seekTo(e)}},u.fn.updateHTML5Quality=function(t){var e=this.video.getCurrentTime();if(this.pause(),this.myVideo.canPlayType&&this.myVideo.canPlayType("video/mp4").replace(/no/,""))switch(this.canPlay=!0,t){case"HD":this.video_path=this._playlist.videos_array[this._playlist.videoid].video_path_mp4HD;break;case"SD":this.video_path=this._playlist.videos_array[this._playlist.videoid].video_path_mp4SD}this.load(this.video_path,this._playlist.videoid),this.video.setCurrentTime(e),this.play()},u.fn.createQualityWindowByType=function(){var e=this;this.qualityWindow.html(""),"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=this.options.videoType||(this.qualityWindow.append(''),
this.qualityWindow_mask.css("height","170px")),"HTML5"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=this.options.videoType||(this.qualityWindow.append(''),this.qualityWindow_mask.css("height","50px")),this.qualityCheck=t(" ").attr("aria-hidden","true").attr("id","qualityCheck").addClass("fa-stellar").addClass("fa-stellar-caret-right").addClass("stellar_vp_qualityCheck").addClass("stellar_vp_qualityListItem_activeColor "+this.options.instanceTheme),this.qualityListItem=t(".stellar_vp_qualityListItem"),t(this.qualityListItem).click(function(){t(".stellar_vp_qualityWindow").find(".stellar_vp_qualityListItem_activeColor "+e.options.instanceTheme).removeClass("stellar_vp_qualityListItem_activeColor "+e.options.instanceTheme),t(this).addClass("stellar_vp_qualityListItem_activeColor "+e.options.instanceTheme),t(this).append(e.qualityCheck),t(this).hasClass("hd1080")&&(e.selectedYoutubeQuality="hd1080",e.HD_indicator.show()),t(this).hasClass("hd720")&&(e.selectedYoutubeQuality="hd720",e.HD_indicator.show()),t(this).hasClass("large")&&(e.selectedYoutubeQuality="large",e.HD_indicator.hide()),t(this).hasClass("medium")&&(e.selectedYoutubeQuality="medium",e.HD_indicator.hide()),t(this).hasClass("small")&&(e.selectedYoutubeQuality="small",e.HD_indicator.hide()),t(this).hasClass("tiny")&&(e.selectedYoutubeQuality="tiny",e.HD_indicator.hide()),t(this).hasClass("default")&&(e.selectedYoutubeQuality="default"),t(this).hasClass("HD")&&(e.selectedHTML5Quality="HD",e.HD_indicator.show()),t(this).hasClass("SD")&&(e.selectedHTML5Quality="SD",e.HD_indicator.hide()),e.qualityOn=!0,e.toggleQualityWindow(),e.toggleQualityBtn(),"HTML5"==e._playlist.videos_array[e._playlist.videoid].videoType||"HTML5 (self-hosted)"==e.options.videoType?e.updateHTML5Quality(e.selectedHTML5Quality):"youtube"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"YouTube"!=e.options.videoType||e.updateYoutubeQuality(e.selectedYoutubeQuality)}),"HTML5"==e._playlist.videos_array[e._playlist.videoid].videoType||"HTML5 (self-hosted)"==e.options.videoType?e.initStateHTML5QualityMenu():"youtube"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"YouTube"!=e.options.videoType||e.initStateYTQualityMenu()},u.fn.onPlayerPlaybackQualityChange=function(){},u.fn.createEmbedWindow=function(){this.embedWindow=t("
"),this.embedWindow.addClass("stellar_vp_embedWindow stellar_vp_bg "+this.options.instanceTheme),this.element&&this.element.append(this.embedWindow),this.embedBtnClose=t("
"),this.embedBtnClose.addClass("stellar_vp_btnClose stellar_vp_themeColorText"),this.embedWindow.append(this.embedBtnClose),this.embedBtnClose.css({bottom:0}),this.embedWindow.css({top:-this.embedWindow.height()}),this.embedWindow.hide(),this.embedBtnCloseIcon=t(" ").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-times-circle").addClass("stellar_vp_themeColor"),this.embedBtnClose.append(this.embedBtnCloseIcon),this.embedBtnClose.bind(this.CLICK_EV,t.proxy(function(){this.toggleEmbedWindow(),this.toggleEmbedBtn()},this)),this.embedBtnClose.mouseover(function(){t(this).stop().animate({opacity:.7},200)}),this.embedBtnClose.mouseout(function(){t(this).stop().animate({opacity:1},200)})},u.fn.setupVideoTrack=function(){var e=this;this.videoTrackWrapper=t("
").addClass("stellar_vp_videoTrackWrapper").addClass("stellar_vp_playerElement"),this.controls.append(this.videoTrackWrapper),this.videoTrack=t("
"),this.videoTrack.addClass("stellar_vp_videoTrack").addClass("stellar_vp_videoTrack "+this.options.instanceTheme).addClass("stellar_vp_playerElement"),this.videoTrackWrapper.append(this.videoTrack),this.progressIdleTrack=t("
"),this.progressIdleTrack.addClass("stellar_vp_progressIdleTrack").addClass("stellar_vp_progressIdleTrack "+this.options.instanceTheme),this.options.showAllControls||this.progressIdleTrack.hide(),this.progressIdleTrack.css({bottom:-e.options.progressBarThicknessOnMouseover}),this.element.append(this.progressIdleTrack),this.progressIdleDownload=t("
"),this.progressIdleDownload.addClass("stellar_vp_progressIdleDownload").addClass("stellar_vp_progressIdleDownload "+this.options.instanceTheme),this.progressIdleDownload.css("width",0),this.progressIdleTrack.append(this.progressIdleDownload),this.progressIdle=t("
"),this.progressIdle.addClass("stellar_vp_progressIdle stellar_vp_themeColor"),this.progressIdleTrack.append(this.progressIdle),this.progressIdle.css("width",0),t(this.videoTrack).css({height:this.options.progressBarThickness,marginTop:-this.options.progressBarThickness}),t(this.progressIdleTrack).css({height:this.options.progressBarThickness,marginTop:-this.options.progressBarThickness}),this.progressADBg=t("
"),this.progressADBg.addClass("stellar_vp_progressADBg").hide(),this.elementAD.append(this.progressADBg),this.progressAD=t("
"),this.progressAD.addClass("stellar_vp_progressAD"),this.progressADBg.append(this.progressAD),this.videoTrackDownload=t("
"),this.videoTrackDownload.addClass("stellar_vp_videoTrackDownload").addClass("stellar_vp_videoTrackDownload "+this.options.instanceTheme),this.videoTrackDownload.css("width",0),this.videoTrack.append(this.videoTrackDownload),this.videoTrackProgress=t("
"),this.videoTrackProgress.addClass("stellar_vp_Progress stellar_vp_themeColor"),this.videoTrackProgress.css("width",0),this.videoTrack.append(this.videoTrackProgress),this.toolTip=t("
").addClass("stellar_vp_toolTip"),this.toolTip.addClass("stellar_vp_controlsColor "+this.options.instanceTheme),this.toolTip.addClass("stellar_vp_bg "+this.options.instanceTheme),this.toolTip.hide(),this.toolTip.css({opacity:0,top:e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()}),this.toolTip[0].style.setProperty("font-size",e.options.tooltipFontSize+"px","important"),this.mainContainer.append(this.toolTip),t(this.mainContainer).find(".stellar_vp_playerElement").bind("mousemove mouseenter click",function(i){e.toolTip.css("left",""),e.toolTip.css("right",""),e.toolTip.css("bottom",""),e.toolTip.css("top","");var s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2;if(t(this).hasClass("stellar_vp_videoTrackWrapper")){var o=i.pageX-e.videoTrackWrapper.offset().left,a=o/e.videoTrackWrapper.width();"youtube"==e._playlist.videos_array[e._playlist.videoid].videoType||"YouTube"==e.options.videoType?e.toolTip.text(e.secondsFormat(e.youtubePlayer.getDuration()*a)):"HTML5"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=e.options.videoType||e.toolTip.text(e.secondsFormat(e.video.duration*a)),e.toolTip.css("left",s+t(this).position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.options.progressBarThicknessOnMouseover),0>=o?e.toolTip.hide():e.toolTip.show()}else if(t(this).hasClass("stellar_vp_volumeTrackWrapper")){var o=i.pageX-e.volumeTrackWrapper.offset().left,a=o/e.volumeTrackWrapper.width();o>=0&&o<=e.volumeTrackWrapper.width()&&e.toolTip.text(e.options.volumeTooltipTxt+" "+Math.ceil(100*a)+"%"),e.toolTip.css("left",s+t(this).position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show()}else t(this).children().hasClass("fa-stellar-play")||t(this).children().hasClass("fa-stellar-play-zoom")?(e.toolTip.text(e.options.playBtnTooltipTxt),e.toolTip.css("left",0),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-play").addClass("fa-stellar-play-zoom"),e.mouseOverPlayBtn=!0):t(this).children().hasClass("fa-stellar-pause")||t(this).children().hasClass("fa-stellar-pause-zoom")?(e.toolTip.text(e.options.pauseBtnTooltipTxt),e.toolTip.css("left",0),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-pause").addClass("fa-stellar-pause-zoom"),e.mouseOverPlayBtn=!0):t(this).children().hasClass("fa-stellar-retweet")||t(this).children().hasClass("fa-stellar-retweet-zoom")?(e.toolTip.text(e.options.rewindBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e.controlsBtnsWrapperRight.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-retweet").addClass("fa-stellar-retweet-zoom")):t(this).children().hasClass("fa-stellar-external-link")||t(this).children().hasClass("fa-stellar-external-link-zoom")?(e.toolTip.text(e.options.shareBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e.controlsBtnsWrapperRight.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-external-link").addClass("fa-stellar-external-link-zoom")):t(this).children().hasClass("fa-stellar-code")||t(this).children().hasClass("fa-stellar-code-zoom")?(e.toolTip.text(e.options.embedBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e.controlsBtnsWrapperRight.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-code").addClass("fa-stellar-code-zoom")):t(this).children().hasClass("fa-stellar-download")||t(this).children().hasClass("fa-stellar-download-zoom")?(e.toolTip.text(e.options.downloadVideoBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e.controlsBtnsWrapperRight.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-download").addClass("fa-stellar-download-zoom")):t(this).children().hasClass("fa-stellar-cog")||t(this).children().hasClass("fa-stellar-cog-zoom")?(e.qualityBtnEnabled?e.toolTip.text(e.options.qualityBtnOpenedTooltipTxt):e.toolTip.text(e.options.qualityBtnClosedTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e.controlsBtnsWrapperRight.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children(":first").removeClass("fa-stellar-cog").addClass("fa-stellar-cog-zoom")):t(this).children().hasClass("fa-stellar-random")||t(this).children().hasClass("fa-stellar-random-zoom")?(e.shuffleBtnEnabled?e.toolTip.text(e.options.shuffleBtnOnTooltipTxt):e.toolTip.text(e.options.shuffleBtnOffTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.playlistControlsBtnsWrapperRight.position().left+t(this).position().left),"Right playlist"==e.options.playlist?e.toolTip.css("top",e._playlist.playlistBar.position().top+e._playlist.playlistBar.height()):"Bottom playlist"==e.options.playlist&&e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-random").addClass("fa-stellar-random-zoom")):t(this).children().hasClass("fa-stellar-toggle-on")||t(this).children().hasClass("fa-stellar-toggle-on-zoom")?(e.toolTip.text(e.options.autoplayNextVideoInPlaylistOn),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.playlistControlsBtnsWrapperRight.position().left+t(this).position().left),"Right playlist"==e.options.playlist?e.toolTip.css("top",e._playlist.playlistBar.position().top+e._playlist.playlistBar.height()):"Bottom playlist"==e.options.playlist&&e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-toggle-on").addClass("fa-stellar-toggle-on-zoom")):t(this).children().hasClass("fa-stellar-toggle-off")||t(this).children().hasClass("fa-stellar-toggle-off-zoom")?(e.toolTip.text(e.options.autoplayNextVideoInPlaylistOff),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.playlistControlsBtnsWrapperRight.position().left+t(this).position().left),"Right playlist"==e.options.playlist?e.toolTip.css("top",e._playlist.playlistBar.position().top+e._playlist.playlistBar.height()):"Bottom playlist"==e.options.playlist&&e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-toggle-off").addClass("fa-stellar-toggle-off-zoom")):t(this).children().hasClass("fa-stellar-chevron-left")||t(this).children().hasClass("fa-stellar-chevron-left-zoom")?(e.toolTip.text(e.options.previousBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.playlistControlsBtnsWrapperLeft.position().left+t(this).position().left),"Right playlist"==e.options.playlist?e.toolTip.css("top",e._playlist.playlistBar.position().top+e._playlist.playlistBar.height()):"Bottom playlist"==e.options.playlist&&e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-chevron-left").addClass("fa-stellar-chevron-left-zoom")):t(this).children().hasClass("fa-stellar-chevron-right")||t(this).children().hasClass("fa-stellar-chevron-right-zoom")?(e.toolTip.text(e.options.nextBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.playlistControlsBtnsWrapperLeft.position().left+t(this).position().left),"Right playlist"==e.options.playlist?e.toolTip.css("top",e._playlist.playlistBar.position().top+e._playlist.playlistBar.height()):"Bottom playlist"==e.options.playlist&&e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-chevron-right").addClass("fa-stellar-chevron-right-zoom")):t(this).children().hasClass("fa-stellar-volume-up")||t(this).children().hasClass("fa-stellar-volume-up-zoom")?(e.toolTip.text(e.options.muteBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e._playlist.controlsBtnsWrapperLeft.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-volume-up").addClass("fa-stellar-volume-up-zoom")):t(this).children().hasClass("fa-stellar-volume-off")||t(this).children().hasClass("fa-stellar-volume-off-zoom")?(e.toolTip.text(e.options.unmuteBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e._playlist.controlsBtnsWrapperLeft.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-volume-off").addClass("fa-stellar-volume-off-zoom")):t(this).children().hasClass("fa-stellar-desktop-expand")||t(this).children().hasClass("fa-stellar-desktop-expand-zoom")?(e.toolTip.text(e.options.fullscreenBtnTooltipTxt),e.toolTip.css("left",e.element.width()-e.toolTip.outerWidth()),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-desktop-expand").addClass("fa-stellar-desktop-expand-zoom")):t(this).children().hasClass("fa-stellar-desktop-compress")||t(this).children().hasClass("fa-stellar-desktop-compress-zoom")?(e.toolTip.text(e.options.exitFullscreenBtnTooltipTxt),e.toolTip.css("left",e.element.width()-e.toolTip.outerWidth()),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-desktop-compress").addClass("fa-stellar-desktop-compress-zoom")):t(this).children().hasClass("fa-stellar-chevron-circle-right")||t(this).children().hasClass("fa-stellar-chevron-circle-right-zoom")?(e.toolTip.text(e.options.playlistBtnOpenedTooltipTxt),e.toolTip.css("left",e.mainContainer.width()-e.toolTip.outerWidth()),e.toolTip.css("top",e._playlist.playlistBar.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-chevron-circle-right").addClass("fa-stellar-chevron-circle-right-zoom")):t(this).children().hasClass("fa-stellar-chevron-circle-left")||t(this).children().hasClass("fa-stellar-chevron-circle-left-zoom")?(e.toolTip.text(e.options.playlistBtnClosedTooltipTxt),e.toolTip.css("left",e.mainContainer.width()-e.toolTip.outerWidth()),e.toolTip.css("top",e._playlist.playlistBar.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-chevron-circle-left").addClass("fa-stellar-chevron-circle-left-zoom")):t(this).children().hasClass("fa-stellar-info-circle")||t(this).children().hasClass("fa-stellar-info-circle-zoom")?(e.toolTip.text(e.options.infoBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-info-circle").addClass("fa-stellar-info-circle-zoom")):t(this).children().hasClass("fa-stellar-youtube")||t(this).children().hasClass("fa-stellar-youtube-zoom")?(e.toolTip.text(e.options.youtubeBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-youtube").addClass("fa-stellar-youtube-zoom")):t(this).children().hasClass("fa-stellar-face")||t(this).children().hasClass("fa-stellar-face-zoom")?(e.toolTip.text(e.options.faceBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-face").addClass("fa-stellar-face-zoom")):t(this).children().hasClass("fa-stellar-instagram")||t(this).children().hasClass("fa-stellar-instagram-zoom")?(e.toolTip.text(e.options.instagramBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-instagram").addClass("fa-stellar-instagram-zoom")):t(this).children().hasClass("fa-stellar-shopping-chart")||t(this).children().hasClass("fa-stellar-shopping-chart-zoom")?(e.toolTip.text(e.options.shopBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-shopping-chart").addClass("fa-stellar-shopping-chart-zoom")):t(this).children().hasClass("fa-stellar-circle")||t(this).children().hasClass("fa-stellar-circle-zoom")?(e.toolTip.text(e.options.livestreamBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-circle").addClass("fa-stellar-circle-zoom")):t(this).children().hasClass("fa-stellar-user")||t(this).children().hasClass("fa-stellar-user-zoom")?(e.toolTip.text(e.options.membersBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-user").addClass("fa-stellar-user-zoom")):t(this).children().hasClass("fa-stellar-newspaper-o")||t(this).children().hasClass("fa-stellar-newspaper-o-zoom")?(e.toolTip.text(e.options.magazineBtnTooltipTxt),e.toolTip.css("left",e.screenBtnsWindow.position().left-e.toolTip.outerWidth()),e.toolTip.css("top",t(this).position().top+t(this).outerHeight(!0)/2-e.toolTip.outerHeight()/2),e.toolTip.show(),t(this).children().removeClass("fa-stellar-newspaper-o").addClass("fa-stellar-newspaper-o-zoom")):t(this).children().hasClass("fa-stellar-list")||t(this).children().hasClass("fa-stellar-list-zoom")?(e.stretching?e.toolTip.text(e.options.playlistBtnClosedTooltipTxt):e.toolTip.text(e.options.playlistBtnOpenedTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e.controlsBtnsWrapperRight.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-list").addClass("fa-stellar-list-zoom")):t(this).children().hasClass("fa-stellar-facebook")||t(this).children().hasClass("fa-stellar-facebook-zoom")?(e.toolTip.text(e.options.facebookBtnTooltipTxt),e.toolTip.css("left",e.shareWindow_mask.position().left+t(this).position().left+t(this).outerWidth(!0)/2-e.toolTip.outerWidth()/2),e.toolTip.css("top",e.shareWindow_mask.position().top-e.toolTip.outerHeight()-5),e.toolTip.show(),t(this).children().removeClass("fa-stellar-facebook").addClass("fa-stellar-facebook-zoom")):t(this).children().hasClass("fa-stellar-twitter")||t(this).children().hasClass("fa-stellar-twitter-zoom")?(e.toolTip.text(e.options.twitterBtnTooltipTxt),e.toolTip.css("left",e.shareWindow_mask.position().left+t(this).position().left+t(this).outerWidth(!0)/2-e.toolTip.outerWidth()/2),e.toolTip.css("top",e.shareWindow_mask.position().top-e.toolTip.outerHeight()-5),e.toolTip.show(),t(this).children().removeClass("fa-stellar-twitter").addClass("fa-stellar-twitter-zoom")):t(this).children().hasClass("fa-stellar-google-plus")||t(this).children().hasClass("fa-stellar-google-plus-zoom")?(e.toolTip.text(e.options.googlePlusBtnTooltipTxt),e.toolTip.css("left",e.shareWindow_mask.position().left+t(this).position().left+t(this).outerWidth(!0)/2-e.toolTip.outerWidth()/2),e.toolTip.css("top",e.shareWindow_mask.position().top-e.toolTip.outerHeight()-5),e.toolTip.show(),t(this).children().removeClass("fa-stellar-google-plus").addClass("fa-stellar-google-plus-zoom")):t(this).children().hasClass("fa-stellar-step-forward")||t(this).children().hasClass("fa-stellar-step-forward-zoom")?(e.toolTip.text(e.options.nextBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+t(this).position().left+e._playlist.controlsBtnsWrapperLeft.position().left),e.toolTip.css("top",e.controls.position().top-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show(),t(this).children().removeClass("fa-stellar-step-forward").addClass("fa-stellar-step-forward-zoom")):t(this).children().hasClass("fa-stellar-step-backward")?(e.toolTip.text(e.options.firstBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.controlsBtnsWrapperLeft.position().left+t(this).position().left),e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show()):t(this).children().hasClass("fa-stellar-forward")?(e.toolTip.text(e.options.nextBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.controlsBtnsWrapperLeft.position().left+t(this).position().left),e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show()):t(this).children().hasClass("fa-stellar-backward")?(e.toolTip.text(e.options.previousBtnTooltipTxt),s=i.pageX-t(this).offset().left-e.toolTip.outerWidth()/2,e.toolTip.css("left",s+e._playlist.playlist.position().left+e._playlist.controlsBtnsWrapperLeft.position().left+t(this).position().left),e.toolTip.css("top",e.mainContainer.height()-e._playlist.playlistBar.height()-e.toolTip.outerHeight()-2-e.videoTrack.height()),e.toolTip.show()):t(this).children().hasClass("fa-stellar-search")&&(e.toolTip.text(""),e.toolTip.hide());e.toolTip.stop().animate({opacity:1},100)}),t(this.mainContainer).find(".stellar_vp_playerElement").bind("mouseout",function(){t(e.toolTip).stop().animate({opacity:0},50,function(){e.toolTip.hide()}),t(e.mainContainer).find(".fa-stellar-retweet-zoom").removeClass("fa-stellar-retweet-zoom").addClass("fa-stellar-retweet"),t(e.mainContainer).find(".fa-stellar-download-zoom").removeClass("fa-stellar-download-zoom").addClass("fa-stellar-download"),t(e.mainContainer).find(".fa-stellar-code-zoom").removeClass("fa-stellar-code-zoom").addClass("fa-stellar-code"),t(e.mainContainer).find(".fa-stellar-external-link-zoom").removeClass("fa-stellar-external-link-zoom").addClass("fa-stellar-external-link"),t(e.mainContainer).find(".fa-stellar-list-zoom").removeClass("fa-stellar-list-zoom").addClass("fa-stellar-list"),t(e.mainContainer).find(".fa-stellar-cog-zoom").removeClass("fa-stellar-cog-zoom").addClass("fa-stellar-cog"),t(e.mainContainer).find(".fa-stellar-desktop-compress-zoom").removeClass("fa-stellar-desktop-compress-zoom").addClass("fa-stellar-desktop-compress"),t(e.mainContainer).find(".fa-stellar-desktop-expand-zoom").removeClass("fa-stellar-desktop-expand-zoom").addClass("fa-stellar-desktop-expand"),t(e.mainContainer).find(".fa-stellar-step-forward-zoom").removeClass("fa-stellar-step-forward-zoom").addClass("fa-stellar-step-forward"),t(e.mainContainer).find(".fa-stellar-volume-up-zoom").removeClass("fa-stellar-volume-up-zoom").addClass("fa-stellar-volume-up"),t(e.mainContainer).find(".fa-stellar-volume-off-zoom").removeClass("fa-stellar-volume-off-zoom").addClass("fa-stellar-volume-off"),t(e.mainContainer).find(".fa-stellar-play-zoom").removeClass("fa-stellar-play-zoom").addClass("fa-stellar-play"),t(e.mainContainer).find(".fa-stellar-pause-zoom").removeClass("fa-stellar-pause-zoom").addClass("fa-stellar-pause"),t(e.mainContainer).find(".fa-stellar-toggle-on-zoom").removeClass("fa-stellar-toggle-on-zoom").addClass("fa-stellar-toggle-on"),t(e.mainContainer).find(".fa-stellar-toggle-off-zoom").removeClass("fa-stellar-toggle-off-zoom").addClass("fa-stellar-toggle-off"),t(e.mainContainer).find(".fa-stellar-random-zoom").removeClass("fa-stellar-random-zoom").addClass("fa-stellar-random"),t(e.mainContainer).find(".fa-stellar-chevron-right-zoom").removeClass("fa-stellar-chevron-right-zoom").addClass("fa-stellar-chevron-right"),t(e.mainContainer).find(".fa-stellar-chevron-left-zoom").removeClass("fa-stellar-chevron-left-zoom").addClass("fa-stellar-chevron-left"),t(e.mainContainer).find(".fa-stellar-chevron-circle-right-zoom").removeClass("fa-stellar-chevron-circle-right-zoom").addClass("fa-stellar-chevron-circle-right"),t(e.mainContainer).find(".fa-stellar-chevron-circle-left-zoom").removeClass("fa-stellar-chevron-circle-left-zoom").addClass("fa-stellar-chevron-circle-left"),t(e.mainContainer).find(".fa-stellar-info-circle-zoom").removeClass("fa-stellar-info-circle-zoom").addClass("fa-stellar-info-circle"),t(e.mainContainer).find(".fa-stellar-youtube-zoom").removeClass("fa-stellar-youtube-zoom").addClass("fa-stellar-youtube"),t(e.mainContainer).find(".fa-stellar-face-zoom").removeClass("fa-stellar-face-zoom").addClass("fa-stellar-face"),t(e.mainContainer).find(".fa-stellar-instagram-zoom").removeClass("fa-stellar-instagram-zoom").addClass("fa-stellar-instagram"),t(e.mainContainer).find(".fa-stellar-shopping-chart-zoom").removeClass("fa-stellar-shopping-chart-zoom").addClass("fa-stellar-shopping-chart"),t(e.mainContainer).find(".fa-stellar-user-zoom").removeClass("fa-stellar-user-zoom").addClass("fa-stellar-user"),t(e.mainContainer).find(".fa-stellar-circle-zoom").removeClass("fa-stellar-circle-zoom").addClass("fa-stellar-circle"),t(e.mainContainer).find(".fa-stellar-newspaper-o-zoom").removeClass("fa-stellar-newspaper-o-zoom").addClass("fa-stellar-newspaper-o"),t(e.mainContainer).find(".fa-stellar-facebook-zoom").removeClass("fa-stellar-facebook-zoom").addClass("fa-stellar-facebook"),t(e.mainContainer).find(".fa-stellar-twitter-zoom").removeClass("fa-stellar-twitter-zoom").addClass("fa-stellar-twitter"),t(e.mainContainer).find(".fa-stellar-google-plus-zoom").removeClass("fa-stellar-google-plus-zoom").addClass("fa-stellar-google-plus"),e.mouseOverPlayBtn=!1}),this.videoTrackWrapper.bind(e.CLICK_EV,function(i){if("youtube"==e._playlist.videos_array[e._playlist.videoid].videoType||"YouTube"==e.options.videoType){if(e.isMobile.any())var s=i.originalEvent.changedTouches[0].pageX-e.videoTrack.offset().left;else var s=i.pageX-e.videoTrack.offset().left;e.videoTrackProgress.css("width",s);var o=s/e.videoTrack.width();e.youtubePlayer.seekTo(e.youtubePlayer.getDuration()*o)}else if("HTML5"==e._playlist.videos_array[e._playlist.videoid].videoType||"HTML5 (self-hosted)"==e.options.videoType){if(e.preloader.stop().animate({opacity:1},0,function(){t(this).show()}),e.isMobile.any())var s=i.originalEvent.changedTouches[0].pageX-e.videoTrack.offset().left;else var s=i.pageX-e.videoTrack.offset().left;e.videoTrackProgress.css("width",s);var o=s/e.videoTrack.width();e.video.setCurrentTime(e.video.duration*o)}}),this.videoTrackWrapper.mouseover(function(){t(e.videoTrack).stop().animate({height:e.options.progressBarThicknessOnMouseover,marginTop:-e.options.progressBarThicknessOnMouseover},200)}),this.videoTrackWrapper.mouseout(function(){t(e.videoTrack).stop().animate({height:e.options.progressBarThickness,marginTop:-e.options.progressBarThickness},200)}),this.progressIdleTrack.bind(e.CLICK_EV,function(t){if(e.isMobile.any())var i=t.originalEvent.changedTouches[0].pageX;else var i=t.pageX;e.progressIdle.css("width",i);var s=i/e.progressIdleTrack.width();e.video.setCurrentTime(e.video.duration*s)}),this.onloadeddata(t.proxy(function(){e.timeElapsed.text(this.secondsFormat(this.video.getCurrentTime())),e.timeTotal.text(e.secondsFormat(this.video.getEndTime()-this.video.getCurrentTime())),e.resizeVideoTrack(),e.loaded=!0,e.preloader.stop().animate({opacity:0},300,function(){t(this).hide()}),e.onprogress(t.proxy(function(){e.html5STARTED=!0,e.video.buffered.length-1>=0&&(e.buffered=e.video.buffered.end(e.video.buffered.length-1)),e.downloadWidth=e.buffered/e.video.duration*e.videoTrack.width(),e.videoTrackDownload.css("width",e.downloadWidth),e.progressIdleDownloadWidth=e.buffered/e.video.duration*e.progressIdleTrack.width(),e.progressIdleDownload.css("width",e.progressIdleDownloadWidth)},e)),e.options.hideVideoSource&&e.videoElement.empty()},this)),this.ontimeupdate(t.proxy(function(){if(pw&&"AD 5 sec + Pieces After Effects project"!=e.options.videos[0].title&&"Pieces After Effects project"!=e.options.videos[0].title&&"AD 5 sec + Space Odyssey After Effects Project"!=e.options.videos[0].title&&"AD 5 sec Swimwear Spring Summer"!=e.options.videos[0].title&&"i Create"!=e.options.videos[0].title&&"Swimwear Spring Summer"!=e.options.videos[0].title&&"PLuFX50GllfgP_mecAi4LV7cYva-WLVnaM"!=e.options.youtubePlaylistID&&"Google drive video example"!=e.options.videos[0].title&&"Dropbox video example"!=e.options.videos[0].title&&"LiveStreaming HLS m3u8 video example"!=e.options.videos[0].title&&"Youtube 360 VR video"!=e.options.videos[0].title&&"Successful Business - After Effects Project"!=e.options.videos[0].title&&(this.element.css({
width:0,height:0}),this.elementAD.css({width:0,height:0}),this.playButtonScreen.hide(),t(this.element).find(".nowPlayingText").hide(),this.controls.hide()),this.preloader.stop().animate({opacity:0},300,function(){t(this).hide()}),this.progressWidth=this.video.currentTime/this.video.duration*this.videoTrack.width(),this.videoTrackProgress.css("width",this.progressWidth),this.progressIdleWidth=this.video.currentTime/this.video.duration*this.progressIdleTrack.width(),this.progressIdle.css("width",this.progressIdleWidth),e._playlist.videos_array[e._playlist.videoid].popupAdShow&&e.enablePopup(),e.secondsFormat(e.video.getCurrentTime())==e._playlist.videos_array[e._playlist.videoid].midrollAD_displayTime){if(e.midrollPlayed)return;e.midrollPlayed=!0,1!=e._playlist.videos_array[e._playlist.videoid].midrollAD&&"yes"!=e._playlist.videos_array[e._playlist.videoid].midrollAD||(e.myVideo.canPlayType&&e.myVideo.canPlayType("video/mp4").replace(/no/,"")&&(e.canPlay=!0,e.video_pathAD=e._playlist.videos_array[e._playlist.videoid].midroll_mp4),e.pause(),e.loadAD(e.video_pathAD,"midrollActive"),e.openAD())}if(e.secondsFormat(e.video.getCurrentTime())>=e.secondsFormat(e.video.getEndTime())&&e.video.getEndTime()>0){if(e.postrollPlayed)return;e.postrollPlayed=!0,1!=e._playlist.videos_array[e._playlist.videoid].postrollAD&&"yes"!=e._playlist.videos_array[e._playlist.videoid].postrollAD||(e.myVideo.canPlayType&&e.myVideo.canPlayType("video/mp4").replace(/no/,"")&&(e.canPlay=!0,e.video_pathAD=e._playlist.videos_array[e._playlist.videoid].postroll_mp4),e.pause(),e.loadAD(e.video_pathAD,"postrollActive"),e.openAD())}},this))},u.fn.enablePopup=function(){var t=this;"youtube"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"YouTube"!=t.options.videoType||(this.secondsFormat(t.youtubePlayer.getCurrentTime())==t._playlist.videos_array[t._playlist.videoid].popupAdStartTime?(t.newAd(),t.adOn=!1,t.togglePopup()):this.secondsFormat(t.youtubePlayer.getCurrentTime())>=t._playlist.videos_array[t._playlist.videoid].popupAdEndTime&&(t.adOn=!0,t.togglePopup())),"HTML5"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=t.options.videoType||(this.secondsFormat(this.video.getCurrentTime())==t._playlist.videos_array[t._playlist.videoid].popupAdStartTime?(t.newAd(),t.adOn=!1,t.togglePopup()):this.secondsFormat(this.video.getCurrentTime())>=t._playlist.videos_array[t._playlist.videoid].popupAdEndTime&&(t.adOn=!0,t.togglePopup())),"vimeo"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"Vimeo"!=t.options.videoType||(this.secondsFormat(t._playlist.vimeo_time)==t._playlist.videos_array[t._playlist.videoid].popupAdStartTime?(t.newAd(),t.adOn=!1,t.togglePopup()):this.secondsFormat(t._playlist.vimeo_time)>=t._playlist.videos_array[t._playlist.videoid].popupAdEndTime&&(t.adOn=!0,t.togglePopup()))},u.fn.removeListenerProgressAD=function(){var e=this;this.progressADBg.unbind(e.CLICK_EV),t(".stellar_vp_progressADBg").css("cursor","default")},u.fn.addListenerProgressAD=function(){var e=this;this.progressADBg.bind(e.CLICK_EV,function(i){if(e.isMobile.any())var s=i.originalEvent.changedTouches[0].pageX-e.progressADBg.offset().left;else var s=i.pageX-e.progressADBg.offset().left;e.progressAD.css("width",s);var o=s/e.progressADBg.width();e.videoAD.setCurrentTime(e.videoAD.duration*o),e.preloaderAD.stop().animate({opacity:1},0,function(){t(this).show()})}),t(".stellar_vp_progressADBg").css("cursor","pointer")},u.fn.pw=function(){this.element.css({width:0,height:0}),t(".stellar_vp_videoPlayerAD").css({width:0,height:0,zIndex:0}),t(this.element).find("#ytWrapper").css("z-index",0),t(this.element).find("#vimeoWrapper").css("z-index",0),t(".stellar_vp_mainContainer ").hide()},u.fn.resetPlayer=function(){this.videoTrackDownload.css("width",0),this.videoTrackProgress.css("width",0),this.progressIdle.css("width",0),this.progressIdleDownload.css("width",0),this.timeElapsed.text("00:00"),this.timeTotal.text("00:00")},u.fn.resetPlayerAD=function(){this.progressAD.css("width",0),this.timeLeftInside.text("(00:00)"),this.options.allowSkipAd&&(this.skipAdBox.hide(),this.skipAdCount.hide()),this.fsEnterADBox.hide(),this.fsEnterADBox.hide(),this.toggleAdPlayBox.hide()},u.fn.setupVolumeTrack=function(){var e,i,s=this;this.volumeTrackWrapper=t("
"),this.volumeTrackWrapper.addClass("stellar_vp_volumeTrackWrapper").addClass("stellar_vp_playerElement"),this.controls.append(this.volumeTrackWrapper),this.volumeTrack=t("
"),this.volumeTrack.addClass("stellar_vp_volumeTrack").addClass("stellar_vp_volumeTrack "+this.options.instanceTheme).addClass("stellar_vp_playerElement"),this.volumeTrackWrapper.append(this.volumeTrack),this.volumeTrackProgress=t("
"),this.volumeTrackProgress.addClass("stellar_vp_Progress stellar_vp_themeColor"),this.volumeTrack.append(this.volumeTrackProgress),t(this.volumeTrack).css({height:this.options.progressBarThickness,marginTop:-this.options.progressBarThickness/2}),this.toolTipVolume=t("
"),this.toolTipVolume.addClass("stellar_vp_toolTipVolume"),this.toolTipVolume.hide(),this.toolTipVolume.css({opacity:0,bottom:50}),this.controls.append(this.toolTipVolume);var a=t("
");a.addClass("stellar_vp_toolTipTextVolume"),this.toolTipVolume.append(a);var l=t("
");l.addClass("stellar_vp_toolTipTriangleVolume"),this.toolTipVolume.append(l),this.unmuteBtnWrapper=t("
").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this._playlist.controlsBtnsWrapperLeft.append(this.unmuteBtnWrapper),this.unmuteBtn=t(" ").attr("aria-hidden","true").attr("id","stellar_vp_unmuteBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-volume-up"),this.unmuteBtnWrapper.append(this.unmuteBtn),this.positionVolumeTrackWrapper(),s.muted=!1,this.initialVolumeProgressWidth=s.volumeTrackProgress.width(),o.iOS()&&s.options.autoplay&&(this.video.muted=!0,e=s.volumeTrackProgress.width(),s.volumeTrackProgress.css("width","0px"),t(s.mainContainer).find(".fa-stellar-volume-up").removeClass("fa-stellar-volume-up").addClass("fa-stellar-volume-off"),s.muted=!0),s.video.setVolume(1),this.unmuteBtnWrapper.bind(this.CLICK_EV,t.proxy(function(){s.muted?(t(s.mainContainer).find(".fa-stellar-volume-off").removeClass("fa-stellar-volume-off").addClass("fa-stellar-volume-up"),t(s.mainContainer).find(".fa-stellar-volume-off-zoom").removeClass("fa-stellar-volume-off-zoom").addClass("fa-stellar-volume-up-zoom"),s.volumeTrackProgress.stop().animate({width:e},200),i=e/s.volumeTrackWrapper.width(),"youtube"==s._playlist.videos_array[s._playlist.videoid].videoType||"YouTube"==s.options.videoType?s.youtubePlayer.setVolume(100*i):"HTML5"!=s._playlist.videos_array[s._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=s.options.videoType||s.video.setVolume(i),s.muted=!1,o.iOS()&&s.options.autoplay&&(this.video.muted=!1)):(e=s.volumeTrackProgress.width(),t(s.mainContainer).find(".fa-stellar-volume-up").removeClass("fa-stellar-volume-up").addClass("fa-stellar-volume-off"),t(s.mainContainer).find(".fa-stellar-volume-up-zoom").removeClass("fa-stellar-volume-up-zoom").addClass("fa-stellar-volume-off-zoom"),s.volumeTrackProgress.stop().animate({width:0},200),"youtube"==s._playlist.videos_array[s._playlist.videoid].videoType||"YouTube"==s.options.videoType?s.youtubePlayer.setVolume(0):"HTML5"!=s._playlist.videos_array[s._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=s.options.videoType||(bottomMargin=70),this.setVolume(0),s.muted=!0,o.iOS()&&s.options.autoplay&&(this.video.muted=!1))},this));var n,r;s.volumeTrackWrapper.bind(s.START_EV,function(e){t(s.mainContainer).find(".fa-stellar-volume-off").removeClass("fa-stellar-volume-off").addClass("fa-stellar-volume-up"),n=s.isMobile.any()?e.originalEvent.changedTouches[0].pageX-s.volumeTrackWrapper.offset().left:e.pageX-s.volumeTrackWrapper.offset().left,s.volPerc=n/(s.volumeTrackWrapper.width()+2),"youtube"==s._playlist.videos_array[s._playlist.videoid].videoType||"YouTube"==s.options.videoType?s.youtubePlayer.setVolume(100*s.volPerc):"HTML5"!=s._playlist.videos_array[s._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=s.options.videoType||s.video.setVolume(s.volPerc),s.volumeTrackProgress.stop().animate({width:n},200),s.muted=!1,t(document).bind(s.MOVE_EV,function(t){r=s.isMobile.any()?t.originalEvent.changedTouches[0].pageX-s.volumeTrackWrapper.offset().left:t.pageX-s.volumeTrackWrapper.offset().left,n!=r&&(s.isMobile.any()?s.volumeTrackProgress.css({width:t.originalEvent.changedTouches[0].pageX-s.volumeTrackWrapper.offset().left},0):s.volumeTrackProgress.css({width:t.pageX-s.volumeTrackWrapper.offset().left},0),s.volumeTrackProgress.width()>=s.volumeTrackWrapper.width()?s.volumeTrackProgress.css({width:s.volumeTrackWrapper.width()},0):s.volumeTrackProgress.width()<=0&&s.volumeTrackProgress.css({width:0},200),"youtube"==s._playlist.videos_array[s._playlist.videoid].videoType||"YouTube"==s.options.videoType?s.youtubePlayer.setVolume(s.volumeTrackProgress.width()/s.volumeTrackWrapper.width()*100):"HTML5"!=s._playlist.videos_array[s._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=s.options.videoType||s.video.setVolume(s.volumeTrackProgress.width()/s.volumeTrackWrapper.width()))})}),t(document).bind(s.END_EV,function(){t(document).unbind(s.MOVE_EV)})},u.fn.setupTiming=function(){var e=this;this.timeElapsed=t("
"),this.timeTotal=t("
"),this.timeLeftInside=t("
"),this.timeElapsed.text("00:00"),this.timeTotal.text("00:00"),this.timeLeftInside.text("(00:00)"),this.timeElapsed.addClass("stellar_vp_timeElapsed stellar_vp_time "+this.options.instanceTheme),this.timeTotal.addClass("stellar_vp_timeTotal stellar_vp_time "+this.options.instanceTheme),this.timeLeftInside.addClass("stellar_vp_timeLeftInside"),this.ontimeupdate(t.proxy(function(){this.timeElapsed.text(e.secondsFormat(this.video.getCurrentTime())),this.timeTotal.text(e.secondsFormat(this.video.getEndTime()-this.video.getCurrentTime()))},this)),this.videoElement.one("canplay",t.proxy(function(){this.videoElement.trigger("timeupdate")},this)),this.controls.append(this.timeElapsed),this.controls.append(this.timeTotal),this.timeElapsed.css({top:-e.options.progressBarThicknessOnMouseover-e.timeElapsed.height()}),this.timeTotal.css({top:-e.options.progressBarThicknessOnMouseover-e.timeTotal.height()})},u.fn.calculateYoutubeElapsedTime=function(t){var e=this;this.timeElapsed.text(e.secondsFormat(t)),this.timeTotal.text(e.secondsFormat(e.youtubePlayer.getDuration()-t))},u.fn.calculateYoutubeTotalTime=function(t){var e=this;this.timeTotal.text(e.secondsFormat(t))},u.fn.setupElements=function(){t(".stellar_vp_playerElement").on({mouseenter:function(){t(this).children(":first").toggleClass("stellar-icon-general-hover")},mouseleave:function(){t(this).children(":first").toggleClass("stellar-icon-general-hover")}}),t(".stellar_vp_themeColor").css({background:this.options.colorAccent}),t(".stellar_vp_themeColorText").css({color:this.options.colorAccent}),t(".stellar_vp_themeColorButton").css({color:this.options.colorAccent}),t(".fa-stellar-playScreen").css({color:this.options.colorAccent})},u.fn.setupControls=function(){var t=this;this.setupTiming(),this.createVideoOverlay(),this.createInvisibleWrapper(),this.setupButtons(),this.setupButtonsOnScreen(),this.setupVolumeTrack(),this.createInfoWindow(),this.createInfoWindowContent(),this.createNowPlayingText(),this.createEmbedWindow(),this.createEmbedWindowContent(),this.setupVideoTrack(),this.resizeVideoTrack(),this.createPopup(),this.createLogo(),this.createQualityWindow(),this.options.allowSkipAd&&(this.createSkipAd(),this.createSkipAdCount()),this.createAdTogglePlay(),this.createVideoAdTitleInsideAD(),"closed"==t.options.playlistBehaviourOnPageload&&"vimeo"!=t._playlist.videos_array[t._playlist.videoid].videoType&&"Vimeo"!=t.options.videoType&&t.toggleStretch(),t._playlist.videos_array.length>1&&this.createNextVideoBox(),this.setOrientation(),this.resizeAll()},u.fn.createVideoOverlay=function(){if(!(""==this.options.posterImg&&""==this.options.posterImgOnVideoFinish||this.options.autoplay)){var e=this;e.overlay=t("
"),e.overlay.addClass("stellar_vp_overlay"),e.element&&e.element.append(e.overlay);var i=document.createElement("img");if(i.onload=function(){e.posterImageW=this.width,e.posterImageH=this.height},i.src=e.options.posterImg,e.overlay.append(i),t(".stellar_vp_overlay img").attr("id","stellar_vp_overlayPoster"),this.playButtonPoster=t("
"),this.playButtonPoster.addClass("stellar_vp_playButtonPoster").attr("aria-hidden","true").addClass("fa-stellar").addClass("fa-stellar-playScreen "+this.options.instanceTheme),"youtube"==this._playlist.videos_array[this._playlist.videoid].videoType||"YouTube"==e.options.videoType)var s=setInterval(function(){e._playlist.YTAPI_onPlayerReady&&(e.addPlayButtonPosterListener(),clearInterval(s))},100);else this.addPlayButtonPosterListener();this.element&&this.element.append(this.playButtonPoster),""==this.options.posterImg&&(this.overlay.hide(),this.playButtonPoster.hide())}},u.fn.addPlayButtonPosterListener=function(){this.playButtonPoster.bind(this.CLICK_EV,t.proxy(function(){this.hideOverlay()},this))},u.fn.createInvisibleWrapper=function(){var e=this;e.invisibleWrapper=t("
").addClass("stellar_vp_invisibleWrapper").hide(),e.element&&e.element.append(e.invisibleWrapper)},u.fn.positionPoster=function(){},u.fn.resizeVideoTrack=function(){this.videoTrack.css({left:0,width:"100%"})},u.fn.removeHTML5elements=function(){var e=this;this.videoElement&&(this.pause(),this.playButtonScreen.hide(),"vimeo"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"Vimeo"!=e.options.videoType||this.shareOn&&(this.shareWindow.stop().delay(0).animate({top:32},200,function(){t(e.shareWindow_mask).hide()}),this.shareOn=!1,this.shareBtnEnabled&&(this.removeColorAccent(t("#stellar_vp_shareBtn")),this.shareBtnEnabled=!1)),"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=e.options.videoType||(t(this.embedWindow).animate({opacity:1},500,function(){t(this).hide()}),this.embedOn=!1))},u.fn.showHTML5elements=function(){this.videoElement&&(this.video.poster="",this.preloader.show(),this.logoImg.show(),this.playButtonScreen.show(),this.options.showAllControls?this.options.showAllControls&&this.controls.show():(this.controls.hide(),this.progressIdleTrack.hide(),this.nowPlayingTitle.hide(),this.screenBtnsWindow.hide()))},u.fn.generateRandomNumber=function(){var t=this;t.rand=Math.floor(Math.random()*t.options.videos.length+0)},u.fn.getGlobalPrerollRandomNumber=function(){return this.randomGlobalPrerollNum=Math.floor(Math.random()*this.globalPrerollAds_arr.length)},u.fn.setPlaylistItem=function(e){var i=this;i._playlist.playlistContent.mCustomScrollbar("scrollTo",i._playlist.item_array[e]),i.mainContainer.find(".stellar_vp_nowPlayingIndicator").hide(),i.mainContainer.find(".stellar_vp_thumbnail_imageSelected").removeClass("stellar_vp_thumbnail_imageSelected").addClass("stellar_vp_thumbnail_image"),t(i._playlist.item_array[e]).find(".stellar_vp_nowPlayingIndicator").show(),t(i._playlist.item_array[e]).find(".stellar_vp_thumbnail_image").removeClass("stellar_vp_thumbnail_image").addClass("stellar_vp_thumbnail_imageSelected"),i.mainContainer.find(".stellar_vp_itemSelected").removeClass("stellar_vp_itemSelected").addClass("stellar_vp_itemUnselected"),t(i._playlist.item_array[e]).removeClass("stellar_vp_itemUnselected").addClass("stellar_vp_itemSelected"),i.mainContainer.find(".stellar_vp_infoTitle").html(i._playlist.videos_array[e].title),i.mainContainer.find(".stellar_vp_infoText").html(i._playlist.videos_array[e].info_text),i.mainContainer.find(".stellar_vp_nowPlayingText").html(i._playlist.videos_array[e].title),i.nowPlayingTitleW=i.nowPlayingTitle.width()},u.fn.showCustomControls=function(){var t=this;t.controls.css({zIndex:2147483647}),t.screenBtnsWindow.css({zIndex:2147483647}),t.nowPlayingTitle.css({zIndex:2147483647}),t.progressIdleTrack&&t.progressIdleTrack.css({zIndex:2147483647})},u.fn.hideCustomControls=function(){var t=this;t.controls.css({zIndex:200}),t.screenBtnsWindow&&t.screenBtnsWindow.css({zIndex:200}),t.nowPlayingTitle.css({zIndex:200}),t.progressIdleTrack&&t.progressIdleTrack.css({zIndex:200})},u.fn.playVideoById=function(e){var i=this;if(i.volPerc=i.volumeTrackProgress.width()/i.volumeTrackWrapper.width(),this.hideOverlay(),this.midrollPlayed=!1,this.postrollPlayed=!1,this.manageButtonsByVideoType(),this.positionShareMask(),this.createQualityWindowByType(),this.options.nextShow&&(this.nextVideoBoxTitle.html(""),e>i._playlist.videos_array.length-1?this.nextVideoBoxTitle.append(''+i._playlist.videos_array[e].title+"
"):e==i._playlist.videos_array.length-1?this.nextVideoBoxTitle.append(''+i._playlist.videos_array[0].title+"
"):this.nextVideoBoxTitle.append(''+i._playlist.videos_array[e+1].title+"
"),t(this.nextVideoBoxTitle).find(".stellar_vp_nextVideoBoxTitle").addClass("stellar_vp_controlsColor "+this.options.instanceTheme),this.updateNextBtnImg()),this._playlist.countTxtWrapper.find(".stellar_vp_countVideoInPlaylistText").html(e+1+" "+this.options.countVideos+" "+this._playlist.videos_array.length),this.updateEmbedText2(),o.iOS()&&this.options.autoplay&&this.removeiOSAutoplay(),"HTML5"==i._playlist.videos_array[e].videoType||"HTML5 (self-hosted)"==i.options.videoType){if(i.video.setVolume(i.volPerc),i.element.css("visibility","visible"),i.closeAD(),i.showVideoElements(),i._playlist.videoAdPlayed=!1,i.ytWrapper.css({zIndex:0}),i.ytWrapper.css({visibility:"hidden"}),i.imageWrapper.css({zIndex:0}),i.imageWrapper.css({visibility:"hidden"}),i._playlist.vimeoWrapper.css({zIndex:0}),i.showHTML5elements(),i.resizeAll(),void 0!=i.youtubePlayer&&i._playlist.youtubePLAYING&&(i.youtubePlayer.stopVideo(),i.youtubePlayer.clearVideo()),i.myVideo.canPlayType&&i.myVideo.canPlayType("video/mp4").replace(/no/,"")){switch(this.canPlay=!0,i.selectedHTML5Quality||i.options.HTML5VideoQuality){case"HD":i.video_path=i._playlist.videos_array[e].video_path_mp4HD;break;case"SD":i.video_path=i._playlist.videos_array[e].video_path_mp4SD}i.options.showGlobalPrerollAds?i.video_pathAD=i.globalPrerollAds_arr[i.getGlobalPrerollRandomNumber()]:i.video_pathAD=i._playlist.videos_array[e].preroll_mp4}i.load(i.video_path,e),i.play(),(1==i._playlist.videos_array[e].prerollAD||"yes"==i._playlist.videos_array[e].prerollAD||i.options.showGlobalPrerollAds)&&(i.pause(),i.loadAD(i.video_pathAD),i.openAD()),this.loaded=!1}else if("youtube"==i._playlist.videos_array[e].videoType||"YouTube"==i.options.videoType){if(i.showCustomControls(),void 0!=i.youtubePlayer&&i.youtubePlayer.setVolume(100*i.volPerc),"default controls"==i.options.youtubeControls?i.element.css("visibility","hidden"):"custom controls"==i.options.youtubeControls&&i.element.css("visibility","visible"),i.hideVideoElements(),i.closeAD(),i._playlist.videoAdPlayed=!1,i.preloader.stop().animate({opacity:0},0,function(){t(this).hide()}),i.ytWrapper.css({zIndex:501}),i.ytWrapper.css({visibility:"visible"}),i.imageWrapper.css({zIndex:0}),i.imageWrapper.css({visibility:"hidden"}),i.removeHTML5elements(),i._playlist.vimeoWrapper.css({zIndex:0}),void 0!=i.youtubePlayer){i.youtubePlayer.setSize("100%","100%");var s=parseInt(i._playlist.videos_array[e].youtubeIDStartSeconds);""==s&&(s=0),i.isMobile.any()?i.youtubePlayer.cueVideoById(i._playlist.videos_array[e].youtubeID,s):(i.youtubePlayer.loadVideoById(i._playlist.videos_array[e].youtubeID,s),i.youtubePlayer.playVideo())}var a=i.selectedYoutubeQuality||i.options.youtubeQuality;i.youtubePlayer.setPlaybackQuality(a),i.resizeAll()}else"vimeo"==i._playlist.videos_array[e].videoType||"Vimeo"==i.options.videoType?(i.hideCustomControls(),i.hideVideoElements(),i.closeAD(),i._playlist.videoAdPlayed=!1,i._playlist.vimeoWrapper.css({zIndex:501}),document.getElementById("vimeo_video").src="http://player.vimeo.com/video/"+i._playlist.videos_array[e].vimeoID+"?autoplay=1?api=1&player_id=vimeo_video",i._playlist.vimeoPlayer.unload().then(function(){i._playlist.vimeoPlayer.loadVideo(parseInt(i._playlist.videos_array[e].vimeoID)).then(function(){i.isMobile.any()||i._playlist.vimeoPlayer.play(),i.preloader.stop().animate({opacity:0},200,function(){t(this).hide()})})["catch"](function(t){switch(t.name){case"TypeError":break;case"PasswordError":break;case"PrivacyError":}})}),i.removeHTML5elements(),i.ytWrapper.css({zIndex:0}),i.ytWrapper.css({visibility:"hidden"}),i.imageWrapper.css({zIndex:0}),i.imageWrapper.css({visibility:"hidden"}),void 0!=i.youtubePlayer&&i._playlist.youtubePLAYING&&(i.youtubePlayer.stopVideo(),i.youtubePlayer.clearVideo())):"image"!=i._playlist.videos_array[e].videoType&&"Image"!=i.options.videoType||(i.hideCustomControls(),i.hideVideoElements(),i.closeAD(),i._playlist.videoAdPlayed=!1,i.removeHTML5elements(),i.ytWrapper.css({zIndex:0}),i.ytWrapper.css({visibility:"hidden"}),void 0!=i.youtubePlayer&&i._playlist.youtubePLAYING&&(i.youtubePlayer.stopVideo(),i.youtubePlayer.clearVideo()),i.imageWrapper.css({zIndex:502}),i.imageWrapper.css({visibility:"visible"}),t(i.imageDisplayed).src="#",t(i.imageDisplayed).removeAttr("src"),i.imageDisplayed.src=i._playlist.videos_array[e].imageUrl,t(i.imageDisplayed).on("load",function(){i.preloader.stop().animate({opacity:0},300,function(){t(this).hide()}),i.setImageTimer()}))},u.fn.removeiOSAutoplay=function(){this.videoElement.removeAttr("muted"),this.videoElement.muted=!1,this.video.muted=!1,this.volumeTrackProgress.css({width:this.initialVolumeProgressWidth}),t(this.mainContainer).find(".fa-stellar-volume-off").removeClass("fa-stellar-volume-off").addClass("fa-stellar-volume-up"),this.muted=!1,this.video.setVolume(1),this.iOSVolumeButtonScreen.hide()},u.fn.manageButtonsByVideoType=function(){"HTML5"==this._playlist.videos_array[this._playlist.videoid].videoType||"HTML5 (self-hosted)"==this.options.videoType?1==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download?(this.downloadBtnLink.prependTo(this.controlsBtnsWrapperRight),this.downloadBtnLink.attr("href",this._playlist.videos_array[this._playlist.videoid].video_path_mp4HD)):this.downloadBtnLink.remove():"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=this.options.videoType||void 0!=this.downloadBtnLink&&this.downloadBtnLink.hide()},u.fn.setImageTimer=function(){var t=this;clearTimeout(t.image_timeout),t.image_timeout=setTimeout(function(){t.randEnd=Math.floor(Math.random()*t.options.videos.length),t.shuffleBtnEnabled?t._playlist.videoid=t.randEnd:t._playlist.videoid=parseInt(t._playlist.videoid)+1,t._playlist.videos_array.length==t._playlist.videoid&&(t._playlist.videoid=0),t.setPlaylistItem(t._playlist.videoid),t.playVideoById(t._playlist.videoid)},1e3*t._playlist.videos_array[t._playlist.videoid].imageTimer)},u.fn.setSkipTimer=function(){if(this.options.showGlobalPrerollAds)this.counter=this.options.globalPrerollAdsSkipTimer-Math.round(this.videoAD.getCurrentTime());else{var t=this.video_pathAD||this._playlist.video_pathAD;t==this._playlist.videos_array[this._playlist.videoid].preroll_mp4&&(this.counter=this._playlist.videos_array[this._playlist.videoid].prerollSkipTimer-Math.round(this.videoAD.getCurrentTime())),t==this._playlist.videos_array[this._playlist.videoid].midroll_mp4&&(this.counter=this._playlist.videos_array[this._playlist.videoid].midrollSkipTimer-Math.round(this.videoAD.getCurrentTime())),t==this._playlist.videos_array[this._playlist.videoid].postroll_mp4&&(this.counter=this._playlist.videos_array[this._playlist.videoid].postrollSkipTimer-Math.round(this.videoAD.getCurrentTime()))}},u.fn.showPoster2=function(){this.mainContainer.find(".stellar_vp_overlay img").attr("src",this.options.posterImgOnVideoFinish),this.overlay.show(),this.playButtonPoster.show(),this.playButtonScreen.hide(),this.poster2Showing=!0},u.fn.setOrientation=function(){switch(this.options.playerOrientation){case"RTL":this.mainContainer.find(".stellar_vp_title").addClass("elite_vp_RTL"),this.mainContainer.find(".stellar_vp_description").addClass("elite_vp_RTL"),this.mainContainer.find(".stellar_vp_infoTitle").addClass("elite_vp_RTL"),this.mainContainer.find(".stellar_vp_infoText").addClass("elite_vp_RTL"),this.mainContainer.find(".stellar_vp_nowPlayingText").addClass("elite_vp_RTL"),this.mainContainer.find(".stellar_vp_embedTitle2").addClass("elite_vp_RTL"),this.mainContainer.find(".stellar_vp_embedTitle3").addClass("elite_vp_RTL");break;case"LTL":this.mainContainer.find(".stellar_vp_title").addClass("elite_vp_LTR"),this.mainContainer.find(".stellar_vp_description").addClass("elite_vp_LTR"),this.mainContainer.find(".stellar_vp_infoTitle").addClass("elite_vp_LTR"),this.mainContainer.find(".stellar_vp_infoText").addClass("elite_vp_LTR"),this.mainContainer.find(".stellar_vp_nowPlayingText").addClass("elite_vp_LTR"),this.mainContainer.find(".stellar_vp_embedTitle2").addClass("elite_vp_LTR"),this.mainContainer.find(".stellar_vp_embedTitle3").addClass("elite_vp_LTR")}},u.fn.setupEvents=function(){var e=this;this.onpause(t.proxy(function(){this.element.addClass("vp_paused"),this.element.removeClass("stellar_vp_playing"),this.change("vp_paused")},this)),this.onplay(t.proxy(function(){this.element.removeClass("vp_paused"),this.element.addClass("stellar_vp_playing"),this.change("stellar_vp_playing")},this)),t(e.videoElementAD).bind("ended",function(){e.closeAD(),e._playlist.videoAdPlayed=!0}),t(e.videoElementAD).bind("loadeddata",function(){e.preloader.stop().animate({opacity:0},300,function(){t(this).hide()}),e.preloaderAD.stop().animate({opacity:0},300,function(){t(this).hide()}),e.options.hideVideoSource&&e.videoElementAD.empty(),clearInterval(e.myInterval),e.myInterval=setInterval(function(){e.isPaused&&!e.options.allowSkipAd||(e.setSkipTimer(),t(e.skipAdCountContentLeft).find(".stellar_vp_skipAdCountTitle").text(e.options.skipAdText+" "+e.counter+" s"),0==e.counter&&(e.toggleSkipAdCount(),e.skipBoxOn=!1,e.toggleSkipAdBox(),clearInterval(e.myInterval)))},1e3)}),t(e.videoElementAD).bind("pause",function(){e.isPaused=!0}),t(e.videoElementAD).bind("play",function(){e.isPaused=!1}),t(e.videoElementAD).bind("timeupdate",function(){e.timeLeftInside.text("(-"+e.secondsFormat(e.videoAD.getEndTime()-e.videoAD.getCurrentTime())+")"),e.progressWidthAD=e.videoAD.currentTime/e.videoAD.duration*e.elementAD.width(),e.progressAD.css("width",e.progressWidthAD),e.preloaderAD.stop().animate({opacity:0},300,function(){t(this).hide()})}),this.onended(t.proxy(function(){e.midrollPlayed=!1,e.postrollPlayed=!1,e.randEnd=Math.floor(Math.random()*e.options.videos.length+0),this._playlist.videoid=parseInt(this._playlist.videoid)+1,this._playlist.videos_array.length==this._playlist.videoid&&(this._playlist.videoid=0),e.preloader&&e.preloader.stop().animate({opacity:1},0,function(){t(this).show()}),"Play next video"==e.options.onFinish&&e.toggleAutoplayBtnEnabled?(e._playlist.videoAdPlayed=!1,e.shuffleBtnEnabled?(e.setPlaylistItem(e.randEnd),e._playlist.videoid=e.randEnd):e.setPlaylistItem(e._playlist.videoid),e.playVideoById(e._playlist.videoid),e.shuffleBtnEnabled?e.setPlaylistItem(e.randEnd):e.setPlaylistItem(e._playlist.videoid)):"Restart video"==e.options.onFinish?(this.resetPlayer(),this.seek(0),this.play(),this.preloader.hide()):"Stop video"!=e.options.onFinish&&e.toggleAutoplayBtnEnabled||(this.pause(),this.preloader.hide(),""!=this.options.posterImgOnVideoFinish&&(this.resetPlayer(),this.seek(0),this.pause(),this.showPoster2()))},this)),this.oncanplay(t.proxy(function(){this.canPlay=!0,this.controls.removeClass("stellar_vp_disabled")},this)),this.mainContainer.parent().hover(function(){t(document).keydown(t.proxy(function(t){return 32==t.keyCode?(e.togglePlay(),!1):void 0},this))},function(){t(document).unbind("keydown")})},window.Video=u}(jQuery);