// source --> https://www.mallorca360.es/wp-content/plugins/Stellar-video-player/js/jquery.mCustomScrollbar.min.js?ver=2.1 
!function(e,t,o){!function(t){var a="function"==typeof define&&define.amd,n="https:"==o.location.protocol?"https:":"http:",r="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.11/jquery.mousewheel.min.js";a||e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+r+"%3E%3C/script%3E")),t()}(function(){var a="mCustomScrollbar",n="mCS",r=".mCustomScrollbar",i={setWidth:!1,setHeight:!1,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,autoHideScrollbar:!1,autoExpandScrollbar:!1,alwaysShowScrollbar:0,snapAmount:null,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1,disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{enable:!1,scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoExpandHorizontalScroll:!1,autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,updateOnSelectorChange:!1,releaseDraggableSelectors:!1},theme:"light",callbacks:{onInit:!1,onScrollStart:!1,onScroll:!1,onTotalScroll:!1,onTotalScrollBack:!1,whileScrolling:!1,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0,onOverflowY:!1,onOverflowX:!1,onOverflowYNone:!1,onOverflowXNone:!1},live:!1,liveSelector:null},l=0,s={},c=function(e){s[e]&&(clearTimeout(s[e]),h._delete.call(null,s[e]))},d=t.attachEvent&&!t.addEventListener?1:0,u=!1,f={init:function(t){var t=e.extend(!0,{},i,t),o=h._selector.call(this);if(t.live){var a=t.liveSelector||this.selector||r,d=e(a);if("off"===t.live)return void c(a);s[a]=setTimeout(function(){d.mCustomScrollbar(t),"once"===t.live&&d.length&&c(a)},500)}else c(a);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":h._findAxis.call(null,t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=h._findScrollButtonsType.call(null,t.scrollButtons.scrollType),h._theme.call(null,t),e(o).each(function(){var o=e(this);if(!o.data(n)){o.data(n,{idx:++l,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null});var a=o.data(n).opt,r=o.data("mcs-axis"),i=o.data("mcs-scrollbar-position"),s=o.data("mcs-theme");r&&(a.axis=r),i&&(a.scrollbarPosition=i),s&&(a.theme=s,h._theme.call(null,a)),h._pluginMarkup.call(this),f.update.call(null,o)}})},update:function(t){var o=t||h._selector.call(this);return e(o).each(function(){var t=e(this);if(t.data(n)){var o=t.data(n),a=o.opt,r=e("#mCSB_"+o.idx+"_container"),i=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(!r.length)return;o.tweenRunning&&h._stop.call(null,t),t.hasClass("mCS_disabled")&&t.removeClass("mCS_disabled"),t.hasClass("mCS_destroyed")&&t.removeClass("mCS_destroyed"),h._maxHeight.call(this),h._expandContentHorizontally.call(this),"y"===a.axis||a.advanced.autoExpandHorizontalScroll||r.css("width",h._contentWidth(r.children())),o.overflowed=h._overflowed.call(this),h._scrollbarVisibility.call(this),a.autoDraggerLength&&h._setDraggerLength.call(this),h._scrollRatio.call(this),h._bindEvents.call(this);var l=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==a.axis&&(o.overflowed[0]?i[0].height()>i[0].parent().height()?h._resetContentPosition.call(this):(h._scrollTo.call(this,t,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}),o.contentReset.y=null):(h._resetContentPosition.call(this),"y"===a.axis?h._unbindEvents.call(this):"yx"===a.axis&&o.overflowed[1]&&h._scrollTo.call(this,t,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==a.axis&&(o.overflowed[1]?i[1].width()>i[1].parent().width()?h._resetContentPosition.call(this):(h._scrollTo.call(this,t,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}),o.contentReset.x=null):(h._resetContentPosition.call(this),"x"===a.axis?h._unbindEvents.call(this):"yx"===a.axis&&o.overflowed[0]&&h._scrollTo.call(this,t,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),h._autoUpdate.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var a=h._selector.call(this);return e(a).each(function(){var a=e(this);if(a.data(n)){var r=a.data(n),i=r.opt,l={trigger:"external",scrollInertia:i.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=h._arr.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=h._to.call(this,c[0],"y"),c[1]=h._to.call(this,c[1],"x"),s.moveDragger&&(c[0]*=r.scrollRatio.y,c[1]*=r.scrollRatio.x),s.dur=d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==i.axis&&r.overflowed[0]&&(s.dir="y",s.overwrite="all",h._scrollTo.call(this,a,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==i.axis&&r.overflowed[1]&&(s.dir="x",s.overwrite="none",h._scrollTo.call(this,a,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=h._selector.call(this);return e(t).each(function(){var t=e(this);t.data(n)&&h._stop.call(null,t)})},disable:function(t){var o=h._selector.call(this);return e(o).each(function(){var o=e(this);if(o.data(n)){var a=o.data(n);a.opt;h._autoUpdate.call(this,"remove"),h._unbindEvents.call(this),t&&h._resetContentPosition.call(this),h._scrollbarVisibility.call(this,!0),o.addClass("mCS_disabled")}})},destroy:function(){var t=h._selector.call(this);return e(t).each(function(){var o=e(this);if(o.data(n)){var r=o.data(n),i=r.opt,l=e("#mCSB_"+r.idx),s=e("#mCSB_"+r.idx+"_container"),d=e(".mCSB_"+r.idx+"_scrollbar");i.live&&c(t),h._autoUpdate.call(this,"remove"),h._unbindEvents.call(this),h._resetContentPosition.call(this),o.removeData(n),h._delete.call(null,this.mcs),d.remove(),l.replaceWith(s.contents()),o.removeClass(a+" _"+n+"_"+r.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")}})}},h={_selector:function(){return"object"!=typeof e(this)||e(this).length<1?r:this},_theme:function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],r=["minimal","minimal-dark"],i=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,r)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,i)>-1?"outside":t.scrollbarPosition},_findAxis:function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},_findScrollButtonsType:function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},_pluginMarkup:function(){var t=e(this),o=t.data(n),r=o.opt,i=r.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",l=["<div id='mCSB_"+o.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+i+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+o.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+o.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+i+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+o.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===r.axis?"mCSB_vertical_horizontal":"x"===r.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===r.axis?l[0]+l[1]:"x"===r.axis?l[1]:l[0],d="yx"===r.axis?"<div id='mCSB_"+o.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",u=r.autoHideScrollbar?" mCS-autoHide":"",f="x"!==r.axis&&"rtl"===o.langDir?" mCS-dir-rtl":"";r.setWidth&&t.css("width",r.setWidth),r.setHeight&&t.css("height",r.setHeight),r.setLeft="y"!==r.axis&&"rtl"===o.langDir?"989999px":r.setLeft,t.addClass(a+" _"+n+"_"+o.idx+u+f).wrapInner("<div id='mCSB_"+o.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+s+"'><div id='mCSB_"+o.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir="+o.langDir+" /></div>");var _=e("#mCSB_"+o.idx),m=e("#mCSB_"+o.idx+"_container");"y"===r.axis||r.advanced.autoExpandHorizontalScroll||m.css("width",h._contentWidth(m.children())),"outside"===r.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),_.addClass("mCSB_outside").after(c)):(_.addClass("mCSB_inside").append(c),m.wrap(d)),h._scrollButtons.call(this);var p=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];p[0].css("min-height",p[0].height()),p[1].css("min-width",p[1].width())},_contentWidth:function(t){return Math.max.apply(Math,t.map(function(){return e(this).outerWidth(!0)}).get())},_expandContentHorizontally:function(){var t=e(this),o=t.data(n),a=o.opt,r=e("#mCSB_"+o.idx+"_container");a.advanced.autoExpandHorizontalScroll&&"y"!==a.axis&&r.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(r[0].getBoundingClientRect().right+.4)-Math.floor(r[0].getBoundingClientRect().left),position:"relative"}).unwrap()},_scrollButtons:function(){var t=e(this),o=t.data(n),a=o.opt,r=e(".mCSB_"+o.idx+"_scrollbar:first"),i=["<a href='#' class='mCSB_buttonUp' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonDown' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonLeft' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonRight' oncontextmenu='return false;' />"],l=["x"===a.axis?i[2]:i[0],"x"===a.axis?i[3]:i[1],i[2],i[3]];a.scrollButtons.enable&&r.prepend(l[0]).append(l[1]).next(".mCSB_scrollTools").prepend(l[2]).append(l[3])},_maxHeight:function(){var t=e(this),o=t.data(n),a=(o.opt,e("#mCSB_"+o.idx)),r=t.css("max-height"),i=-1!==r.indexOf("%"),l=t.css("box-sizing");if("none"!==r){var s=i?t.parent().height()*parseInt(r)/100:parseInt(r);"border-box"===l&&(s-=t.innerHeight()-t.height()+(t.outerHeight()-t.innerHeight())),a.css("max-height",Math.round(s))}},_setDraggerLength:function(){var t=e(this),o=t.data(n),a=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),i=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[a.height()/r.outerHeight(!1),a.width()/r.outerWidth(!1)],s=[parseInt(i[0].css("min-height")),Math.round(l[0]*i[0].parent().height()),parseInt(i[1].css("min-width")),Math.round(l[1]*i[1].parent().width())],c=d&&s[1]<s[0]?s[0]:s[1],u=d&&s[3]<s[2]?s[2]:s[3];i[0].css({height:c,"max-height":i[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":s[0]+"px"}),i[1].css({width:u,"max-width":i[1].parent().width()-10})},_scrollRatio:function(){var t=e(this),o=t.data(n),a=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),i=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[r.outerHeight(!1)-a.height(),r.outerWidth(!1)-a.width()],s=[l[0]/(i[0].parent().height()-i[0].height()),l[1]/(i[1].parent().width()-i[1].width())];o.scrollRatio={y:s[0],x:s[1]}},_onDragClasses:function(e,t,o){var a=o?"mCSB_dragger_onDrag_expanded":"",n=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag"],r=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(n[0]+" "+a),r.toggleClass(n[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(n[0]),r.removeClass(n[1])):(e.addClass(n[0]),r.addClass(n[1])))},_overflowed:function(){var t=e(this),o=t.data(n),a=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),i=null==o.overflowed?r.height():r.outerHeight(!1),l=null==o.overflowed?r.width():r.outerWidth(!1);return[i>a.height(),l>a.width()]},_resetContentPosition:function(){var t=e(this),o=t.data(n),a=o.opt,r=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(h._stop(t),("x"!==a.axis&&!o.overflowed[0]||"y"===a.axis&&o.overflowed[0])&&(l[0].add(i).css("top",0),h._scrollTo(t,"_resetY")),"y"!==a.axis&&!o.overflowed[1]||"x"===a.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=r.width()-i.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),i.css("left",s),l[1].css("left",dx),h._scrollTo(t,"_resetX")}},_bindEvents:function(){function t(){i=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(i),h._mousewheel.call(o[0])):t()},1e3)}var o=e(this),a=o.data(n),r=a.opt;if(!a.bindEvents){if(h._draggable.call(this),r.contentTouchScroll&&h._contentDraggable.call(this),r.mouseWheel.enable){var i;t()}h._draggerRail.call(this),h._wrapperScroll.call(this),r.advanced.autoScrollOnFocus&&h._focus.call(this),r.scrollButtons.enable&&h._buttons.call(this),r.keyboard.enable&&h._keyboard.call(this),a.bindEvents=!0}},_unbindEvents:function(){var t=e(this),a=t.data(n),r=a.opt,i=n+"_"+a.idx,l=".mCSB_"+a.idx+"_scrollbar",s=e("#mCSB_"+a.idx+",#mCSB_"+a.idx+"_container,#mCSB_"+a.idx+"_container_wrapper,"+l+" .mCSB_draggerContainer,#mCSB_"+a.idx+"_dragger_vertical,#mCSB_"+a.idx+"_dragger_horizontal,"+l+">a"),c=e("#mCSB_"+a.idx+"_container");r.advanced.releaseDraggableSelectors&&s.add(e(r.advanced.releaseDraggableSelectors)),a.bindEvents&&(e(o).unbind("."+i),s.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),h._delete.call(null,t[0]._focusTimeout),clearTimeout(a.sequential.step),h._delete.call(null,a.sequential.step),clearTimeout(c[0].onCompleteTimeout),h._delete.call(null,c[0].onCompleteTimeout),a.bindEvents=!1)},_scrollbarVisibility:function(t){var o=e(this),a=o.data(n),r=a.opt,i=e("#mCSB_"+a.idx+"_container_wrapper"),l=i.length?i:e("#mCSB_"+a.idx+"_container"),s=[e("#mCSB_"+a.idx+"_scrollbar_vertical"),e("#mCSB_"+a.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==r.axis&&(a.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass("mCS_no_scrollbar_y mCS_y_hidden")):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&c[0].add(s[0].children("a")).css("display","none"),l.removeClass("mCS_y_hidden")):(s[0].css("display","none"),l.addClass("mCS_y_hidden")),l.addClass("mCS_no_scrollbar_y"))),"y"!==r.axis&&(a.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass("mCS_no_scrollbar_x mCS_x_hidden")):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&c[1].add(s[1].children("a")).css("display","none"),l.removeClass("mCS_x_hidden")):(s[1].css("display","none"),l.addClass("mCS_x_hidden")),l.addClass("mCS_no_scrollbar_x"))),a.overflowed[0]||a.overflowed[1]?o.removeClass("mCS_no_scrollbar"):o.addClass("mCS_no_scrollbar")},_coordinates:function(e){var t=e.type;switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return[o.pageY,o.pageX,a>1];default:return[e.pageY,e.pageX,!1]}},_draggable:function(){function t(e){var t=p.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}}function a(e,t,o,a){if(p[0].idleTimer=f.scrollInertia<233?250:0,r.attr("id")===m[1])var n="x",i=(r[0].offsetLeft-t+a)*c.scrollRatio.x;else var n="y",i=(r[0].offsetTop-e+o)*c.scrollRatio.y;h._scrollTo(s,i.toString(),{dir:n,drag:!0})}var r,i,l,s=e(this),c=s.data(n),f=c.opt,_=n+"_"+c.idx,m=["mCSB_"+c.idx+"_dragger_vertical","mCSB_"+c.idx+"_dragger_horizontal"],p=e("#mCSB_"+c.idx+"_container"),g=e("#"+m[0]+",#"+m[1]),v=f.advanced.releaseDraggableSelectors?g.add(e(f.advanced.releaseDraggableSelectors)):g;g.bind("mousedown."+_+" touchstart."+_+" pointerdown."+_+" MSPointerDown."+_,function(n){if(n.stopImmediatePropagation(),n.preventDefault(),h._mouseBtnLeft(n)){u=!0,d&&(o.onselectstart=function(){return!1}),t(!1),h._stop(s),r=e(this);var c=r.offset(),m=h._coordinates(n)[0]-c.top,p=h._coordinates(n)[1]-c.left,g=r.height()+c.top,x=r.width()+c.left;g>m&&m>0&&x>p&&p>0&&(i=m,l=p),h._onDragClasses(r,"active",f.autoExpandScrollbar),e(o).bind("mousemove."+_+" pointermove."+_+" MSPointerMove."+_,function(e){if(r){var t=r.offset(),o=h._coordinates(e)[0]-t.top,n=h._coordinates(e)[1]-t.left;if(i===o)return;a(i,l,o,n)}}).add(v).bind("mouseup."+_+" touchend."+_+" pointerup."+_+" MSPointerUp."+_,function(){r&&(h._onDragClasses(r,"active",f.autoExpandScrollbar),r=null),u=!1,d&&(o.onselectstart=null),t(!0)})}}).bind("touchmove."+_,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=r.offset(),o=h._coordinates(e)[0]-t.top,n=h._coordinates(e)[1]-t.left;a(i,l,o,n)}).bind("mousemove."+_,function(e){if(r){var t=r.offset(),o=h._coordinates(e)[0]-t.top,n=h._coordinates(e)[1]-t.left;if(i===o)return;a(i,l,o,n)}}),e(o).bind("mousemove."+_+" pointermove."+_+" MSPointerMove."+_,function(e){if(r){var t=r.offset(),o=h._coordinates(e)[0]-t.top,n=h._coordinates(e)[1]-t.left;if(i===o)return;a(i,l,o,n)}}).add(v).bind("mouseup."+_+" touchend."+_+" pointerup."+_+" MSPointerUp."+_,function(){r&&(h._onDragClasses(r,"active",f.autoExpandScrollbar),r=null),u=!1,d&&(o.onselectstart=null),t(!0)})},_contentDraggable:function(){function t(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function o(e,t,o,a,n,r){e&&h._scrollTo(g,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:r})}var a,r,i,l,s,c,d,f,_,m,p,g=e(this),v=g.data(n),x=v.opt,S=n+"_"+v.idx,b=e("#mCSB_"+v.idx),C=e("#mCSB_"+v.idx+"_container"),w=[e("#mCSB_"+v.idx+"_dragger_vertical"),e("#mCSB_"+v.idx+"_dragger_horizontal")],y=[],B=[],T=0,M="yx"===x.axis?"none":"all",k=[];C.bind("touchstart."+S+" pointerdown."+S+" MSPointerDown."+S,function(e){if(h._pointerTouch(e)&&!u&&!h._coordinates(e)[2]){var t=C.offset();a=h._coordinates(e)[0]-t.top,r=h._coordinates(e)[1]-t.left,k=[h._coordinates(e)[0],h._coordinates(e)[1]]}}).bind("touchmove."+S+" pointermove."+S+" MSPointerMove."+S,function(e){if(h._pointerTouch(e)&&!u&&!h._coordinates(e)[2]){e.stopImmediatePropagation(),c=h._getTime();var t=b.offset(),n=h._coordinates(e)[0]-t.top,i=h._coordinates(e)[1]-t.left,l="mcsLinearOut";if(y.push(n),B.push(i),k[2]=Math.abs(h._coordinates(e)[0]-k[0]),k[3]=Math.abs(h._coordinates(e)[1]-k[1]),v.overflowed[0])var s=w[0].parent().height()-w[0].height(),d=a-n>0&&n-a>-(s*v.scrollRatio.y)&&(2*k[3]<k[2]||"yx"===x.axis);if(v.overflowed[1])var f=w[1].parent().width()-w[1].width(),_=r-i>0&&i-r>-(f*v.scrollRatio.x)&&(2*k[2]<k[3]||"yx"===x.axis);(d||_)&&e.preventDefault(),m="yx"===x.axis?[a-n,r-i]:"x"===x.axis?[null,r-i]:[a-n,null],C[0].idleTimer=250,v.overflowed[0]&&o(m[0],T,l,"y","all",!0),v.overflowed[1]&&o(m[1],T,l,"x",M,!0)}}),b.bind("touchstart."+S+" pointerdown."+S+" MSPointerDown."+S,function(e){if(h._pointerTouch(e)&&!u&&!h._coordinates(e)[2]){e.stopImmediatePropagation(),h._stop(g),s=h._getTime();var t=b.offset();i=h._coordinates(e)[0]-t.top,l=h._coordinates(e)[1]-t.left,y=[],B=[]}}).bind("touchend."+S+" pointerup."+S+" MSPointerUp."+S,function(e){if(h._pointerTouch(e)&&!u&&!h._coordinates(e)[2]){e.stopImmediatePropagation(),d=h._getTime();var a=b.offset(),n=h._coordinates(e)[0]-a.top,r=h._coordinates(e)[1]-a.left;if(!(d-c>30)){_=1e3/(d-s);var g="mcsEaseOut",S=2.5>_,w=S?[y[y.length-2],B[B.length-2]]:[0,0];f=S?[n-w[0],r-w[1]]:[n-i,r-l];var T=[Math.abs(f[0]),Math.abs(f[1])];_=S?[Math.abs(f[0]/4),Math.abs(f[1]/4)]:[_,_];var k=[Math.abs(C[0].offsetTop)-f[0]*t(T[0]/_[0],_[0]),Math.abs(C[0].offsetLeft)-f[1]*t(T[1]/_[1],_[1])];m="yx"===x.axis?[k[0],k[1]]:"x"===x.axis?[null,k[1]]:[k[0],null],p=[4*T[0]+x.scrollInertia,4*T[1]+x.scrollInertia];var O=parseInt(x.contentTouchScroll)||0;m[0]=T[0]>O?m[0]:0,m[1]=T[1]>O?m[1]:0,v.overflowed[0]&&o(m[0],p[0],g,"y",M,!1),v.overflowed[1]&&o(m[1],p[1],g,"x",M,!1)}}})},_mousewheel:function(){function t(e){var t=null;try{var o=e.contentDocument||e.contentWindow.document;t=o.body.innerHTML}catch(a){}return null!==t}var o=e(this),a=o.data(n);if(a){var r=a.opt,i=n+"_"+a.idx,l=e("#mCSB_"+a.idx),s=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],c=e("#mCSB_"+a.idx+"_container").find("iframe"),u=l;c.length&&c.each(function(){var o=this;t(o)&&(u=u.add(e(o).contents().find("body")))}),u.bind("mousewheel."+i,function(t,n){if(h._stop(o),!h._disableMousewheel(o,t.target)){var i="auto"!==r.mouseWheel.deltaFactor?parseInt(r.mouseWheel.deltaFactor):d&&t.deltaFactor<100?100:t.deltaFactor||100;if("x"===r.axis||"x"===r.mouseWheel.axis)var c="x",u=[Math.round(i*a.scrollRatio.x),parseInt(r.mouseWheel.scrollAmount)],f="auto"!==r.mouseWheel.scrollAmount?u[1]:u[0]>=l.width()?.9*l.width():u[0],_=Math.abs(e("#mCSB_"+a.idx+"_container")[0].offsetLeft),m=s[1][0].offsetLeft,p=s[1].parent().width()-s[1].width(),g=t.deltaX||t.deltaY||n;else var c="y",u=[Math.round(i*a.scrollRatio.y),parseInt(r.mouseWheel.scrollAmount)],f="auto"!==r.mouseWheel.scrollAmount?u[1]:u[0]>=l.height()?.9*l.height():u[0],_=Math.abs(e("#mCSB_"+a.idx+"_container")[0].offsetTop),m=s[0][0].offsetTop,p=s[0].parent().height()-s[0].height(),g=t.deltaY||n;"y"===c&&!a.overflowed[0]||"x"===c&&!a.overflowed[1]||(r.mouseWheel.invert&&(g=-g),r.mouseWheel.normalizeDelta&&(g=0>g?-1:1),(g>0&&0!==m||0>g&&m!==p||r.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),h._scrollTo(o,(_-g*f).toString(),{dir:c}))}})}},_disableMousewheel:function(t,o){var a=o.nodeName.toLowerCase(),r=t.data(n).opt.mouseWheel.disableOver,i=["select","textarea"];return e.inArray(a,r)>-1&&!(e.inArray(a,i)>-1&&!e(o).is(":focus"))},_draggerRail:function(){var t=e(this),o=t.data(n),a=n+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),i=r.parent(),l=e(".mCSB_"+o.idx+"_scrollbar .mCSB_draggerContainer");l.bind("touchstart."+a+" pointerdown."+a+" MSPointerDown."+a,function(){u=!0}).bind("touchend."+a+" pointerup."+a+" MSPointerUp."+a,function(){u=!1}).bind("click."+a,function(a){if(e(a.target).hasClass("mCSB_draggerContainer")||e(a.target).hasClass("mCSB_draggerRail")){h._stop(t);var n=e(this),l=n.find(".mCSB_dragger");if(n.parent(".mCSB_scrollTools_horizontal").length>0){if(!o.overflowed[1])return;var s="x",c=a.pageX>l.offset().left?-1:1,d=Math.abs(r[0].offsetLeft)-c*(.9*i.width())}else{if(!o.overflowed[0])return;var s="y",c=a.pageY>l.offset().top?-1:1,d=Math.abs(r[0].offsetTop)-c*(.9*i.height())}h._scrollTo(t,d.toString(),{dir:s,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var t=e(this),a=t.data(n),r=a.opt,i=n+"_"+a.idx,l=e("#mCSB_"+a.idx+"_container"),s=l.parent();l.bind("focusin."+i,function(){var a=e(o.activeElement),n=l.find(".mCustomScrollBox").length,i=0;a.is(r.advanced.autoScrollOnFocus)&&(h._stop(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=n?(i+17)*n:0,t[0]._focusTimeout=setTimeout(function(){var e=[a.offset().top-l.offset().top,a.offset().left-l.offset().left],o=[l[0].offsetTop,l[0].offsetLeft],n=[o[0]+e[0]>=0&&o[0]+e[0]<s.height()-a.outerHeight(!1),o[1]+e[1]>=0&&o[0]+e[1]<s.width()-a.outerWidth(!1)],c="yx"!==r.axis||n[0]||n[1]?"all":"none";"x"===r.axis||n[0]||h._scrollTo(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===r.axis||n[1]||h._scrollTo(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},_wrapperScroll:function(){var t=e(this),o=t.data(n),a=n+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container").parent();r.bind("scroll."+a,function(){0===r.scrollTop()&&0===r.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},_buttons:function(){var t=e(this),o=t.data(n),a=o.opt,r=o.sequential,i=n+"_"+o.idx,l=(e("#mCSB_"+o.idx+"_container"),".mCSB_"+o.idx+"_scrollbar"),s=e(l+">a");s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i+" mouseup."+i+" touchend."+i+" pointerup."+i+" MSPointerUp."+i+" mouseout."+i+" pointerout."+i+" MSPointerOut."+i+" click."+i,function(n){function i(e,o){r.scrollAmount=a.snapAmount||a.scrollButtons.scrollAmount,h._sequentialScroll.call(this,t,e,o)}if(n.preventDefault(),h._mouseBtnLeft(n)){var l=e(this).attr("class");switch(r.type=a.scrollButtons.scrollType,n.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===r.type)return;u=!0,o.tweenRunning=!1,i("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===r.type)return;u=!1,r.dir&&i("off",l);break;case"click":if("stepped"!==r.type||o.tweenRunning)return;i("on",l)}}})},_keyboard:function(){var t=e(this),a=t.data(n),r=a.opt,i=a.sequential,l=n+"_"+a.idx,s=e("#mCSB_"+a.idx),c=e("#mCSB_"+a.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']";s.attr("tabindex","0").bind("blur."+l+" keydown."+l+" keyup."+l,function(n){function l(e,o){i.type=r.keyboard.scrollType,i.scrollAmount=r.snapAmount||r.keyboard.scrollAmount,"stepped"===i.type&&a.tweenRunning||h._sequentialScroll.call(this,t,e,o)}switch(n.type){case"blur":a.tweenRunning&&i.dir&&l("off",null);break;case"keydown":case"keyup":var s=n.keyCode?n.keyCode:n.which,f="on";if("x"!==r.axis&&(38===s||40===s)||"y"!==r.axis&&(37===s||39===s)){if((38===s||40===s)&&!a.overflowed[0]||(37===s||39===s)&&!a.overflowed[1])return;"keyup"===n.type&&(f="off"),e(o.activeElement).is(u)||(n.preventDefault(),n.stopImmediatePropagation(),l(f,s))}else if(33===s||34===s){if((a.overflowed[0]||a.overflowed[1])&&(n.preventDefault(),n.stopImmediatePropagation()),"keyup"===n.type){h._stop(t);var _=34===s?-1:1;if("x"===r.axis||"yx"===r.axis&&a.overflowed[1]&&!a.overflowed[0])var m="x",p=Math.abs(c[0].offsetLeft)-_*(.9*d.width());else var m="y",p=Math.abs(c[0].offsetTop)-_*(.9*d.height());h._scrollTo(t,p.toString(),{dir:m,scrollEasing:"mcsEaseInOut"})}}else if((35===s||36===s)&&!e(o.activeElement).is(u)&&((a.overflowed[0]||a.overflowed[1])&&(n.preventDefault(),n.stopImmediatePropagation()),"keyup"===n.type)){if("x"===r.axis||"yx"===r.axis&&a.overflowed[1]&&!a.overflowed[0])var m="x",p=35===s?Math.abs(d.width()-c.outerWidth(!1)):0;else var m="y",p=35===s?Math.abs(d.height()-c.outerHeight(!1)):0;h._scrollTo(t,p.toString(),{dir:m,scrollEasing:"mcsEaseInOut"})}}})},_sequentialScroll:function(t,o,a){function r(e){var o="stepped"!==c.type,a=e?o?s.scrollInertia/1.5:s.scrollInertia:1e3/60,n=e?o?7.5:40:2.5,i=[Math.abs(d[0].offsetTop),Math.abs(d[0].offsetLeft)],u=[l.scrollRatio.y>10?10:l.scrollRatio.y,l.scrollRatio.x>10?10:l.scrollRatio.x],f="x"===c.dir[0]?i[1]+c.dir[1]*(u[1]*n):i[0]+c.dir[1]*(u[0]*n),_="x"===c.dir[0]?i[1]+c.dir[1]*parseInt(c.scrollAmount):i[0]+c.dir[1]*parseInt(c.scrollAmount),m="auto"!==c.scrollAmount?_:f,p=e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",g=!!e;return e&&17>a&&(m="x"===c.dir[0]?i[1]:i[0]),h._scrollTo(t,m.toString(),{dir:c.dir[0],scrollEasing:p,dur:a,onComplete:g}),e?void(c.dir=!1):(clearTimeout(c.step),void(c.step=setTimeout(function(){r()},a)))}function i(){clearTimeout(c.step),h._stop(t)}var l=t.data(n),s=l.opt,c=l.sequential,d=e("#mCSB_"+l.idx+"_container"),u="stepped"===c.type;switch(o){case"on":if(c.dir=["mCSB_buttonRight"===a||"mCSB_buttonLeft"===a||39===a||37===a?"x":"y","mCSB_buttonUp"===a||"mCSB_buttonLeft"===a||38===a||37===a?-1:1],h._stop(t),h._isNumeric(a)&&"stepped"===c.type)return;r(u);break;case"off":i(),(u||l.tweenRunning&&c.dir)&&r(!0)}},_arr:function(t){var o=e(this).data(n).opt,a=[];return"function"==typeof t&&(t=t()),t instanceof Array?a=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(a[0]=t.y?t.y:t.x||"x"===o.axis?null:t,a[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof a[0]&&(a[0]=a[0]()),"function"==typeof a[1]&&(a[1]=a[1]()),a},_to:function(t,o){if(null!=t&&"undefined"!=typeof t){var a=e(this),r=a.data(n),i=r.opt,l=e("#mCSB_"+r.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===i.axis?"x":"y");var d="x"===o?l.outerWidth(!1):l.outerHeight(!1),u="x"===o?l.offset().left:l.offset().top,_="x"===o?l[0].offsetLeft:l[0].offsetTop,m="x"===o?"left":"top";switch(c){case"function":return t();case"object":if(t.nodeType)var p="x"===o?e(t).offset().left:e(t).offset().top;else if(t.jquery){if(!t.length)return;var p="x"===o?t.offset().left:t.offset().top}return p-u;case"string":case"number":if(h._isNumeric.call(null,t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(_-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var g=_+parseInt(t.split("+=")[1]);return g>=0?0:Math.abs(g)}if(-1!==t.indexOf("px")&&h._isNumeric.call(null,t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var v=l.find(":"+t),p="x"===o?e(v).offset().left:e(v).offset().top;return p-u}if(e(t).length){var p="x"===o?e(t).offset().left:e(t).offset().top;return p-u}return l.css(m,t),void f.update.call(null,a[0])}}},_autoUpdate:function(t){function o(){clearTimeout(u[0].autoUpdate),u[0].autoUpdate=setTimeout(function(){return d.advanced.updateOnSelectorChange&&(_=i(),_!==S)?(l(),void(S=_)):(d.advanced.updateOnContentResize&&(m=[u.outerHeight(!1),u.outerWidth(!1),g.height(),g.width(),x()[0],x()[1]],m[0]===b[0]&&m[1]===b[1]&&m[2]===b[2]&&m[3]===b[3]&&m[4]===b[4]&&m[5]===b[5]||(l(),b=m)),d.advanced.updateOnImageLoad&&(p=a(),p!==C&&(u.find("img").each(function(){r(this.src)}),C=p)),void((d.advanced.updateOnSelectorChange||d.advanced.updateOnContentResize||d.advanced.updateOnImageLoad)&&o()))},60)}function a(){var e=0;return d.advanced.updateOnImageLoad&&(e=u.find("img").length),e}function r(e){function t(e,t){return function(){return t.apply(e,arguments)}}function o(){this.onload=null,l()}var a=new Image;a.onload=t(a,o),a.src=e}function i(){d.advanced.updateOnSelectorChange===!0&&(d.advanced.updateOnSelectorChange="*");var t=0,o=u.find(d.advanced.updateOnSelectorChange);return d.advanced.updateOnSelectorChange&&o.length>0&&o.each(function(){t+=e(this).height()+e(this).width()}),t}function l(){clearTimeout(u[0].autoUpdate),f.update.call(null,s[0])}var s=e(this),c=s.data(n),d=c.opt,u=e("#mCSB_"+c.idx+"_container");if(t)return clearTimeout(u[0].autoUpdate),void h._delete.call(null,u[0].autoUpdate);var _,m,p,g=u.parent(),v=[e("#mCSB_"+c.idx+"_scrollbar_vertical"),e("#mCSB_"+c.idx+"_scrollbar_horizontal")],x=function(){return[v[0].is(":visible")?v[0].outerHeight(!0):0,v[1].is(":visible")?v[1].outerWidth(!0):0]},S=i(),b=[u.outerHeight(!1),u.outerWidth(!1),g.height(),g.width(),x()[0],x()[1]],C=a();o()},_snapAmount:function(e,t,o){return Math.round(e/t)*t-o},_stop:function(t){var o=t.data(n),a=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");a.each(function(){h._stopTween.call(this)})},_scrollTo:function(t,o,a){function r(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function i(){return[c.callbacks.alwaysTriggerOffsets||S>=b[0]+w,c.callbacks.alwaysTriggerOffsets||-y>=S];
}function l(){var e=[_[0].offsetTop,_[0].offsetLeft],o=[v[0].offsetTop,v[0].offsetLeft],n=[_.outerHeight(!1),_.outerWidth(!1)],r=[f.height(),f.width()];t[0].mcs={content:_,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(n[0])-r[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(n[1])-r[1])),direction:a.dir}}var s=t.data(n),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},a=e.extend(d,a),u=[a.dur,a.drag?0:a.dur],f=e("#mCSB_"+s.idx),_=e("#mCSB_"+s.idx+"_container"),m=_.parent(),p=c.callbacks.onTotalScrollOffset?h._arr.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?h._arr.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=a.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(r("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(r("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){switch(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(r("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(r("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount&&(o=h._snapAmount(o,c.snapAmount,c.snapOffset)),a.dir){case"x":var v=e("#mCSB_"+s.idx+"_dragger_horizontal"),x="left",S=_[0].offsetLeft,b=[f.width()-_.outerWidth(!1),v.parent().width()-v.width()],C=[o,0===o?0:o/s.scrollRatio.x],w=p[1],y=g[1],B=w>0?w/s.scrollRatio.x:0,T=y>0?y/s.scrollRatio.x:0;break;case"y":var v=e("#mCSB_"+s.idx+"_dragger_vertical"),x="top",S=_[0].offsetTop,b=[f.height()-_.outerHeight(!1),v.parent().height()-v.height()],C=[o,0===o?0:o/s.scrollRatio.y],w=p[0],y=g[0],B=w>0?w/s.scrollRatio.y:0,T=y>0?y/s.scrollRatio.y:0}C[1]<0||0===C[0]&&0===C[1]?C=[0,0]:C[1]>=b[1]?C=[b[0],b[1]]:C[0]=-C[0],t[0].mcs||(l(),r("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(_[0].onCompleteTimeout),!s.tweenRunning&&(0===S&&C[0]>=0||S===b[0]&&C[0]<=b[0])||(h._tweenTo.call(null,v[0],x,Math.round(C[1]),u[1],a.scrollEasing),h._tweenTo.call(null,_[0],x,Math.round(C[0]),u[0],a.scrollEasing,a.overwrite,{onStart:function(){a.callbacks&&a.onStart&&!s.tweenRunning&&(r("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,h._onDragClasses(v),s.cbOffsets=i())},onUpdate:function(){a.callbacks&&a.onUpdate&&r("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(a.callbacks&&a.onComplete){"yx"===c.axis&&clearTimeout(_[0].onCompleteTimeout);var e=_[0].idleTimer||0;_[0].onCompleteTimeout=setTimeout(function(){r("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),r("onTotalScroll")&&C[1]>=b[1]-B&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),r("onTotalScrollBack")&&C[1]<=T&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,_[0].idleTimer=0,h._onDragClasses(v,"hide")},e)}}}))}},_tweenTo:function(e,o,a,n,r,i,l){function s(){w.stop||(S||p.call(),S=h._getTime()-x,c(),S>=w.time&&(w.time=S>w.time?S+_-(S-w.time):S+_-1,w.time<S+1&&(w.time=S+1)),w.time<n?w.id=m(s):v.call())}function c(){n>0?(w.currVal=f(w.time,b,y,n,r),C[o]=Math.round(w.currVal)+"px"):C[o]=a+"px",g.call()}function d(){_=1e3/60,w.time=S+_,m=t.requestAnimationFrame?t.requestAnimationFrame:function(e){return c(),setTimeout(e,.01)},w.id=m(s)}function u(){null!=w.id&&(t.requestAnimationFrame?t.cancelAnimationFrame(w.id):clearTimeout(w.id),w.id=null)}function f(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var r=(e/=a)*e,i=r*e;return t+o*(.499999999999997*i*r+-2.5*r*r+5.5*i+-6.5*r+4*e)}}e._malihuTween||(e._malihuTween={top:{},left:{}});var _,m,l=l||{},p=l.onStart||function(){},g=l.onUpdate||function(){},v=l.onComplete||function(){},x=h._getTime(),S=0,b=e.offsetTop,C=e.style,w=e._malihuTween[o];"left"===o&&(b=e.offsetLeft);var y=a-b;w.stop=0,"none"!==i&&u(),d()},_getTime:function(){return t.performance&&t.performance.now?t.performance.now():t.performance&&t.performance.webkitNow?t.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},_stopTween:function(){var e=this;e._malihuTween||(e._malihuTween={top:{},left:{}}),e._malihuTween.top.id&&(t.requestAnimationFrame?t.cancelAnimationFrame(e._malihuTween.top.id):clearTimeout(e._malihuTween.top.id),e._malihuTween.top.id=null,e._malihuTween.top.stop=1),e._malihuTween.left.id&&(t.requestAnimationFrame?t.cancelAnimationFrame(e._malihuTween.left.id):clearTimeout(e._malihuTween.left.id),e._malihuTween.left.id=null,e._malihuTween.left.stop=1)},_delete:function(e){try{delete e}catch(t){e=null}},_mouseBtnLeft:function(e){return!(e.which&&1!==e.which)},_pointerTouch:function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},_isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}};e.fn[a]=function(t){return f[t]?f[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):f.init.apply(this,arguments)},e[a]=function(t){return f[t]?f[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):f.init.apply(this,arguments)},e[a].defaults=i,t[a]=!0,e(t).on("load",function(){e(r)[a]()})})}(jQuery,window,document);
// source --> https://www.mallorca360.es/wp-content/plugins/Stellar-video-player/js/Playlist.min.js?ver=2.1 
var PLAYER=PLAYER||{};PLAYER.Playlist=function(e,t,i,a,s,l,o,r,d,n,p,y,v,h,m,c){function _(){}function u(){E.videoAdPlayed=!1,E.randEnd=Math.floor(Math.random()*i.videos.length+0),"Right playlist"==i.playlist||"Bottom playlist"==i.playlist||"Off"==i.playlist?(E.videoid=parseInt(E.videoid)+1,E.videos_array.length==E.videoid&&(E.videoid=0),"Play next video"==i.onFinish&&E.toggleAutoplayBtnEnabled?(E.VIDEO.shuffleBtnEnabled?(E.VIDEO.setPlaylistItem(E.randEnd),E.videoid=E.randEnd):E.VIDEO.setPlaylistItem(E.videoid),E.VIDEO.playVideoById(E.videoid)):"Restart video"==i.onFinish?E.vimeoPlayer.play():"Stop video"==i.onFinish&&""!=i.posterImgOnVideoFinish&&E.VIDEO.showPoster2()):"Restart video"==i.onFinish?E.vimeoPlayer.play():"Stop video"==i.onFinish}function I(e){E.vimeo_time=Math.floor(e.seconds),E.vimeo_duration=Math.floor(e.duration),0!=E.vimeo_time||1!=E.videos_array[E.videoid].prerollAD&&"yes"!=E.videos_array[E.videoid].prerollAD||(E.VIDEO.videoAdStarted=!0,E.videoAdPlayed?E.vimeoPlayer.play():(E.vimeoPlayer.pause(),r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,"")&&(this.canPlay=!0,E.video_pathAD=E.videos_array[E.videoid].preroll_mp4),E.VIDEO.loadAD(E.video_pathAD,"prerollActive"),E.VIDEO.openAD())),E.tim=setInterval(function(){if("HTML5"!=i.videos[E.videoid].videoType&&"HTML5 (self-hosted)"!=i.videoType){if(E.VIDEO.secondsFormat(E.vimeo_time)==E.videos_array[E.videoid].midrollAD_displayTime){if(E.VIDEO.midrollPlayed)return;E.VIDEO.midrollPlayed=!0,1!=E.videos_array[E.videoid].midrollAD&&"yes"!=E.videos_array[E.videoid].midrollAD||(r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,"")&&(E.canPlay=!0,E.video_pathAD=E.videos_array[E.videoid].midroll_mp4),E.vimeoPlayer.pause(),E.VIDEO.loadAD(E.video_pathAD,"midrollActive"),E.VIDEO.openAD())}if(E.VIDEO.secondsFormat(E.vimeo_time)>=E.VIDEO.secondsFormat(E.vimeo_duration-1)&&E.vimeo_duration>0){if(E.VIDEO.postrollPlayed)return;E.VIDEO.postrollPlayed=!0,1!=E.videos_array[E.videoid].postrollAD&&"yes"!=E.videos_array[E.videoid].postrollAD||(r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,"")&&(E.canPlay=!0,E.video_pathAD=E.videos_array[E.videoid].postroll_mp4),E.vimeoPlayer.pause(),E.VIDEO.loadAD(E.video_pathAD,"postrollActive"),E.VIDEO.openAD())}}},50),E.videos_array[E.videoid].popupAdShow&&E.VIDEO.enablePopup()}function D(){E.vimeoPlayer||(E.preloader&&E.preloader.stop().animate({opacity:1},0,function(){e(this).show()}),e(E.vimeoWrapper).html('<iframe id="'+E.options.instanceName+'" src="https://player.vimeo.com/video/'+E.videos_array[E.videoid].vimeoID+"?player_id="+E.options.instanceName+'&autoplay=0" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>').hide(),E.vimeoIframe=e(E.vimeoWrapper).find("#"+E.options.instanceName),E.vimeoPlayer=new Vimeo.Player(E.vimeoIframe[0]),E.vimeoPlayer.on("pause",_),E.vimeoPlayer.on("ended",u),E.vimeoPlayer.on("timeupdate",I),f(),y&&"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&&"Interior Design"!=E.options.videos[0].title&&(E.VIDEO.pw(),E.vimeoWrapper.css({zIndex:0}),e("iframe#"+E.options.instanceName).attr("src","")))}function f(){var t,a=!1;E.isMobile.any()?i.loadRandomVideoOnStart?(t=E.videos_array[E.rand].vimeoID,a=!1):(t=E.videos_array[E.videoid].vimeoID,a=!1):i.autoplay?i.loadRandomVideoOnStart?(t=E.videos_array[E.rand].vimeoID,a=!0):(t=E.videos_array[E.videoid].vimeoID,a=!0):i.loadRandomVideoOnStart?(t=E.videos_array[E.rand].vimeoID,a=!1):(t=E.videos_array[E.videoid].vimeoID,a=!1),e("#"+i.instanceName).on("load",function(){e(E.vimeoWrapper).show(),a&&E.vimeoPlayer.play(),E.preloader.stop().animate({opacity:0},200,function(){e(this).hide()})})}var E=this;switch(this.VIDEO=t,this.element=s,this.youtube_array=m,""==i.youtubePlaylistID&&""==i.youtubeChannelID||(i.videos=E.youtube_array),this.canPlay=d,this.CLICK_EV=n,this.params=p,this.isMobile=c,this.preloader=l,this.preloaderAD=o,this.options=i,this.mainContainer=a,this.videoid="VIDEOID",this.adStartTime="ADSTARTTIME",this.videoAdPlayed=!1,this.rand=Math.floor(Math.random()*i.videos.length+0),this.ytQuality=i.youtubeQuality,this.youtubeSTARTED=!1,this.deviceAgent=v,this.agentID=h,this.YTAPI_onPlayerReady=!1,this.vimeo_time,this.vimeo_duration,this.scrollingIsOn=!1,this.itemHoverOn=!1,this.playlist=e("<div />"),this.playlistContent=e("<div />"),this.playlistBar=e("<div />"),this.playlistBar.addClass("stellar_vp_bg "+this.options.instanceTheme),this.playlist.append(this.playlistBar),this.playlistBarSearch=e("<div />"),this.playlistBarSearch.addClass("stellar_vp_bg "+this.options.instanceTheme),this.playlist.append(this.playlistBarSearch),this.nextTxtWrapper=e("<div />"),this.playlistBar.append(this.nextTxtWrapper),this.nextTxtWrapper.append('<p class="stellar_vp_nextVideoInPlaylistText stellar_vp_controlsColor '+E.options.instanceTheme+'">'+E.options.nextVideoInPlaylistText+"</p>"),this.countTxtWrapper=e("<div />").addClass("stellar_vp_countTxtWrapper"),this.countTxtWrapper.append('<p class="stellar_vp_countVideoInPlaylistText stellar_vp_controlsColor '+E.options.instanceTheme+'">1 of 20</p>'),this.controlsBtnsWrapperLeft=e("<div />"),this.controlsBtnsWrapperLeft.addClass("stellar_vp_controlsBtnsWrapperLeft"),this.VIDEO.controls.append(this.controlsBtnsWrapperLeft),this.lastBtnIcon=e("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-step-forward").attr("id","stellar_vp_lastBtn"),this.firstBtnIcon=e("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-step-backward").attr("id","stellar_vp_firstBtn"),this.nextBtnIcon=e("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-step-forward").attr("id","stellar_vp_nextBtn"),this.nextBtnIcon2=e("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-chevron-right").attr("id","stellar_vp_nextBtn2"),this.previousBtnIcon=e("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-chevron-left").attr("id","stellar_vp_previousBtn"),this.shuffleBtnIcon=e("<span />").attr("aria-hidden","true").attr("id","stellar_vp_shuffleBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-random").addClass("stellar_vp_playerElement"),this.toggleAutoplayBtnIcon=e("<span />").attr("aria-hidden","true").attr("id","stellar_vp_toggleAutoplayBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-toggle-on").addClass("stellar_vp_playerElement"),this.searchBtnIcon=e("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-general").addClass("stellar_vp_controlsColor "+this.options.instanceTheme).addClass("fa-stellar-search").attr("id","stellar_vp_searchBtn"),this.lastBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.lastBtn.append(this.lastBtnIcon),this.firstBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.firstBtn.append(this.firstBtnIcon),this.nextBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.nextBtn.append(this.nextBtnIcon),this.nextBtn2=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.nextBtn2.append(this.nextBtnIcon2),this.previousBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.previousBtn.append(this.previousBtnIcon),this.shuffleBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.shuffleBtn.append(this.shuffleBtnIcon),this.toggleAutoplayBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.toggleAutoplayBtn.append(this.toggleAutoplayBtnIcon),this.searchBtn=e("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this.searchBtn.append(this.searchBtnIcon),this.options.nextShow&&this.controlsBtnsWrapperLeft.append(this.nextBtn),this.playlistControlsBtnsWrapperRight=e("<div />"),this.playlistBar.append(this.playlistControlsBtnsWrapperRight),this.playlistControlsBtnsWrapperLeft=e("<div />"),this.playlistBar.append(this.playlistControlsBtnsWrapperLeft),this.playlistControlsBtnsWrapperSearch=e("<div />"),this.playlistBarSearch.append(this.playlistControlsBtnsWrapperSearch),this.playlistControlsBtnsWrapperRight.append(this.shuffleBtn),this.playlistControlsBtnsWrapperRight.append(this.toggleAutoplayBtn),this.playlistControlsBtnsWrapperLeft.append(this.previousBtn),this.playlistControlsBtnsWrapperLeft.append(this.countTxtWrapper),this.playlistControlsBtnsWrapperLeft.append(this.nextBtn2),this.playlistControlsBtnsWrapperSearch.append(this.searchBtn),this.options.playlist){case"Right playlist":this.playlist.attr("id","stellar_vp_playlist"),this.playlist.addClass("stellar_vp_playlist "+this.options.instanceTheme),this.playlistContent.attr("id",E.options.instanceName+"stellar_vp_playlistContent"),this.playlistBar.addClass("stellar_vp_playlistBar"),this.playlistBarSearch.addClass("stellar_vp_playlistBarSearch"),this.searchBtn.append('<input type="text" id="stellar_vp_input" class="stellar_vp_themeColorThumbBorder stellar_vp_controlsColor '+E.options.instanceTheme+'" placeholder="'+this.options.playlistSearchText+'">'),this.nextTxtWrapper.addClass("stellar_vp_nextTxtWrapper"),this.playlistControlsBtnsWrapperSearch.addClass("stellar_vp_playlistControlsBtnsWrapperSearch"),this.playlistControlsBtnsWrapperRight.addClass("stellar_vp_playlistControlsBtnsWrapperRight"),this.playlistControlsBtnsWrapperLeft.addClass("stellar_vp_playlistControlsBtnsWrapperLeft");break;case"Bottom playlist":this.playlist.attr("id","stellar_vp_playlist_bottom"),this.playlist.addClass("stellar_vp_playlist "+this.options.instanceTheme),this.playlistContent.attr("id",E.options.instanceName+"stellar_vp_playlistContent_bottom"),this.playlistBar.addClass("stellar_vp_playlistBar_bottom"),this.playlistBarSearch.addClass("stellar_vp_playlistBarSearch_bottom"),this.searchBtn.append('<input type="text" id="stellar_vp_input" class="stellar_vp_themeColorThumbBorder stellar_vp_controlsColor '+E.options.instanceTheme+'" placeholder="'+this.options.playlistSearchText+'">'),this.nextTxtWrapper.addClass("stellar_vp_nextTxtWrapper_bottom"),this.playlistControlsBtnsWrapperSearch.addClass("stellar_vp_playlistControlsBtnsWrapperSearch_bottom"),this.playlistControlsBtnsWrapperRight.addClass("stellar_vp_playlistControlsBtnsWrapperRight_bottom"),this.playlistControlsBtnsWrapperLeft.addClass("stellar_vp_playlistControlsBtnsWrapperLeft_bottom")}E.videos_array=new Array,E.item_array=new Array,this.vimeoWrapper=e("<div></div>"),this.vimeoWrapper.attr("id","stellar_vp_vimeoWrapper"),E.element&&E.element.append(E.vimeoWrapper);var V=0,g=0;this.onPlayerReady=function(){if(E.YTAPI_onPlayerReady=!0,"youtube"==i.videos[E.videoid].videoType||"YouTube"==i.videoType){E.VIDEO.playButtonScreen.hide();var e;i.loadRandomVideoOnStart?(e=parseInt(E.videos_array[E.rand].youtubeIDStartSeconds),""==e&&(e=0)):(e=parseInt(E.videos_array[E.videoid].youtubeIDStartSeconds),""==e&&(e=0));var t=!1,a=window.navigator.userAgent,s=a.indexOf("MSIE "),l=a.indexOf("Trident/");(s>-1||l>-1)&&(t=!0),t?(i.loadRandomVideoOnStart?E.VIDEO.youtubePlayer.loadVideoById(E.videos_array[E.rand].youtubeID,e):E.VIDEO.youtubePlayer.loadVideoById(E.videos_array[E.videoid].youtubeID,e),E.VIDEO.youtubePlayer.pauseVideo()):i.loadRandomVideoOnStart?E.VIDEO.youtubePlayer.cueVideoById(E.videos_array[E.rand].youtubeID,e):E.VIDEO.youtubePlayer.cueVideoById(E.videos_array[E.videoid].youtubeID,e),E.VIDEO.youtubePlayer.setPlaybackQuality(E.ytQuality),i.autoplay&&(E.isMobile.any()||E.VIDEO.youtubePlayer.playVideo()),E.VIDEO.resizeAll(),y&&"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&&"Interior Design"!=E.options.videos[0].title&&(E.VIDEO.pw(),void 0!=E.VIDEO.youtubePlayer&&(E.VIDEO.youtubePlayer.stopVideo(),E.VIDEO.youtubePlayer.clearVideo(),E.VIDEO.youtubePlayer.setSize(1,1))),E.popupTimer=setInterval(function(){E.videos_array[E.videoid].popupAdShow&&E.VIDEO.enablePopup()},1e3)}},this.onPlayerStateChange=function(e){var a=Math.floor(E.VIDEO.youtubePlayer.getCurrentTime());if(E.VIDEO.calculateYoutubeTotalTime(E.VIDEO.youtubePlayer.getDuration()),1===e.data&&0==a&&(E.youtubeSTARTED=!0),1===e.data)E.isMobile.any()&&E.VIDEO.playButtonScreen.addClass("stellar_vp_playButtonScreenHide"),s.removeClass("vp_paused"),s.addClass("stellar_vp_playing"),t.change("stellar_vp_playing"),E.VIDEO.play(),E._timer=setInterval(function(){if("HTML5"!=i.videos[E.videoid].videoType&&"HTML5 (self-hosted)"!=i.videoType){E.progressWidth=E.VIDEO.youtubePlayer.getCurrentTime()/E.VIDEO.youtubePlayer.getDuration()*E.VIDEO.videoTrack.width(),E.VIDEO.videoTrackProgress.css("width",E.progressWidth),E.progressIdleWidth=E.VIDEO.youtubePlayer.getCurrentTime()/E.VIDEO.youtubePlayer.getDuration()*E.VIDEO.progressIdleTrack.width(),E.VIDEO.progressIdle.css("width",E.progressIdleWidth),E.VIDEO.calculateYoutubeElapsedTime(E.VIDEO.youtubePlayer.getCurrentTime());var e=parseInt(E.videos_array[E.videoid].youtubeIDEndSeconds);if(""==e&&(e=0),parseInt(E.VIDEO.youtubePlayer.getCurrentTime())==e&&E.VIDEO.youtubePlayer.stopVideo(),E.buffered=E.VIDEO.youtubePlayer.getVideoLoadedFraction(),E.downloadWidth=E.buffered*E.VIDEO.videoTrack.width(),E.VIDEO.videoTrackDownload.css("width",E.downloadWidth),E.progressIdleDownloadWidth=E.buffered*E.VIDEO.progressIdleTrack.width(),E.VIDEO.progressIdleDownload.css("width",E.progressIdleDownloadWidth),E.VIDEO.secondsFormat(E.VIDEO.youtubePlayer.getCurrentTime())==E.videos_array[E.videoid].midrollAD_displayTime){if(E.VIDEO.midrollPlayed)return;E.VIDEO.midrollPlayed=!0,1!=E.videos_array[E.videoid].midrollAD&&"yes"!=E.videos_array[E.videoid].midrollAD||(r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,"")&&(E.canPlay=!0,E.video_pathAD=E.videos_array[E.videoid].midroll_mp4),E.VIDEO.youtubePlayer.pauseVideo(),E.VIDEO.loadAD(E.video_pathAD,"midrollActive"),E.VIDEO.openAD())}if(E.VIDEO.secondsFormat(E.VIDEO.youtubePlayer.getCurrentTime())>=E.VIDEO.secondsFormat(E.VIDEO.youtubePlayer.getDuration()-1)&&E.VIDEO.youtubePlayer.getDuration()>0){if(E.VIDEO.postrollPlayed)return;E.VIDEO.postrollPlayed=!0,1!=E.videos_array[E.videoid].postrollAD&&"yes"!=E.videos_array[E.videoid].postrollAD||(r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,"")&&(E.canPlay=!0,E.video_pathAD=E.videos_array[E.videoid].postroll_mp4),E.VIDEO.youtubePlayer.pauseVideo(),E.VIDEO.loadAD(E.video_pathAD,"postrollActive"),E.VIDEO.openAD())}}},50);else if(2===e.data)clearInterval(E._timer),s.addClass("vp_paused"),s.removeClass("stellar_vp_playing"),t.change("vp_paused"),E.VIDEO.pause();else if(0===e.data)if(E.VIDEO.midrollPlayed=!1,E.VIDEO.postrollPlayed=!1,E.randEnd=Math.floor(Math.random()*i.videos.length+0),E.videoAdPlayed=!1,E.videoid=parseInt(E.videoid)+1,E.videos_array.length==E.videoid&&(E.videoid=0),"Play next video"==i.onFinish&&E.VIDEO.toggleAutoplayBtnEnabled)E.VIDEO.shuffleBtnEnabled?(E.VIDEO.setPlaylistItem(E.randEnd),E.videoid=E.randEnd):E.VIDEO.setPlaylistItem(E.videoid),E.VIDEO.playVideoById(E.videoid);else if("Restart video"==i.onFinish)void 0!=E.VIDEO.youtubePlayer&&(E.VIDEO.youtubePlayer.seekTo(0),E.VIDEO.youtubePlayer.playVideo());else if("Stop video"==i.onFinish&&""!=i.posterImgOnVideoFinish&&(E.VIDEO.showPoster2(),"youtube"==i.videos[E.videoid].videoType||"YouTube"==i.videoType)){if(E.VIDEO.closeAD(),E.videoAdPlayed=!1,E.VIDEO.ytWrapper.css({zIndex:501}),E.VIDEO.ytWrapper.css({visibility:"visible"}),E.VIDEO.removeHTML5elements(),void 0!=E.VIDEO.youtubePlayer){var l=parseInt(E.videos_array[E.videoid].youtubeIDStartSeconds);""==l&&(l=0),E.VIDEO.youtubePlayer.cueVideoById(E.videos_array[E.videoid].youtubeID,l),E.isMobile.any()||E.VIDEO.youtubePlayer.pauseVideo()}E.VIDEO.youtubePlayer.setPlaybackQuality(E.ytQuality)}if(1!==e.data||0!=a||1!=E.videos_array[E.videoid].prerollAD&&"yes"!=E.videos_array[E.videoid].prerollAD&&!E.options.showGlobalPrerollAds)e.data!=YT.PlayerState.PLAYING&&e.data!=YT.PlayerState.CUED||(E.youtubePLAYING=!0);else if(E.VIDEO.videoAdStarted=!0,E.videoAdPlayed)E.VIDEO.youtubePlayer.playVideo();else{if(E.VIDEO.youtubePlayer.pauseVideo(),r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,"")&&(this.canPlay=!0,i.showGlobalPrerollAds?E.video_pathAD=E.VIDEO.globalPrerollAds_arr[E.VIDEO.getGlobalPrerollRandomNumber()]:E.video_pathAD=E.videos_array[E.videoid].preroll_mp4),E.VIDEO.poster2Showing)return;E.VIDEO.loadAD(E.video_pathAD,"prerollActive"),E.VIDEO.openAD()}};var C=-1;switch(e(i.videos).each(function(){C+=1;var t={id:C,title:this.title,videoType:this.videoType,youtubeID:this.youtubeID,youtubeIDStartSeconds:this.youtubeIDStartSeconds,youtubeIDEndSeconds:this.youtubeIDEndSeconds,vimeoID:this.vimeoID,video_path_mp4HD:this.mp4HD,video_path_mp4SD:this.mp4SD,enable_mp4_download:this.enable_mp4_download,imageUrl:this.imageUrl,imageTimer:this.imageTimer,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,popupImg:this.popupImg,popupAdShow:this.popupAdShow,popupAdStartTime:this.popupAdStartTime,popupAdEndTime:this.popupAdEndTime,popupAdGoToLink:this.popupAdGoToLink,description:this.description,thumbnail_image:this.thumbImg,info_text:this.info};E.videos_array.push(t),E.itemHoverBox=e("<div />"),E.itemHoverBox.addClass("stellar_vp_itemHoverBox"),E.itemHoverBox.css({opacity:0}),E.nowPlayingIndicatorIcon=e("<span />").attr("aria-hidden","true").addClass("stellar_vp_nowPlayingIndicator").addClass("fa-stellar").addClass("stellar_vp_themeColorText").addClass("fa-stellar-play-indicator").attr("id","stellar_vp_nowPlayingIndicator").hide(),E.itemLeft=e("<div />"),E.itemLeft.addClass("stellar_vp_itemLeft stellar_vp_themeColorThumbBorder"),E.i=document.createElement("img"),E.i.onload=function(){E.thumbImageW=this.width,E.thumbImageH=this.height},E.i.src=t.thumbnail_image,"youtube"!=i.videos[C].videoType&&"YouTube"!=i.videoType||"auto"!=t.thumbnail_image&&""!=t.thumbnail_image||(E.i.src="http://img.youtube.com/vi/"+i.videos[C].youtubeID+"/1.jpg"),E.itemLeft.append(E.i),E.itemLeft.append(E.itemHoverBox),E.itemLeft.append(E.nowPlayingIndicatorIcon),e(E.i).addClass("stellar_vp_thumbnail_image");var a='<div class="stellar_vp_itemRight"><div class="stellar_vp_title stellar_vp_themeColorText">'+t.title+'</div><div class="stellar_vp_description stellar_vp_controlsColor '+E.options.instanceTheme+'"> '+t.description+"</div></div>",s='<div class="stellar_vp_itemRight_bottom"><div class="stellar_vp_title stellar_vp_themeColorText">'+t.title+'</div><div class="stellar_vp_description stellar_vp_controlsColor '+E.options.instanceTheme+'"> '+t.description+"</div></div>";switch(i.playlist){case"Right playlist":E.item=e("<div />"),E.item.addClass("stellar_vp_item").css("top",String(g)+"px"),E.item_array.push(E.item),E.item.addClass("stellar_vp_itemUnselected "+E.options.instanceTheme),E.item.append(E.itemLeft),E.item.append(a),g+=88;break;case"Bottom playlist":E.item=e("<div />"),E.item.addClass("stellar_vp_item").css("left",String(V)+"px"),E.item_array.push(E.item),E.item.addClass("stellar_vp_itemUnselected "+E.options.instanceTheme),E.item.css("display","inline-flex"),E.item.append(E.itemLeft),E.item.append(s)}E.playlistContent.append(E.item),void 0!=E.item&&(E.item.bind(E.CLICK_EV,function(){E.scrollingIsOn&&E.isMobile.any()||(E.preloader&&E.preloader.stop().animate({opacity:1},0,function(){e(this).show()}),E.videoid=t.id,E.VIDEO.setPlaylistItem(E.videoid),E.VIDEO.resetPlayer(),E.VIDEO.resetPlayerAD(),E.VIDEO.resizeAll(),"vimeo"!=i.videos[E.videoid].videoType&&"Vimeo"!=i.videoType||D(),E.VIDEO.playVideoById(E.videoid),E.youtubeSTARTED=!1,y&&"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&&"Successful Business - After Effects Project"!=E.options.videos[0].title&&"Interior Design"!=E.options.videos[0].title&&E.VIDEO.pw())}),E.item.bind("mouseenter",function(){e(this).find(".stellar_vp_itemHoverBox").stop().animate({opacity:1},200,function(){}),e(this).find(".stellar_vp_thumbnail_image").css({"-webkit-transform":"scale(1.2)","-moz-transform":"scale(1.2)","-ms-transform":"scale(1.2)","-o-transform":"scale(1.2)",transform:"scale(1.2)"})}),E.item.bind("mouseleave",function(){e(this).find(".stellar_vp_itemHoverBox").stop().animate({opacity:0},200,function(){}),e(this).find(".stellar_vp_thumbnail_image").css({"-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)","-o-transform":"scale(1)",transform:"scale(1)"})}))}),i.loadRandomVideoOnStart?E.videoid=E.rand:E.videoid=i.playSpecificVideo,E.params.id&&(parseInt(E.params.id)<=E.videos_array.length-1?E.videoid=E.rand=parseInt(E.params.id):parseInt(E.params.id)>E.videos_array.length-1&&alert("Video ID should be from 0 to "+(E.videos_array.length-1)+"!")),E.options.playlist){case"Right playlist":i.loadRandomVideoOnStart?(e(E.item_array[E.rand]).removeClass("stellar_vp_itemUnselected "+this.options.instanceTheme).addClass("stellar_vp_itemSelected "+this.options.instanceTheme),E.item_array[E.rand].find(".stellar_vp_thumbnail_image").removeClass("stellar_vp_thumbnail_image").addClass("stellar_vp_thumbnail_imageSelected")):(e(E.item_array[E.videoid]).removeClass("stellar_vp_itemUnselected "+this.options.instanceTheme).addClass("stellar_vp_itemSelected "+this.options.instanceTheme),E.item_array[E.videoid].find(".stellar_vp_thumbnail_image").removeClass("stellar_vp_thumbnail_image").addClass("stellar_vp_thumbnail_imageSelected"));break;case"Bottom playlist":i.loadRandomVideoOnStart?(e(E.item_array[E.rand]).removeClass("stellar_vp_itemUnselected "+this.options.instanceTheme).addClass("stellar_vp_itemSelected "+this.options.instanceTheme),E.item_array[E.rand].find(".stellar_vp_thumbnail_image").removeClass("stellar_vp_thumbnail_image").addClass("stellar_vp_thumbnail_imageSelected")):(e(E.item_array[E.videoid]).removeClass("stellar_vp_itemUnselected "+this.options.instanceTheme).addClass("stellar_vp_itemSelected "+this.options.instanceTheme),E.item_array[E.videoid].find(".stellar_vp_thumbnail_image").removeClass("stellar_vp_thumbnail_image").addClass("stellar_vp_thumbnail_imageSelected"))}if(e(E.playlistContent).mCustomScrollbar("scrollTo",E.item_array[E.videoid]),E.countTxtWrapper.find(".stellar_vp_countVideoInPlaylistText").html(E.videoid+1+" "+E.options.countVideos+" "+E.item_array.length),"youtube"==i.videos[E.videoid].videoType||"YouTube"==i.videoType)E.VIDEO.imageWrapper.css({zIndex:0}),E.VIDEO.imageWrapper.css({visibility:"none"}),E.VIDEO.hideVideoElements(),E.preloader.stop().animate({opacity:0},0,function(){e(this).hide()}),E.VIDEO.ytWrapper.css({zIndex:501}),E.VIDEO.ytWrapper.css({visibility:"visible"}),E.vimeoWrapper.css({zIndex:0});else if("HTML5"==i.videos[E.videoid].videoType||"HTML5 (self-hosted)"==i.videoType){if(E.VIDEO.imageWrapper.css({zIndex:0}),E.VIDEO.imageWrapper.css({visibility:"none"}),E.VIDEO.ytWrapper.css({zIndex:0}),E.VIDEO.ytWrapper.css({visibility:"hidden"}),E.vimeoWrapper.css({zIndex:0}),r.canPlayType&&r.canPlayType("video/mp4").replace(/no/,""))if(this.canPlay=!0,i.loadRandomVideoOnStart){switch(i.HTML5VideoQuality){case"HD":E.video_path=E.videos_array[E.rand].video_path_mp4HD;break;case"SD":E.video_path=E.videos_array[E.rand].video_path_mp4SD}E.video_pathAD=E.videos_array[E.rand].preroll_mp4}else{switch(i.HTML5VideoQuality){case"HD":E.video_path=E.videos_array[E.videoid].video_path_mp4HD;break;case"SD":E.video_path=E.videos_array[E.videoid].video_path_mp4SD}E.video_pathAD=E.videos_array[E.videoid].preroll_mp4}E.VIDEO.load(E.video_path,"0")}else"vimeo"==i.videos[E.videoid].videoType||"Vimeo"==i.videoType?(E.VIDEO.imageWrapper.css({zIndex:0}),E.VIDEO.imageWrapper.css({visibility:"none"}),E.VIDEO.hideCustomControls(),E.VIDEO.hideVideoElements(),E.preloader.stop().animate({opacity:0},700,function(){e(this).hide()}),E.vimeoWrapper.css({zIndex:501}),D()):"image"!=i.videos[E.videoid].videoType&&"Image"!=i.videoType||(E.VIDEO.hideCustomControls(),E.VIDEO.hideVideoElements(),E.VIDEO.ytWrapper.css({zIndex:0}),E.VIDEO.ytWrapper.css({visibility:"hidden"}),E.vimeoWrapper.css({zIndex:0}),E.vimeoWrapper.css({visibility:"hidden"}),E.VIDEO.imageWrapper.css({zIndex:502}),E.VIDEO.imageWrapper.css({visibility:"visible"}),E.VIDEO.imageDisplayed.src=E.videos_array[E.videoid].imageUrl,e(E.VIDEO.imageDisplayed).on("load",function(){i.autoplay&&E.VIDEO.setImageTimer()}));E.nextBtn.bind(E.CLICK_EV,function(){E.VIDEO.shuffleBtnEnabled?(E.VIDEO.generateRandomNumber(),E.videoid=E.VIDEO.rand,E.VIDEO.setPlaylistItem(E.videoid)):(E.videoid=E.videoid+1,E.videoid>=i.videos.length&&(E.videoid=0),E.VIDEO.setPlaylistItem(E.videoid)),E.VIDEO.playVideoById(E.videoid)}),E.nextBtn2.bind(E.CLICK_EV,function(){E.VIDEO.shuffleBtnEnabled?(E.VIDEO.generateRandomNumber(),E.videoid=E.VIDEO.rand,E.VIDEO.setPlaylistItem(E.videoid)):(E.videoid=E.videoid+1,E.videoid>=i.videos.length&&(E.videoid=0),E.VIDEO.setPlaylistItem(E.videoid)),E.VIDEO.playVideoById(E.videoid)}),E.previousBtn.bind(E.CLICK_EV,function(){E.VIDEO.shuffleBtnEnabled?(E.VIDEO.generateRandomNumber(),E.videoid=E.VIDEO.rand,E.VIDEO.setPlaylistItem(E.videoid)):(E.videoid=E.videoid-1,E.videoid<0&&(E.videoid=i.videos.length-1),E.VIDEO.setPlaylistItem(E.videoid)),E.VIDEO.playVideoById(E.videoid)}),E.shuffleBtn.bind(E.CLICK_EV,function(){E.VIDEO.toggleShuffleBtn()}),E.toggleAutoplayBtn.bind(E.CLICK_EV,function(){E.VIDEO.toggleAutoplayBtn()}),E.lastBtn.bind(E.CLICK_EV,function(){e(E.playlistContent).mCustomScrollbar("scrollTo","last")}),E.firstBtn.bind(E.CLICK_EV,function(){e(E.playlistContent).mCustomScrollbar("scrollTo","first")}),E.totalWidth=i.videoPlayerWidth,E.totalHeight=i.videoPlayerHeight,"Right playlist"!=i.playlist&&"Bottom playlist"!=i.playlist||E.element&&(a.append(E.playlist),E.playlist.append(E.playlistContent)),this.playlistW=this.playlist.width(),this.playlistH=this.playlist.height(),"Right playlist"==i.playlist?(E.playlistContent.css("height",String(g)+"px"),E.playerWidth=E.totalWidth-E.playlist.width(),E.playerHeight=E.totalHeight-E.playlist.height(),E.playlist.css({height:"100%",top:0}),E.playlistContent.height(a.height()-44-44),e(E.playlistContent).mCustomScrollbar({axis:"y",theme:E.options.playlistScrollType,scrollButtons:{enable:!0},callbacks:{onScrollStart:function(){E.scrollingIsOn=!0},onScroll:function(){E.scrollingIsOn=!1}}})):"Bottom playlist"==i.playlist&&(E.playlistContent.css("width",String(V)+"px"),E.playerWidth=E.totalWidth,E.playerHeight=E.totalHeight-E.playlist.height(),E.playlist.css({left:0,width:"100%",bottom:0}),E.playlistContent.width(a.width()),e(E.playlistContent).mCustomScrollbar({axis:"x",theme:E.options.playlistScrollType,scrollButtons:{enable:!0},callbacks:{onScrollStart:function(){E.scrollingIsOn=!0},onScroll:function(){E.scrollingIsOn=!1}},advanced:{autoExpandHorizontalScroll:!0},setHeight:"auto",setWidth:"auto"})),e(E.playlistContent).mCustomScrollbar("scrollTo",E.item_array[E.videoid])},PLAYER.Playlist.prototype={},PLAYER.Playlist.prototype.hidePlaylist=function(){this.playlist.hide()},PLAYER.Playlist.prototype.showPlaylist=function(){this.playlist.show()},PLAYER.Playlist.prototype.resizePlaylist=function(){var e=this;switch(this.options.playlist){case"Right playlist":this.playlist.css({right:0,height:"100%"}),this.playlistContent.css({position:"absolute",top:44,height:e.mainContainer.height()-44,width:"100%"}),this.playlistContent.height(this.mainContainer.height()-this.playlistBar.height()-this.playlistBarSearch.height());break;case"Bottom playlist":this.playlist.css({left:0,width:"100%",bottom:0}),this.playlistContent.height(this.playlist.height()-this.playlistBar.height())}},PLAYER.Playlist.prototype.playYoutube=function(e){var t=parseInt(this.videos_array[e].youtubeIDStartSeconds);""==t&&(t=0),void 0!=this.VIDEO.youtubePlayer&&(this.VIDEO.youtubePlayer.cueVideoById(this.videos_array[e].youtubeID,this.videos_array[e].youtubeIDStartSeconds),this.VIDEO.youtubePlayer.setPlaybackQuality(this.ytQuality),this.preloader.hide(),this.VIDEO.ytWrapper.css({zIndex:501}),this.VIDEO.ytWrapper.css({visibility:"visible"}),this.isMobile.any()||this.VIDEO.youtubePlayer.playVideo()),this.VIDEO.resizeAll()};
// source --> https://www.mallorca360.es/wp-content/plugins/Stellar-video-player/js/videoPlayer.min.js?ver=2.1 
!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,floatPlayerOutsideViewport:!1,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.<br>This text can be <i>HTML formatted</i>, <a href='http://codecanyon.net/user/_zac_' target='_blank'><font color='008BFF'>find out more</font></a>.<br>You can disable this info window in player options. <br><br>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.<br>This text can be <i>HTML formatted</i>, <a href='http://codecanyon.net/user/_zac_' target='_blank'><font color='008BFF'>find out more</font></a>.<br>You can disable this info window in player options. <br><br>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.<br>This text can be <i>HTML formatted</i>, <a href='http://codecanyon.net/user/_zac_' target='_blank'><font color='008BFF'>find out more</font></a>.<br>You can disable this info window in player options. <br><br>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.<br>This text can be <i>HTML formatted</i>, <a href='http://codecanyon.net/user/_zac_' target='_blank'><font color='008BFF'>find out more</font></a>.<br>You can disable this info window in player options. <br><br>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.<br>This text can be <i>HTML formatted</i>, <a href='http://codecanyon.net/user/_zac_' target='_blank'><font color='008BFF'>find out more</font></a>.<br>You can disable this info window in player options. <br><br>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.<br>This text can be <i>HTML formatted</i>, <a href='http://codecanyon.net/user/_zac_' target='_blank'><font color='008BFF'>find out more</font></a>.<br>You can disable this info window in player options. <br><br>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.closedAD=!1,this.stickyClosedOnButton=!1,this.initializedFloating=!1,this.savePageOffsetY,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)/),r.options.instanceName=r.options.instanceName.split(" ").join(""),"fitToBrowser"==this.options.playerLayout||"fitToBrowser"==i.playerLayout){var h=t("#Stellar_video_player");t.each(h,function(){var e=t("<div />").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.options.youtubeAPIKey;this.url;var f="https://www.googleapis.com/youtube/v3/search?order=date&maxResults=50&part=snippet&channelId="+v+"&key="+_,g="https://www.googleapis.com/youtube/v3/playlistItems?&maxResults=50&part=snippet&playlistId="+y+"&key="+_;""!=y?this.url=g:""!=v&&(this.url=f),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("<div />"),e.preloader.addClass("stellar_vp_preloader"),e.element.append(e.preloader),e.preloaderAD=t("<div />"),e.preloaderAD.addClass("stellar_vp_preloader"),e.elementAD.append(e.preloaderAD),this.videoElement=t("<video />"),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("<video />"),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("<div />"),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("<div />").addClass("stellar_vp_nowPlayingTitle").bind(e.CLICK_EV,function(){e.togglePlay()}),this.nowPlayingTitleControlBar=t("<div />").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;t.fn.isInViewport=function(){var i=t(e.mainContainer.parent()).offset().top,s=i+t(this).outerHeight(),o=t(window).scrollTop(),a=o+t(window).height();return s>o&&a>i},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(window).on("resize scroll",function(){if(!e.options.floatPlayerOutsideViewport)return void(t(e.mainContainer.parent()).isInViewport()&&e.options.autoplay&&!e.initializedAutoplay&&(e.play(),"youtube"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"YouTube"!=e.options.videoType||e.youtubePlayer.playVideo(),"vimeo"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"Vimeo"!=e.options.videoType||e._playlist.vimeoPlayer.api("play"),e.initializedAutoplay=!0));if(!(document.webkitIsFullScreen||document.fullscreenElement||document.mozFullScreen||document.msieFullScreen||document.msFullscreenElement))if(t(e.mainContainer.parent()).isInViewport())e.initializedFloating=!0,e.initializedFloating&&(t(e.mainContainer).removeClass("stellar_vp_sticky"),e.mainContainerStickyBG.hide(),e.stickyClosedOnButton=!1,e.positionElementsDuringAnimation()),e.options.autoplay&&!e.initializedAutoplay&&(e.play(),"youtube"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"YouTube"!=e.options.videoType||e.youtubePlayer.playVideo(),"vimeo"!=e._playlist.videos_array[e._playlist.videoid].videoType&&"Vimeo"!=e.options.videoType||e._playlist.vimeoPlayer.api("play"),e.initializedAutoplay=!0);else if(e.initializedFloating){if(e.stickyClosedOnButton)return;e.mainContainer.addClass("stellar_vp_sticky"),e.resizeStickyBG(),e.mainContainerStickyBG.show(),e.mainContainer.width(e.mainContainer.parent().width())}}),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(e.mainContainer.parent().width),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.midrollPlayed||e.postrollPlayed)&&!e.closedAD&&e.videoAdStarted&&e.elementAD.css({zIndex:455559}),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(),t("html, body").animate({scrollTop:e.savePageOffsetY},0)),e.resizeVideoTrack(),e.positionOverScreenButtons(),e.positionLogo(),e.positionPopup(),e.positionQualityWindow(),e.positionShareMask(),e.resizeBars(),e.options.hideControlsOnMouseOut&&e.hideControls()},e.mainContainer.find("#stellar_vp_input").on("keyup",function(){var i,s,o,a,l,n;for(i=document.getElementById("stellar_vp_input"),s=i.value.toUpperCase(),o=document.getElementById("mCSB_1_container"),a=o.getElementsByClassName("stellar_vp_item"),n=0;n<a.length;n++)l=a[n].getElementsByClassName("stellar_vp_title")[0],l.innerHTML.toUpperCase().indexOf(s)>-1?(t(a[n]).show(),t(a[n]).stop().animate({opacity:1},300)):t(a[n]).stop().animate({opacity:0},300,function(){t(this).hide()});t(e.playlistContent).mCustomScrollbar("scrollTo","first")})},u.fn.setInitialSize=function(){var e=this;if(!this._isAnimation)if("fitToContainer"==this.options.playerLayout||"fitToBrowser"==this.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)}"fitToBrowser"==e.options.playerLayout&&(this.mainContainer.height("100%"),this.mainContainer.width("100%")),this.parent.height(i),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("<div />").addClass("stellar_vp_lightBoxOverlay").hide().css({opacity:0}),e.lightBoxCloseBtnWrapper=t("<div />").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("<span />").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("<div />").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("<div />").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('<img class="stellar_vp_lightBoxThumbnail">').attr("src",e.options.lightBoxThumbnail).appendTo(e.lightBoxThumbnailWrap),e.lightBoxPlayButton=t("<div />"),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.resizeStickyBG=function(){var e=this;t(e.mainContainerStickyBG).css({width:t(e.mainContainer).width()+20,height:t(e.mainContainer).height()+20})},u.fn.resizeAll=function(){var e=this;if(!this._inFullscreen){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("fitToBrowser"==e.options.playerLayout&&(this.mainContainer.height("100%"),this.mainContainer.width("100%")),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.positionPopup(),e.positionQualityWindow(),e.positionShareMask(),this.options.floatPlayerOutsideViewport&&e.resizeStickyBG(),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<e.options.videoPlayerWidth)switch(this.options.lightBox&&t(e.mainContainer).css({position:"absolute",left:24,top:window.innerHeight/2-e.newPlayerHeight/2-10}),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)&&(e.newPlayerWidth<362?this.downloadBtnLink.hide():this.downloadBtnLink.show()),this.options.shareShow&&(this.newPlayerWidth<328?this.shareBtnWrapper.hide():this.shareBtnWrapper.show()),this.options.embedShow&&(this.newPlayerWidth<297?this.embedBtnWrapper.hide():this.embedBtnWrapper.show()),this.newPlayerWidth<260?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),this.newPlayerWidth<231?this.qualityBtnWrapper.hide():this.qualityBtnWrapper.show(),this.fsBtnWrapper.show()):((this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&(this.newPlayerWidth<665?this.downloadBtnLink.hide():this.downloadBtnLink.show()),this.options.shareShow&&(this.newPlayerWidth<626?this.shareBtnWrapper.hide():this.shareBtnWrapper.show()),this.options.embedShow&&(this.newPlayerWidth<598?this.embedBtnWrapper.hide():this.embedBtnWrapper.show()),this.newPlayerWidth<565?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),this.newPlayerWidth<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)&&(e.newPlayerWidth<492?e.downloadBtnLink.hide():e.downloadBtnLink.show()),e.options.shareShow&&(e.newPlayerWidth<460?e.shareBtnWrapper.hide():e.shareBtnWrapper.show()),e.options.embedShow&&(e.newPlayerWidth<426?e.embedBtnWrapper.hide():e.embedBtnWrapper.show()),e.newPlayerWidth<394?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),e.newPlayerWidth<363?this.qualityBtnWrapper.hide():this.qualityBtnWrapper.show(),e.newPlayerWidth<330?this.fsBtnWrapper.hide():this.fsBtnWrapper.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.newPlayerWidth<522?this._playlist.playlist.css({width:130}):this._playlist.playlist.css({width:300}),this.newPlayerHeight<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.newPlayerWidth<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.newPlayerWidth<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.newPlayerWidth<330?this.shareBtnWrapper.hide():this.shareBtnWrapper.show()),this.options.embedShow&&(this.newPlayerWidth<294?this.embedBtnWrapper.hide():this.embedBtnWrapper.show()),this.newPlayerWidth<264?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),this.newPlayerWidth<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.newPlayerWidth<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"));break;case"Off":(this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&(e.newPlayerWidth<320?this.downloadBtnLink.hide():this.downloadBtnLink.show()),e.newPlayerWidth<290?this.rewindBtnWrapper.hide():this.rewindBtnWrapper.show(),e.options.embedShow&&(e.newPlayerWidth<560?e.embedBtn.hide():e.embedBtn.show()),this.newPlayerHeight<190?(t(this.playButtonScreen).css({"-webkit-transform":"scale(0.8)","-moz-transform":"scale(0.8)","-ms-transform":"scale(0.8)","-o-transform":"scale(0.8)",transform:"scale(0.8)"}),t(this.toggleAdPlayBox).css({"-webkit-transform":"scale(0.8)","-moz-transform":"scale(0.8)","-ms-transform":"scale(0.8)","-o-transform":"scale(0.8)",transform:"scale(0.8)"}),t(this.skipAdCount).css({"-webkit-transform":"scale(0.6)","-moz-transform":"scale(0.6)","-ms-transform":"scale(0.6)","-o-transform":"scale(0.6)",transform:"scale(0.6)","transform-origin":"bottom right"}),t(this.skipAdBox).css({"-webkit-transform":"scale(0.6)","-moz-transform":"scale(0.6)","-ms-transform":"scale(0.6)","-o-transform":"scale(0.6)",transform:"scale(0.6)","transform-origin":"bottom right"})):(t(this.playButtonScreen).css({"-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)","-o-transform":"scale(1)",transform:"scale(1)"}),t(this.toggleAdPlayBox).css({"-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)","-o-transform":"scale(1)",transform:"scale(1)"}),t(this.skipAdCount).css({"-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)","-o-transform":"scale(1)",transform:"scale(1)","transform-origin":"bottom right"}),t(this.skipAdBox).css({"-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)","-o-transform":"scale(1)",transform:"scale(1)","transform-origin":"bottom right"})),e.options.embedShow&&(e.newPlayerHeight<159?this.embedBtn.hide():this.embedBtn.show()),e.options.shareShow&&(e.newPlayerHeight<123?this.shareBtn.hide():this.shareBtn.show())}else this.options.lightBox&&t(e.mainContainer).css({position:"absolute",left:window.innerWidth/2-e.options.videoPlayerWidth/2,top:window.innerHeight/2-e.options.videoPlayerHeight/2-10}),e.newPlayerWidth=e.options.videoPlayerWidth,e.newPlayerHeight=e.options.videoPlayerHeight,this.showAllInitButtons();e._playlist.resizePlaylist(),e.setInitialSize(),void 0!=e.youtubePlayer&&(e._inFullscreen&&(e.element.width(t(document).width()),e.element.height(t(document).height())),e.youtubePlayer.setSize("100%","100%")),this.options.lightBox&&t(this.mainContainerBG).css({width:t(e.mainContainer).width()+20,height:t(e.mainContainer).height()+20}),e.options.infoShow&&t(e.infoWindow).find(".stellar_vp_infoText").css({"max-height":t(e.mainContainer).height()-94-e.controls.height()}),this.options.floatPlayerOutsideViewport&&e.resizeStickyBG()}e.positionElementsDuringAnimation()}},u.fn.positionElementsDuringAnimation=function(){this.positionShareMask(),this.resizeVideoTrack(),this.positionOverScreenButtons(),this.resizeBars(),this.positionLogo(),this.positionPopup(),this.positionQualityWindow(),this.positionVolumeTrackWrapper(),this.elementAD.width(this.element.width()),this.elementAD.height(this.element.height())},u.fn.transformElement=function(e,i,s){t(e).css({"-webkit-transform":"scale("+i+")","-moz-transform":"scale("+i+")","-ms-transform":"scale("+i+")","-o-transform":"scale("+i+")",transform:"scale("+i+")","transform-origin":s})},u.fn.showAllInitButtons=function(){this.rewindBtnWrapper.show(),this.qualityBtnWrapper.show(),this.options.shareShow?this.shareBtnWrapper.show():this.shareBtnWrapper.hide(),this.options.embedShow?this.embedBtnWrapper.show():this.embedBtnWrapper.hide(),(this._playlist.videos_array[this._playlist.videoid].enable_mp4_download||"yes"==this._playlist.videos_array[this._playlist.videoid].enable_mp4_download)&&this.downloadBtnLink.show(),this.mainContainer.find(".stellar_vp_nextTxtWrapper").show(),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperRight").show(),this.mainContainer.find(".stellar_vp_playlistControlsBtnsWrapperLeft").css({left:73}),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}),"Right playlist"==this.options.playlist&&(this.newPlayerWidth<522?this._playlist.playlist.css({width:130}):this._playlist.playlist.css({width:300}),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:""})),"Bottom playlist"==this.options.playlist&&t(this._playlist.playlist).css({height:146}),this._playlist.playlistH=t(this._playlist.playlist).height(),this.mainContainer.find("#stellar_vp_input").css({width:200}),this.mainContainer.find(".stellar_vp_playlistBarSearch_bottom").css({width:200}),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.mainContainer.find(".stellar_vp_itemRight").show(),this.toolTip[0].style.setProperty("font-size",this.options.tooltipFontSize+"px","important")},u.fn.autohideControls=function(){var t=this.element,e=!1,s=1e3*this.options.autohideControls,o=1e3,a=0,l=function(){e&&t.trigger("idle",!1),e=!1,a=0},n=function(){a>=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("<div/>"),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("<div />"),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("<span />").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("<div/>"),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.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})},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("<div/>"),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()||"youtube"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"YouTube"!=this.options.videoType?t.getViewportStatus()&&t.play():t.playButtonScreen.show():t.options.autoplay||(t.pause(),t.preloader.hide()))},u.fn.getViewportStatus=function(){var e=this;return!!t(e.mainContainer.parent()).isInViewport()},u.fn.createNowPlayingText=function(){var t=this;t.options.loadRandomVideoOnStart?(this.nowPlayingTitle.append('<p class="screen stellar_vp_nowPlayingText '+this.options.instanceTheme+'">'+this._playlist.videos_array[t._playlist.rand].title+"</p>"),this.nowPlayingTitleControlBar.append('<p class="controls stellar_vp_nowPlayingText '+this.options.instanceTheme+'">'+this._playlist.videos_array[t._playlist.rand].title+"</p>")):(this.nowPlayingTitle.append('<p class="screen stellar_vp_nowPlayingText '+this.options.instanceTheme+'">'+this._playlist.videos_array[0].title+"</p>"),this.nowPlayingTitleControlBar.append('<p class="controls stellar_vp_nowPlayingText '+this.options.instanceTheme+'">'+this._playlist.videos_array[0].title+"</p>")),this.nowPlayingTitleW=this.nowPlayingTitle.width(),this.options.nowPlayingText||this.nowPlayingTitle.hide()},u.fn.createInfoWindowContent=function(){var t=this;t.options.loadRandomVideoOnStart?(this.infoWindow.append('<p class="stellar_vp_infoTitle stellar_vp_themeColorText stellar_vp_titles">'+this._playlist.videos_array[t._playlist.rand].title+"</p>"),this.infoWindow.append('<p class="stellar_vp_infoText stellar_vp_infoText '+this.options.instanceTheme+'">'+this._playlist.videos_array[t._playlist.rand].info_text+"</p>")):(this.infoWindow.append('<p class="stellar_vp_infoTitle stellar_vp_themeColorText stellar_vp_titles">'+this._playlist.videos_array[0].title+"</p>"),this.infoWindow.append('<p class="stellar_vp_infoText stellar_vp_infoText '+this.options.instanceTheme+'">'+this._playlist.videos_array[0].info_text+"</p>")),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("<div />"),this.nextVideoBox_mask.addClass("stellar_vp_nextVideoBoxMask").hide(),this.element&&this.element.append(this.nextVideoBox_mask);var i;i=void 0!=y&&parseInt(y.id)==e._playlist.videos_array.length-1?0:e._playlist.videoid+1,e.setPlaylistItem(e._playlist.videoid),this.nextVideoBox=t("<div />").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[i].thumbnail_image,this.nextVideoBox.append(this.i),t(".stellar_vp_nextVideoBox img").addClass("stellar_vp_nextVideoBoxImage stellar_vp_themeColorThumbBorder"),this.nextVideoBoxTitle=t("<div />").addClass("stellar_vp_nextVideoBoxContentLeft"),this.nextVideoBox.append(this.nextVideoBoxTitle),this.nextVideoBoxTitle.append('<p class="stellar_vp_nextVideoBoxTitle">'+e._playlist.videos_array[i].title+"</p>"),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("<div />").addClass("stellar_vp_skipAdBox").bind(e.CLICK_EV,function(){e.closeAD()}).hide(),this.elementAD.append(this.skipAdBox),this.skipAdBoxContentLeft=t("<div />").addClass("stellar_vp_skipAdBoxContentLeft"),this.skipAdBox.append(this.skipAdBoxContentLeft),this.skipAdBoxContentLeft.append('<p class="stellar_vp_skipAdTitle">'+this.options.skipAdvertisementText+"</p>"),this.skipAdBoxIcon=t("<span />").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("<div />").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("<div />").addClass("stellar_vp_skipAdCountContentLeft"),this.skipAdCount.append(this.skipAdCountContentLeft),this.skipAdCountContentLeft.append('<p class="stellar_vp_skipAdCountTitle"></p>'),this.skipAdCount.css({right:-this.skipAdCount.width(),bottom:28}).hide()},u.fn.createAdTogglePlay=function(){var e=this;this.toggleAdPlayBox=t("<div />").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("<div />"),this.videoAdBoxInside.addClass("stellar_vp_videoAdBoxInside"),this.elementAD.append(this.videoAdBoxInside),this.videoAdBoxInside.append('<div class="stellar_vp_adsTitleInside">'+this.options.advertisementTitle+" </div>"),this.videoAdBoxInside.append(this.timeLeftInside),this.videoAdBoxInside.hide()},u.fn.createEmbedWindowContent=function(){var e=this;t(this.embedWindow).append('<p class="stellar_vp_embedTitle2 stellar_vp_themeColorText stellar_vp_titles">'+e.options.embedWindowTitle2+"</p>"),this.embedTxt=t("<p />").addClass("stellar_vp_embedText").addClass("stellar_vp_embedText "+this.options.instanceTheme),this.embedWindow.append(this.embedTxt),this.copy=t("<div />").attr("title","Copy to clipboard").attr("id","stellar_vp_copy").addClass("copyBtn").addClass(this.options.instanceTheme),this.embedWindow.append(this.copy),t(this.embedWindow).find("#stellar_vp_copy").append('<p id="stellar_vp_copyInside" class="stellar_vp_copyInside '+this.options.instanceTheme+'">'+e.options.copyTxt+"</p>"),t(this.embedWindow).append('<p class="stellar_vp_embedTitle3 stellar_vp_themeColorText stellar_vp_titles">'+e.options.embedWindowTitle3+"</p>"),this.embedTxt2=t("<p />").addClass("stellar_vp_embedText2").addClass("stellar_vp_embedText "+this.options.instanceTheme),this.embedWindow.append(this.embedTxt2),this.copy2=t("<div />").attr("title","Copy to clipboard").attr("id","stellar_vp_copy2").addClass("copyBtn").addClass(this.options.instanceTheme),this.embedWindow.append(this.copy2),t(this.embedWindow).find("#stellar_vp_copy2").append('<p id="stellar_vp_copyInside" class="stellar_vp_copyInside '+this.options.instanceTheme+'">'+e.options.copyTxt+"</p>");var i=this.options.embedCodeSrc,s=this.options.videoPlayerWidth,o=this.options.videoPlayerHeight;t(this.embedWindow).find(".stellar_vp_embedText").text("<iframe src='"+i+"' width='"+s+"' height='"+o+"' frameborder=0 webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"),this.updateEmbedText2(),this.copy.bind(this.CLICK_EV,function(){var i=t("<input>");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("<input>");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),this.closedAD=!0,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;this.closedAD=!1,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(){var e=this;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,clearTimeout(this.image_timeout)):(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")),"image"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"Image"!=e.options.videoType||this.setImageTimer())},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):(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")))},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()},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(e){var i=this,e=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"),i.mainContainer.parent().css("zIndex",1),this._inFullscreen=!1):(i.savePageOffsetY=t(window).scrollTop(),e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen(),this.mainContainer.parent().css("position","relative"),i.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.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;_<v.length;_++)!function(){var e=v[_],i=e.replace(/^(on)/,"");u.fn[e]=function(){var e=t.makeArray(arguments);e.unshift(i),this.bind.apply(this,e)}}();u.fn.triggerReady=function(){this.loaded=!0,t("video").each(function(){enableInlineVideo(this)})},u.fn.setupElement=function(){var e=this;switch(this.mainContainer=t("<div />"),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("<div />"),this.mainContainerBG.addClass("stellar_vp_mainContainerBG"),this.mainContainer.append(this.mainContainerBG)),this.options.floatPlayerOutsideViewport&&(this.mainContainerStickyBG=t("<div />"),this.mainContainerStickyBG.addClass("stellar_vp_mainContainerStickyBG"),this.mainContainerStickyBG.hide(),this.mainContainer.append(this.mainContainerStickyBG),this.stickyControlsWrapp=t("<div />"),this.stickyControlsWrapp.addClass("stellar_vp_stickyControlsWrapp"),this.mainContainerStickyBG.append(this.stickyControlsWrapp),this.stickyCloseBtnWrapper=t("<div />").addClass("stellar_vp_stickyCloseBtnWrapper").addClass("stellar_vp_stickyElement").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){t(e.mainContainer).removeClass("stellar_vp_sticky"),e.mainContainerStickyBG.hide(),e.stickyClosedOnButton=!0,e.pause(),e.YTAPIReady&&e.youtubePlayer.pauseVideo(),e._playlist.vimeoPlayer&&e._playlist.vimeoPlayer.api("pause")}),this.stickyControlsWrapp.append(this.stickyCloseBtnWrapper),this.stickyCloseBtn=t("<span />").attr("aria-hidden","true").attr("id","stellar_vp_stickyCloseBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("fa-stellar-times-sticky"),this.stickyUpBtnWrapper=t("<div />").addClass("stellar_vp_stickyUpBtnWrapper").addClass("stellar_vp_stickyElement").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){return t("html, body").animate({scrollTop:0},"slow"),!1}),this.stickyControlsWrapp.append(this.stickyUpBtnWrapper),this.stickyUpBtn=t("<span />").attr("aria-hidden","true").attr("id","stellar_vp_stickyUpBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("fa-stellar-arrow-circle-up"),this.stickySeekBtnWrapper=t("<div />").addClass("stellar_vp_stickySeekBtnWrapper").addClass("stellar_vp_stickyElement").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){t(".Stellar_video_player").length&&t(".Stellar_video_player").get(0).scrollIntoView({behavior:"smooth"}),t("#Stellar_video_player").length&&t("#Stellar_video_player").get(0).scrollIntoView({behavior:"smooth"})}),this.stickyControlsWrapp.append(this.stickySeekBtnWrapper),this.stickySeekBtn=t("<span />").attr("aria-hidden","true").attr("id","stellar_vp_stickySeekBtn").addClass("fa-stellar").addClass("stellar-icon-general").addClass("fa-stellar-play-circle-o"),this.stickyUpBtnWrapper.append(this.stickyUpBtn),this.stickySeekBtnWrapper.append(this.stickySeekBtn),this.stickyCloseBtnWrapper.append(this.stickyCloseBtn)),this.element=t("<div />"),this.element.addClass("stellar_vp_videoPlayer"),this.mainContainer.append(this.element),this.ytWrapper=t("<div></div>"),this.ytWrapper.addClass("stellar_vp_ytWrapper"),this.element.append(this.ytWrapper),this.ytPlayer=t("<div></div>"),this.ytPlayer.attr("id",e.options.instanceName+"youtube"),this.ytWrapper.append(this.ytPlayer),this.imageWrapper=t("<div></div>"),this.imageWrapper.addClass("stellar_vp_imageWrapper"),this.element.append(this.imageWrapper),this.imageDisplayed=new Image,this.imageWrapper.append(this.imageDisplayed),t(".stellar_vp_imageWrapper img").attr("id","stellar_vp_imageDisplayed")},u.fn.setupElementAD=function(){this.elementAD=t("<div />"),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);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("<div></div>"),this.screenBtnsWindow.addClass("stellar_vp_screenBtnsWindow"),this.element&&this.element.append(this.screenBtnsWindow),this.options.showAllControls||this.screenBtnsWindow.hide(),this.infoBtn=t("<div />").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("<span />").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.sidebarBtn=t("<div />").addClass("stellar_vp_sidebarBtn").addClass("stellar_vp_playerElement").addClass("stellar_vp_btnOverScreen").addClass("stellar_vp_bg "+this.options.instanceTheme),this.mainContainer.append(this.sidebarBtn),this.sidebarBtnIcon=t("<span />").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("<div></div>"),this.shareWindow.addClass("stellar_vp_shareWindow"),this.shareWindow_mask=t("<div />"),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("<div />").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("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("fa-stellar-facebook"),this.facebookBtn.append(this.facebookBtnIcon),this.twitterBtn=t("<div />").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("<span />").attr("aria-hidden","true").addClass("fa-stellar").addClass("stellar-icon-overScreen").addClass("fa-stellar-twitter"),this.twitterBtn.append(this.twitterBtnIcon),this.mailBtn=t("<div />").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("<span />").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:e.sidebarBtn.width()+5})):(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.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("<div></div>"),this.controlsBtnsWrapperRight.addClass("stellar_vp_controlsBtnsWrapperRight"),this.controls.append(this.controlsBtnsWrapperRight),this.playBtnWrapper=t("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_controlsBtn_play").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.togglePlay()}),this.playBtn=t("<span />").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("<div />").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("<span />").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("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.toggleShareWindow(),e.toggleShareBtn()}),this.shareBtn=t("<span />").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("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){e.toggleEmbedWindow(),e.toggleEmbedBtn()}),this.embedBtn=t("<span />").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("<div />").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("<span />").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("<div />").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("<a />").attr("href",this._playlist.videos_array[this._playlist.videoid].video_path_mp4HD).attr("download","").hide(),this.downloadBtnWrapper=t("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(e.CLICK_EV,function(){}),this.downloadBtnLink.append(this.downloadBtnWrapper),this.downloadBtn=t("<span />").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("<div />"),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("<div />"),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("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement").bind(this.CLICK_EV,t.proxy(function(){this.toggleFullScreen()},this)),this.fsEnter=t("<span />"),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("<div />").addClass("stellar_vp_fsEnterADBox").hide(),this.elementAD.append(this.fsEnterADBox),this.fsEnterAD=t("<span />"),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)})},u.fn.createInfoWindow=function(){this.infoWindow=t("<div />"),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("<div />"),this.infoBtnClose.addClass("stellar_vp_btnClose stellar_vp_themeColorText"),this.infoWindow.append(this.infoBtnClose),this.infoBtnClose.css({bottom:0}),this.infoBtnCloseIcon=t("<span />").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("<div />"),this.qualityWindow_mask.addClass("stellar_vp_qualityWindowMask"),this.element&&this.element.append(this.qualityWindow_mask),this.qualityWindow=t("<div />"),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('<div class="stellar_vp_list"><div class="stellar_vp_qualityListItem stellar_vp_playerElement hd1080"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">1080p</p><p class="stellar_vp_qualityHD stellar-icon-general stellar_vp_qualityWindowText">HD</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement hd720"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">720p</p><p class="stellar_vp_qualityHD stellar-icon-general stellar_vp_qualityWindowText">HD</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement large"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">480p</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement medium"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">360p</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement small"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">240p</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement tiny"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">144p</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement default"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">auto</p></div></div>'),
this.qualityWindow_mask.css("height","170px")),"HTML5"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=this.options.videoType||(this.qualityWindow.append('<div class="stellar_vp_list"><div class="stellar_vp_qualityListItem stellar_vp_playerElement HD"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">HD</p><p class="stellar_vp_qualityHD stellar-icon-general stellar_vp_qualityWindowText">HD</p></div><div class="stellar_vp_qualityListItem stellar_vp_playerElement SD"><p class="stellar_vp_qualityNum stellar-icon-general stellar_vp_controlsColor stellar_vp_qualityWindowText '+this.options.instanceTheme+'">SD</p></div></div>'),this.qualityWindow_mask.css("height","50px")),this.qualityCheck=t("<span />").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("<div />"),this.embedWindow.addClass("stellar_vp_embedWindow stellar_vp_bg "+this.options.instanceTheme),this.element&&this.element.append(this.embedWindow),this.embedBtnClose=t("<div />"),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("<span />").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("<div />").addClass("stellar_vp_videoTrackWrapper").addClass("stellar_vp_playerElement"),this.controls.append(this.videoTrackWrapper),this.videoTrack=t("<div />"),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("<div />"),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("<div />"),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("<div />"),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("<div />"),this.progressADBg.addClass("stellar_vp_progressADBg").hide(),this.elementAD.append(this.progressADBg),this.progressAD=t("<div />"),this.progressAD.addClass("stellar_vp_progressAD"),this.progressADBg.append(this.progressAD),this.videoTrackDownload=t("<div />"),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("<div />"),this.videoTrackProgress.addClass("stellar_vp_Progress stellar_vp_themeColor"),this.videoTrackProgress.css("width",0),this.videoTrack.append(this.videoTrackProgress),this.toolTip=t("<div />").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-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-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&&"Interior Design"!=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("<div />"),this.volumeTrackWrapper.addClass("stellar_vp_volumeTrackWrapper").addClass("stellar_vp_playerElement"),this.controls.append(this.volumeTrackWrapper),this.volumeTrack=t("<div />"),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("<div />"),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("<div />"),this.toolTipVolume.addClass("stellar_vp_toolTipVolume"),this.toolTipVolume.hide(),this.toolTipVolume.css({opacity:0,bottom:50}),this.controls.append(this.toolTipVolume);var o=t("<div />");o.addClass("stellar_vp_toolTipTextVolume"),this.toolTipVolume.append(o);var a=t("<div />");a.addClass("stellar_vp_toolTipTriangleVolume"),this.toolTipVolume.append(a),this.unmuteBtnWrapper=t("<div />").addClass("stellar_vp_controlsBtn").addClass("stellar_vp_playerElement"),this._playlist.controlsBtnsWrapperLeft.append(this.unmuteBtnWrapper),this.unmuteBtn=t("<span />").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(),!s.options.autoplay||"HTML5"!=this._playlist.videos_array[this._playlist.videoid].videoType&&"HTML5 (self-hosted)"!=this.options.videoType||(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,s.options.autoplay&&(this.video.muted=!1,this.is_iOSVolumeButtonScreen&&(this.removeiOSAutoplay(),this.iOSVolumeButtonScreen.hide(),this.is_iOSVolumeButtonScreen=!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,s.options.autoplay&&(this.video.muted=!1,this.is_iOSVolumeButtonScreen&&(this.removeiOSAutoplay(),this.iOSVolumeButtonScreen.hide(),this.is_iOSVolumeButtonScreen=!1)))},this));var l,n;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"),l=s.isMobile.any()?e.originalEvent.changedTouches[0].pageX-s.volumeTrackWrapper.offset().left:e.pageX-s.volumeTrackWrapper.offset().left,s.volPerc=l/(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:l},200),s.muted=!1,t(document).bind(s.MOVE_EV,function(t){n=s.isMobile.any()?t.originalEvent.changedTouches[0].pageX-s.volumeTrackWrapper.offset().left:t.pageX-s.volumeTrackWrapper.offset().left,l!=n&&(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()))}),s.muted=!1,s.video.muted=!1,s.videoElement.removeAttr("muted")}),t(document).bind(s.END_EV,function(){t(document).unbind(s.MOVE_EV)})},u.fn.setupTiming=function(){var e=this;this.timeElapsed=t("<div />"),this.timeTotal=t("<div />"),this.timeLeftInside=t("<div />"),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("<div />"),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("<div />"),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("<div />").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&&void 0!=this.nextVideoBoxTitle&&(this.nextVideoBoxTitle.html(""),e>i._playlist.videos_array.length-1?this.nextVideoBoxTitle.append('<p class="stellar_vp_nextVideoBoxTitle">'+i._playlist.videos_array[e].title+"</p>"):e==i._playlist.videos_array.length-1?this.nextVideoBoxTitle.append('<p class="stellar_vp_nextVideoBoxTitle">'+i._playlist.videos_array[0].title+"</p>"):this.nextVideoBoxTitle.append('<p class="stellar_vp_nextVideoBoxTitle">'+i._playlist.videos_array[e+1].title+"</p>"),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}),t("iframe#"+i.options.instanceName).attr("src",""),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}),t("iframe#"+i.options.instanceName).attr("src",""),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}),i.isMobile.any()?t("#"+i.options.instanceName).attr("src","https://player.vimeo.com/video/"+i._playlist.videos_array[e].vimeoID+"?autoplay=1?api=1&player_id="+i.options.instanceName+"&color="+i.options.vimeoColor):t("#"+i.options.instanceName).attr("src","https://player.vimeo.com/video/"+i._playlist.videos_array[e].vimeoID+"?autoplay=1?api=1&player_id="+i.options.instanceName+"&color="+i.options.vimeoColor),t("#"+i.options.instanceName).on("load",function(){i.preloader.stop().animate({opacity:0},200,function(){t(this).hide()})}),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"}),i.preloader&&i.preloader.stop().animate({opacity:1},0,function(){t(this).show()}),t(i.imageDisplayed).fadeOut("slow",function(){t(i.imageDisplayed).src="#",t(i.imageDisplayed).removeAttr("src"),i.imageDisplayed.src=i._playlist.videos_array[e].imageUrl,t(i.imageDisplayed).on("load",function(){t(i.imageDisplayed).fadeIn("slow",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.toggleAutoplayBtnEnabled&&(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("stellar_vp_RTL"),this.mainContainer.find(".stellar_vp_description").addClass("stellar_vp_RTL"),this.mainContainer.find(".stellar_vp_infoTitle").addClass("stellar_vp_RTL"),this.mainContainer.find(".stellar_vp_infoText").addClass("stellar_vp_RTL"),this.mainContainer.find(".stellar_vp_nowPlayingText").addClass("stellar_vp_RTL"),this.mainContainer.find(".stellar_vp_embedTitle2").addClass("stellar_vp_RTL"),this.mainContainer.find(".stellar_vp_embedTitle3").addClass("stellar_vp_RTL");break;case"LTL":this.mainContainer.find(".stellar_vp_title").addClass("stellar_vp_LTR"),this.mainContainer.find(".stellar_vp_description").addClass("stellar_vp_LTR"),this.mainContainer.find(".stellar_vp_infoTitle").addClass("stellar_vp_LTR"),this.mainContainer.find(".stellar_vp_infoText").addClass("stellar_vp_LTR"),this.mainContainer.find(".stellar_vp_nowPlayingText").addClass("stellar_vp_LTR"),this.mainContainer.find(".stellar_vp_embedTitle2").addClass("stellar_vp_LTR"),this.mainContainer.find(".stellar_vp_embedTitle3").addClass("stellar_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);
// source --> https://www.mallorca360.es/wp-content/plugins/Stellar-video-player/js/iphone-inline-video.min.js?ver=2.1 
var enableInlineVideo=function(){"use strict";function e(e,i,n,r){function t(n){d=i(t,r),e(n-(a||n)),a=n}var d,a;return{start:function(){d||t(0)},stop:function(){n(d),d=null,a=0}}}function i(i){return e(i,requestAnimationFrame,cancelAnimationFrame)}function n(e,i,n,r){function t(i){Boolean(e[n])===Boolean(r)&&i.stopImmediatePropagation(),delete e[n]}return e.addEventListener(i,t,!1),t}function r(e,i,n,r){function t(){return n[i]}function d(e){n[i]=e}r&&d(e[i]),Object.defineProperty(e,i,{get:t,set:d})}function t(e,i,n){n.addEventListener(i,function(){return e.dispatchEvent(new Event(i))})}function d(e,i){Promise.resolve().then(function(){e.dispatchEvent(new Event(i))})}function a(e){var i=new Audio;return t(e,"play",i),t(e,"playing",i),t(e,"pause",i),i.crossOrigin=e.crossOrigin,void 0!=e.childNodes[0]&&(i.src=e.childNodes[0].src||e.currentSrc||"data:"),i}function o(e,i,n){(h||0)+200<Date.now()&&(e[b]=!0,h=Date.now()),n||(e.currentTime=i),w[++T%3]=100*i|0}function u(e){return e.driver.currentTime>=e.video.duration}function s(e){var i=this;i.video.readyState>=i.video.HAVE_FUTURE_DATA?(i.hasAudio||(i.driver.currentTime=i.video.currentTime+e*i.video.playbackRate/1e3,i.video.loop&&u(i)&&(i.driver.currentTime=0)),o(i.video,i.driver.currentTime)):i.video.networkState===i.video.NETWORK_IDLE&&0===i.video.buffered.length&&i.video.load(),i.video.ended&&(delete i.video[b],i.video.pause(!0))}function c(){var e=this,i=e[y];return e.webkitDisplayingFullscreen?void e[g]():("data:"!==i.driver.src&&0===e.buffered.length&&(o(e,0,!0),i.driver.src=e.childNodes[0].src),void(e.paused&&(i.paused=!1,0===e.buffered.length&&e.load(),i.driver.play(),i.updater.start(),i.hasAudio||(d(e,"play"),i.video.readyState>=i.video.HAVE_ENOUGH_DATA&&d(e,"playing")))))}function v(e){var i=this,n=i[y];n.driver.pause(),n.updater.stop(),i.webkitDisplayingFullscreen&&i[E](),n.paused&&!e||(n.paused=!0,n.hasAudio||d(i,"pause"),i.ended&&(i[b]=!0,d(i,"ended")))}function l(e,n){var r=e[y]={};r.paused=!0,r.hasAudio=n,r.video=e,r.updater=i(s.bind(r)),n?r.driver=a(e):(e.addEventListener("canplay",function(){e.paused||d(e,"playing")}),r.driver={src:e.childNodes[0].src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){r.driver.paused=!0},play:function(){r.driver.paused=!1,u(r)&&o(e,0)},get ended(){return u(r)}}),e.addEventListener("emptied",function(){var i=!r.driver.src||"data:"===r.driver.src;r.driver.src&&r.driver.src!==e.childNodes[0].src&&(o(e,0,!0),r.driver.src=e.childNodes[0].src,i?r.driver.play():r.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?n&&0===r.driver.buffered.length&&r.driver.load():(e.pause(),e[g]())}),n&&(e.addEventListener("webkitendfullscreen",function(){r.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){w.indexOf(100*e.currentTime|0)<0&&(r.driver.currentTime=e.currentTime)}))}function p(e){var i=e[y];e[g]=e.play,e[E]=e.pause,e.play=c,e.pause=v,r(e,"paused",i.driver),r(e,"muted",i.driver,!0),r(e,"playbackRate",i.driver,!0),r(e,"ended",i.driver),r(e,"loop",i.driver,!0),n(e,"seeking"),n(e,"seeked"),n(e,"timeupdate",b,!1),n(e,"ended",b,!1)}function f(e,i){if(void 0===i&&(i={}),!e[y]){if(!i.everywhere){if(!m)return;if(!(i.iPad||i.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}!e.paused&&e.webkitDisplayingFullscreen&&e.pause(),l(e,!e.muted),p(e),e.classList.add("IIV"),e.muted&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}}var h,m="object"==typeof document&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,y="bfred-it:iphone-inline-video",b="bfred-it:iphone-inline-video:event",g="bfred-it:iphone-inline-video:nativeplay",E="bfred-it:iphone-inline-video:nativepause",w=[],T=0;return f}();
// source --> https://www.mallorca360.es/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.7.0-wc.10.9.4 
/*!
 * jQuery blockUI plugin
 * Version 2.70.0-2014.11.23
 * Requires jQuery v1.7 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2013 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
!function(){"use strict";function e(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},o=/MSIE/.test(navigator.userAgent),n=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,"function"==typeof document.createElement("div").style.setExpression&&document.createElement("div").style.setExpression);e.blockUI=function(e){d(window,e)},e.unblockUI=function(e){a(window,e)},e.growlUI=function(t,o,n,i){var s=e('<div class="growlUI"></div>');t&&s.append("<h1>"+t+"</h1>"),o&&s.append("<h2>"+o+"</h2>"),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.on("mouseover",function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).on("mouseout",function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var o=e.extend({},e.blockUI.defaults,t||{});return this.each(function(){var t=e(this);o.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,d(this,t)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){a(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var s=null,l=[];function d(d,c){var u,b,h=d==window,k=c&&c.message!==undefined?c.message:undefined;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(d).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),u=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),b=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),k=k===undefined?c.message:k,h&&s&&a(window,{fadeOut:0}),k&&"string"!=typeof k&&(k.parentNode||k.jquery)){var y=k.jquery?k[0]:k,m={};e(d).data("blockUI.history",m),m.el=y,m.parent=y.parentNode,m.display=y.style.display,m.position=y.style.position,m.parent&&m.parent.removeChild(y)}e(d).data("blockUI.onUnblock",c.onUnblock);var g,v,I,w,U=c.baseZ;g=o||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+U+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),v=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+U+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+U+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&h?(w='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(U+10)+';display:none;position:fixed">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):c.theme?(w='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(U+10)+';display:none;position:absolute">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):w=h?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(U+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(U+10)+';display:none;position:absolute"></div>',I=e(w),k&&(c.theme?(I.css(b),I.addClass("ui-widget-content")):I.css(u)),c.theme||v.css(c.overlayCSS),v.css("position",h?"fixed":"absolute"),(o||c.forceIframe)&&g.css("opacity",0);var x=[g,v,I],C=e(h?"body":d);e.each(x,function(){this.appendTo(C)}),c.theme&&c.draggable&&e.fn.draggable&&I.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var S=i&&(!e.support.boxModel||e("object,embed",h?null:d).length>0);if(n||S){if(h&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(n||!e.support.boxModel)&&!h)var E=p(d,"borderTopWidth"),O=p(d,"borderLeftWidth"),T=E?"(0 - "+E+")":0,M=O?"(0 - "+O+")":0;e.each(x,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)h?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),h?o.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),M&&o.setExpression("left",M),T&&o.setExpression("top",T);else if(c.centerY)h&&o.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),o.marginTop=0;else if(!c.centerY&&h){var n="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';o.setExpression("top",n)}})}if(k&&(c.theme?I.find(".ui-widget-content").append(k):I.append(k),(k.jquery||k.nodeType)&&e(k).show()),(o||c.forceIframe)&&c.showOverlay&&g.show(),c.fadeIn){var B=c.onBlock?c.onBlock:t,j=c.showOverlay&&!k?B:t,H=k?B:t;c.showOverlay&&v._fadeIn(c.fadeIn,j),k&&I._fadeIn(c.fadeIn,H)}else c.showOverlay&&v.show(),k&&I.show(),c.onBlock&&c.onBlock.bind(I)();if(r(1,d,c),h?(s=I[0],l=e(c.focusableElements,s),c.focusInput&&setTimeout(f,20)):function(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-p(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-p(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0");o&&(i.top=l>0?l+"px":"0")}(I[0],c.centerX,c.centerY),c.timeout){var z=setTimeout(function(){h?e.unblockUI(c):e(d).unblock(c)},c.timeout);e(d).data("blockUI.timeout",z)}}}function a(t,o){var n,i,d=t==window,a=e(t),u=a.data("blockUI.history"),f=a.data("blockUI.timeout");f&&(clearTimeout(f),a.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),r(0,t,o),null===o.onUnblock&&(o.onUnblock=a.data("blockUI.onUnblock"),a.removeData("blockUI.onUnblock")),i=d?e(document.body).children().filter(".blockUI").add("body > .blockUI"):a.find(">.blockUI"),o.cursorReset&&(i.length>1&&(i[1].style.cursor=o.cursorReset),i.length>2&&(i[2].style.cursor=o.cursorReset)),d&&(s=l=null),o.fadeOut?(n=i.length,i.stop().fadeOut(o.fadeOut,function(){0==--n&&c(i,u,o,t)})):c(i,u,o,t)}function c(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function r(t,o,n){var i=o==window,l=e(o);if((t||(!i||s)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).on(d,n,u):e(document).off(d,u)}}function u(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&s&&t.data.constrainTabKey){var o=l,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){f(i)},10),!1}var d=t.data,a=e(t.target);return a.hasClass("blockOverlay")&&d.onOverlayClick&&d.onOverlayClick(t),a.parents("div."+d.blockMsgClass).length>0||0===a.parents().children().filter("div.blockUI").length}function f(e){if(l){var t=l[!0===e?l.length-1:0];t&&t.trigger("focus")}}function p(t,o){return parseInt(e.css(t,o),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();