=o.digitsPreffix+o.digits+o.digitsSuffix,o.currentImage.src=o.currentUrl,o.callback&&(Self.callbackData(),o.callback(data))},Self.changeIndex=function(e){o.digits=e*o.incrementer+parseInt(o.firstThumbnail,10),o.index=e,Self.callbackData()},Self.pauseFlip=function(){window.clearTimeout(timer),o.status="paused"}};
var MG_Scroll={init:function(e){MG_Scroll._isPlainObject(e)&&MG_Scroll._setupElements(MG_Scroll._extend({},{width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0,alwaysVisible:!0,disableFadeOut:!0,railVisible:!0,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"scrollRail",barClass:"scrollBar",wrapperClass:"scrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px",selector:null,horizontal:!1,wrapperStylePosition:"relative"},e))},_extend:function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var l in arguments[t])arguments[t].hasOwnProperty(l)&&(e[l]=arguments[t][l]);return e},_fadeIn:function(e){var t,l=10*+MG_Scroll._getStyle(e,"opacity");clearInterval(t),t=setInterval(function(){l<4?(l++,e.style.opacity=(l/10).toFixed(1)):(clearInterval(t),t=0)},50)},_fadeOut:function(e){var t,l=10*+MG_Scroll._getStyle(e,"opacity");clearInterval(t),t=setInterval(function(){0<l?(l--,e.style.opacity=(l/10).toFixed(1)):(clearInterval(t),t=0)},100)},_closestClassElement:function(e,t){for(;e.className!=t;)if(!(e=e.parentNode))return null;return e},_getStyle:function(e,t){return window.getComputedStyle?getComputedStyle(e,"")[t]:e.currentStyle?e.currentStyle[t]:void 0},_isPlainObject:function(e){if(!e||e.nodeType||"undefined"!=typeof jQuery&&jQuery.isWindow(e))return!1;try{if(e.constructor&&!core_hasOwn.call(e,"constructor")&&!core_hasOwn.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!0}if("undefined"!=typeof jQuery&&jQuery.support.ownLast)for(var t in e)return core_hasOwn.call(e,t);for(t in e);return void 0===t||core_hasOwn.call(e,t)},isWindow:function(e){return e&&(e===function(){return this}()||e.eval&&e.eval.call&&e.eval("this === (function(){ return this })()"))||!1},_makeUnselectable:function(e){(e="string"==typeof e?document.getelentById(e):e)&&(e.onselectstart=function(){return!1},e.style.MozUserSelect="none",e.style.KhtmlUserSelect="none",e.unselectable="on")},_getOffset:function(e,t){var l=e.ownerDocument&&e.ownerDocument.defaultView&&e.ownerDocument.defaultView.getComputedStyle&&e.ownerDocument.defaultView.getComputedStyle(e,null),o=l&&l.getPropertyValue(t?"height":"width")||"";return o=o&&-1<o.indexOf(".")?parseFloat(o)+parseInt(l.getPropertyValue(t?"padding-top":"padding-left"))+parseInt(l.getPropertyValue(t?"padding-bottom":"padding-right"))+parseInt(l.getPropertyValue(t?"border-top-width":"border-left-width"))+parseInt(l.getPropertyValue(t?"border-bottom-width":"border-right-width")):t?e.offsetHeight:e.offsetWidth},_outerHeight:function(e){var t=MG_Scroll._getOffset(e,!0),l=MG_Scroll._getStyle(e,"marginTop"),e=MG_Scroll._getStyle(e,"marginBottom");return t+=parseInt(l)+parseInt(e)},_outerWidth:function(e){var t=MG_Scroll._getOffset(e),l=MG_Scroll._getStyle(e,"marginLeft"),e=MG_Scroll._getStyle(e,"marginRight");return t+=parseInt(l)+parseInt(e)},_wrap:function(e,t){return t=t||document.createElement("div"),e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t.appendChild(e)},_setupElements:function(e){el=e.selector;for(var t=0;t<el.length;t++)MG_Scroll._processElement(el[t],e)},_processElement:function(e,a){var o,t,r,l,i,s,n,d,c,u,h=30,p=!1,f=e;if(MG_Utils.hasClass(f.parentNode,a.wrapperClass)){var y,e=a.horizontal?f.scrollLeft:f.scrollTop,g=(MG_Utils.children(f.parentNode),document.querySelectorAll("."+a.barClass)[0]),_=document.querySelectorAll("."+a.railClass)[0];if(w(),MG_Scroll._isPlainObject(a)){if(!a.horizontal&&"height"in a&&"auto"==a.height?(f.parentNode.style.height="auto",f.style.height="auto",y=f.parentNode.parentNode.style.height,f.parentNode.style.height=y,f.style.height=y):"height"in a&&(y=a.height,f.parentNode.style.height=y,f.style.height=y),"scrollTo"in a)e=parseInt(a.scrollTo);else if("scrollBy"in a)e+=parseInt(a.scrollBy);else if("bottom"===a.start)e=5e3;else if("destroy"in a)return;v(e,!1,!0)}}else MG_Scroll._isPlainObject(a)&&"destroy"in a||(a.horizontal?a.width="auto"==a.width?f.parentNode.clientWidth:a.width:a.height="auto"==a.height?f.parentNode.clientHeight+"px":a.height,(y=document.createElement("div")).className+=a.wrapperClass,y.style.position=a.wrapperStylePosition,y.style.overflow="hidden",y.style.width=a.width,y.style.height=a.height,f.style.overflow="hidden",f.style.width=a.width,f.style.height=a.height,(_=document.createElement("div")).className+=a.railClass,_.style.position="absolute",_.style.display=a.alwaysVisible&&a.railVisible?"block":"none",_.style.borderRadius=a.railBorderRadius,_.style.background=a.railColor,_.style.opacity=a.railOpacity,_.style.zIndex=90,a.horizontal?(_.style.width="100%",_.style.height=a.size,_.style.bottom=0):(_.style.width=a.size,_.style.height="100%",_.style.top=0),(g=document.createElement("div")).className+=a.barClass,g.style.background=a.color,g.style.position="absolute",g.style.opacity=a.opacity,g.style.display=a.alwaysVisible?"block":"none",g.style.borderRadius=a.borderRadius,g.style.BorderRadius=a.borderRadius,g.style.MozBorderRadius=a.borderRadius,g.style.WebKitBorderRadius=a.borderRadius,g.style.zIndex=99,a.horizontal?(g.style.height=a.size,g.style.left=0,g.style.bottom=0):(g.style.top=0,g.style.width=a.size,"right"==a.position?(_.style.right=0,g.style.right=0):(_.style.left=0,g.style.left=0)),MG_Scroll._wrap(f,y),f.parentNode.appendChild(g),f.parentNode.appendChild(_),a.railDraggable&&(c=d="",u=f.clientHeight,f.addEventListener("touchstart",function(e){d=a.horizontal?e.touches[0].clientX:e.touches[0].clientY,c=a.horizontal?parseInt(g.style.left):parseInt(g.style.top)},{passive:!0}),f.addEventListener("touchmove",function(e){var t=a.horizontal?e.touches[0].clientX:e.touches[0].clientY,t=d+c-t;0<=t&&t<=u&&e.cancelable&&e.stopPropagation(),v(t,!0,!0)},{passive:!0}),MG_Utils.addEventHandler(g,"mousedown",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,r=!0;var t=a.horizontal?e.clientX:e.clientY,l=a.horizontal?parseInt(g.style.left):parseInt(g.style.top);function o(e){e=a.horizontal?e.clientX:e.clientY;v(l+e-t,!0,!0)}return MG_Utils.addEventHandler(document,"mousemove",o),MG_Utils.addEventHandler(document,"mouseup",function(e){r=!1,M(),MG_Utils.removeEventHandler(document,"mousemove",o)}),!1})),MG_Utils.addEventHandler(_,"mouseenter",function(){S()}),MG_Utils.addEventHandler(_,"mouseleave",function(){M()}),MG_Utils.addEventHandler(g,"mouseenter",function(){t=!0,a.horizontal?g.style.height="10px":g.style.width="10px"}),MG_Utils.addEventHandler(g,"mouseleave",function(){t=!1,a.horizontal?g.style.height=a.size:g.style.width=a.size}),MG_Utils.addEventHandler(f,"mouseenter",function(){o=!0,S()}),MG_Utils.addEventHandler(f,"mouseleave",function(){o=!1,M()}),w(),"bottom"===a.start?v(a.horizontal?f.offsetWidth-g.offsetWidth:f.offsetHeight-g.offsetHeight,!0,!0):"top"!==a.start&&(v(a.start,null,!0),a.alwaysVisible||(g.style.display="none")),(e=f)&&(e.addEventListener("DOMMouseScroll",m,{passive:!1}),e.addEventListener("mousewheel",m,{passive:!1})),this.showDefault=function(){S()});function m(e){var t,l;o&&(t=0,(e=e||window.event).wheelDelta&&(t=-e.wheelDelta/120),e.detail&&(t=e.detail/3),l=e.target||e.srcTarget||e.srcElement,MG_Scroll._closestClassElement(l,a.wrapperClass)==f.parentNode&&v(t,!0,!1),e.preventDefault&&!p&&e.preventDefault(),p||(e.returnValue=!1))}function v(e,t,l){p=!1;var o=e,r=a.horizontal?MG_Scroll._getOffset(f):MG_Scroll._getOffset(f,!0),i=a.horizontal?MG_Scroll._getOffset(g):MG_Scroll._getOffset(g,!0),r=r-i;function n(e){a.horizontal?g.style.left=e+"px":g.style.top=e+"px"}t&&(o=a.horizontal?parseInt(g.style.left)+e*parseInt(a.wheelStep)/100*i:parseInt(g.style.top)+e*parseInt(a.wheelStep)/100*i,o=Math.min(Math.max(o,0),r),n(o=0<e?Math.ceil(o):Math.floor(o))),l&&(n(e),(t=Math.min(Math.max(e,0),r))<=e&&n(t),e<=0)&&n(0),a.horizontal?(i=MG_Scroll._outerWidth(f),o=(s=parseInt(g.style.left)/(i-MG_Scroll._outerWidth(g)))*(f.scrollWidth-i),f.scrollLeft=o):(l=MG_Scroll._outerHeight(f),o=(s=parseInt(g.style.top)/(l-MG_Scroll._outerHeight(g)))*(f.scrollHeight-l),f.scrollTop=o),S(),M()}function w(){var e;e=a.horizontal?(n=Math.max(f.offsetWidth/f.scrollWidth*f.offsetWidth,h),g.style.width=n+"px",n==f.offsetWidth?"none":"block"):(i=Math.max(f.offsetHeight/f.scrollHeight*f.offsetHeight,h),g.style.height=i+"px",i==f.offsetHeight?"none":"block"),g.style.display=e}function S(){if(w(),clearTimeout(l),p=s==~~s&&a.allowPageScroll,a.horizontal){if(n>=f.offsetWidth)return void(p=!0)}else if(i>=f.offsetHeight)return void(p=!0);MG_Scroll._fadeIn(g),a.railVisible&&MG_Scroll._fadeIn(_)}function M(){a.alwaysVisible||(l=setTimeout(function(){a.disableFadeOut&&o||t||r||(MG_Scroll._fadeOut(g),MG_Scroll._fadeOut(_))},1500))}}};
var dropdown=function(){"use strict";var instance=null,dropdowns=[],id=0,dontProcess=!1;function Dropdown(options){var defaults={dropdownTrigger:"dropdownTrigger",dropdownWrapper:"dropdownWrapper",timeout:4e3,hideDelay:!0};this.options=MG_Utils.extendDefaults(defaults,options),this.wrapper=this.options.wrapper,this.selector=this.options.selector,this.additionalElements=document.querySelectorAll(eval(this.options.additionalElements)),this.triggers=this.wrapper.querySelectorAll("."+this.options.dropdownTrigger),this.dropdown=this.wrapper.querySelector("."+this.options.dropdownWrapper),this.hiddenValue=this.wrapper.querySelector('input[type="hidden"]'),this.activateCloseDelay=hideDelayed.call(this),this.closeCallback="function"==typeof this.options.closeCallback?this.options.closeCallback:"",_init.call(this)}function _init(){return!(!this.triggers||!this.dropdown||MG_Utils.hasClass(this.wrapper,"js_dropdownBound"))&&(MG_Utils.addClass(this.wrapper,"js_dropdownBound"),_initEvents.call(this),_checkHiddenValue.call(this),void this.wrapper.setAttribute("data-dropdown-id",id++))}function _initEvents(){var t=this;[].forEach.call(this.triggers,function(e){MG_Utils.addEventHandler(e,"click",function(e){_triggersHandler.call(t,e)}),MG_Utils.hasClass(e,"js-accessibleDropdown")&&MG_Utils.addEventHandler(e,"keypress",function(e){_triggersHandler.call(t,e)})}),("string"==typeof this.selector&&".channelsAZ"!=this.selector||"object"==typeof this.selector&&!MG_Utils.hasClass(this.wrapper,"channelsAZ"))&&("string"==typeof this.selector&&".alphabetFilter"!=this.selector||"object"==typeof this.selector&&!MG_Utils.hasClass(this.wrapper,"alphabetFilter"))&&this.options.hideDelay&&this.activateCloseDelay(),MG_Utils.addEventHandler(this.dropdown,"click",function(e){_dropdownHandler.call(t,e)})}function _nextDivSibling(e){for(;(e=e.nextSibling)&&1!==e.nodeType&&e.tagName&&"div"===e.tagName.toLowerCase(););return e}function _triggersHandler(e){var t=null;if(dontProcess)dontProcess=!1;else{var o=(e=e||window.event).target||e.srcElement;if(!MG_Utils.hasClass(o,this.options.dropdownTrigger))for(;(o=o.parentElement)&&!MG_Utils.hasClass(o,this.options.dropdownTrigger););var i=!1,n="withScroll"==this.dropdown.id?1:0;1==this.triggers.length?i=!(!this.dropdown.style.display||"none"===this.dropdown.style.display):1<this.triggers.length&&(i=!(!this.dropdown.style.display||"none"===this.dropdown.style.display)&&this.dropdown.getAttribute("data-type")==o.getAttribute("data-type")),i?(this.dropdown.style.display="none",(i=MG_Utils.closest(this.dropdown,".dropdownTrigger"))&&MG_Utils.toggleClass(i,"active"),n&&(t=_nextDivSibling(this.dropdown))&&void 0!==t.style&&(t.style.display="none")):(dropdowns.forEach(function(e){e.dropdown.style.display="none";e=MG_Utils.closest(e.dropdown,".dropdownTrigger");e&&MG_Utils.hasClass(e,"active")&&MG_Utils.removeClass(e,"active")}),o.getAttribute("data-type")&&(this.dropdown.getAttribute("data-type"),o.getAttribute("data-type")),this.dropdown.style.display="block",(i=MG_Utils.closest(this.dropdown,".dropdownTrigger"))&&MG_Utils.toggleClass(i,"active"),_notificationPosition.call(this,e))}}function _notificationPosition(e){var t,o,i,e=e.target||e.srcElement;"notificationIcons"!=e.parentNode.getAttribute("id")&&"notificationIcons"!=e.parentNode.parentNode.getAttribute("id")||(e=e.querySelector("i")||e.parentNode.querySelector("i"),o=(t=document.querySelector("#notificationBox")).clientWidth/2,i=MG_Utils.offset(e).left,e=e.clientWidth/2,t.style.left=Math.round(i-o+e)+"px")}function _dropdownHandler(e){var t=(e=e||window.event).target||e.srcElement;if("li"!==t.tagName.toLowerCase())for(;(t=t.parentElement)&&"li"!==t.tagName.toLowerCase(););this.setItem(t)}function _checkHiddenValue(){this.hiddenValue&&this.hiddenValue.length&&""!=this.hiddenValue.value&&(_selectActiveItem.call(this)||setTimeout(function(){_selectActiveItem.apply(context)},1e3))}function _selectActiveItem(){var e=this.dropdown.querySelector('li[data-value="'+this.hiddenValue_.value+'"]');if(!e.length)return!1;MG_Utils.triggerEvent(e,"click"),dontProcess=!0}Dropdown.prototype={constructor:Dropdown,setItem:function(e){var t,o=this.wrapper.querySelector(".dropdownTrigger .textFilter");if(isNaN(e)||(0|(t=parseFloat(e)))!==t||(e=this.dropdown.querySelectorAll("li")[e]),!("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName))return!1;MG_Utils.removeClassMultiple(this.dropdown.querySelectorAll("li"),"active"),MG_Utils.addClass(e,"active"),o&&MG_Utils.setText(o,e.textContent||e.innerText),this.hiddenValue&&(this.hiddenValue.value=e.getAttribute("data-value"))}};var hideDelayed=function(){var i=this;function o(){i.dropdown.getAttribute("data-hideDelayedTimeoutId")&&(clearTimeout(parseInt(MG_Utils.getData(i.dropdown,"hideDelayedTimeoutId"))),MG_Utils.setData(i.dropdown,"hideDelayedTimeoutId",""))}return function(){for(var e=[],t=0;t<=i.triggers.length-1;t++)e.push(i.triggers[t]);e.push(i.dropdown),e.forEach(function(e){MG_Utils.addEventHandler(e,"mouseenter",function(e){MG_Utils.setData(i.dropdown,"hideDelayedOver","1"),o(i.dropdown)}),MG_Utils.addEventHandler(e,"mouseleave",function(e){MG_Utils.setData(i.dropdown,"hideDelayedOver","0"),o(i.dropdown);var t=setTimeout(function(){if("0"==MG_Utils.getData(i.dropdown,"hideDelayedOver")){for(var e,t=[],o=0;o<=i.additionalElements.length-1;o++)t.push(i.additionalElements[o]);t.push(i.dropdown),t.forEach(function(e){e.style.display="none";e=document.querySelector(".dropdownTrigger.active");e&&MG_Utils.removeClass(e,"active")}),document.getElementById("withScroll")&&(e=_nextDivSibling())&&void 0!==e.style&&(e.style.display="none"),"function"==typeof i.closeCallback&&i.closeCallback(),clearTimeout(parseInt(MG_Utils.getData(i.dropdown,"hideDelayedTimeoutId"))),MG_Utils.setData(i.dropdown,"hideDelayedTimeoutId","")}},i.options.timeout);MG_Utils.setData(i.dropdown,"hideDelayedTimeoutId",t)})})}};return MG_Utils.addEventHandler(document,"click",function(e){var t=(e=e||window.event).target||e.srcElement;if(MG_Utils.closest(t,".dropdownTrigger")||(e=document.querySelector(".dropdownTrigger.active"))&&MG_Utils.removeClass(e,"active"),!MG_Utils.hasClass(t,"dropdownTrigger"))for(;(t=t.parentElement)&&!MG_Utils.hasClass(t,"dropdownTrigger"););dropdowns.forEach(function(e){if(t&&t.parentNode.querySelector(".dropdownWrapper")===e.dropdown)return!1;e.dropdown.style.display="none"})}),{init:function(t,o){var o=o||{},e="object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName,e=t instanceof Array||e?t:document.querySelectorAll(t);[].forEach.call(e,function(e){o.wrapper=e,o.selector=t,(instance=new Dropdown(o)).triggers&&instance.dropdown&&dropdowns.push(instance)})},get:function(e){return dropdowns[e]}}}();function filterableDropDown(e,t){var n=document.querySelector(".js-languages"),r="displayNone";e=e.target,e=MG_Utils.closest(e,".dropDownColumn")&&MG_Utils.closest(e,".dropDownColumn");if(e&&MG_Utils.hasClass(e,"js-filterable"))switch(t){case"mouseleave":case"click":n&&(n.value="",MG_Utils.addClass(n,r));break;case"mouseenter":var o=0<document.querySelectorAll(".dropDownColumn.js-filterable .dropDown li").length&&document.querySelectorAll(".dropDownColumn.js-filterable .dropDown li");if(n&&(MG_Utils.removeClass(n,r),n.addEventListener("keyup",function(){var e=n.value.toUpperCase(),t=document.querySelector(".dropDownColumn.js-filterable .dropDown")&&document.querySelector(".dropDownColumn.js-filterable .dropDown"),o=t&&0<t.querySelectorAll("li").length&&t.querySelectorAll("li");if(o)for(i=0;i<o.length;i++)-1<(txtValue=o[i].innerText).toUpperCase().indexOf(e)?MG_Utils.removeClass(o[i],r):MG_Utils.addClass(o[i],r)})),o)for(i=0;i<o.length;i++)MG_Utils.removeClass(o[i],r)}}
let Autocomplete_var={timer:null,value:null,name:null,matches:0,type:null,originalVal:null};var autocompleteSearch=function(){"use strict";var e;function s(e){let t=this.input.value.replace(/^[ \t]+|[ \t]+$/gi,""),s=this.input.getAttribute("placeholder");var i;return""!=(t=t.replace(/[\.,'/:=\(\)&!\?@\[\]"\*\$#%\^;\|`\\~><¿\{\}]/gi," ").replace(/[éèëê]/gi,"e").replace(/[äàâ]/gi,"a").replace(/[îï]/gi,"i").replace(/ô/gi,"o").replace(/[üùû]/gi,"u").replace(/ç/gi,"c").replace(/【/gi,"").replace(/】/gi,"").replace(/〈/gi,"").replace(/〉/gi,"").replace(/〖/gi,"").replace(/〗/gi,"").replace(/（/gi,"").replace(/）/gi,"").replace(/　/gi,"").replace(/〔/gi,"").replace(/〕/gi,"").replace(/『/gi,"").replace(/』/gi,"").replace(/］/gi,"").replace(/［/gi,""))&&t!=s&&(RecentSearches.add(t),i=S.call(this,t,Autocomplete_var.type),window.location=i),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}function i(e){var t,s=RegExp(/[\<\>]/gi),i=this.input.value.match(s),s=this.input.value.replace(s,""),e=e.keyCode||e.charCode,n=this,r=this.input.value.trim(),a=Autocomplete_var.type,l=!1;if("38"==e||"40"==e||"13"==e)return!1;if(this.term&&this.term==r)return n.searchesWrapper.style.display="none",!(n.suggestionsList.style.display="block");for(t in i&&(this.input.value=s),"13"!=e||"undefined"!=typeof arrowKeysSelected||MG_Utils.hasClass(this.form,"onHold")||"hd"==this.input.value.toLowerCase()&&"video"==Autocomplete_var.type&&(window.location="/hd"),0<this.input.value.length?(this.clearInput&&MG_Utils.removeClass(this.clearInput,"hidden"),this.inputLabel&&MG_Utils.addClass(this.inputLabel,"extraPadding")):(this.clearInput&&MG_Utils.addClass(this.clearInput,"hidden"),this.inputLabel&&MG_Utils.removeClass(this.inputLabel,"extraPadding")),this.term=r,Autocomplete_var.originalVal=r,this.cache=this.input.getAttribute("data-autocomplete-cache")||{},"object"!=typeof this.cache&&(this.cache=JSON.parse(this.cache)),void 0===this.cache[a]&&(this.cache[a]={}),this.cache[a])this.term==t&&(response(this.cache[a][t]),l=!0);if(l)return!1;"Video"!==a&&MG_Utils.addClass(n.trendingListWrapper,"hidden"),this.input.value.length<this.options.minLength?(Autocomplete_var.value="",clearTimeout(Autocomplete_var.timer),Autocomplete_var.matches=0,this.suggestionsList.style.display="none",c.call(this),o.call(this)):this.input.value===Autocomplete_var.value&&Autocomplete_var.type===Autocomplete_var.name||(Autocomplete_var.value=this.input.value,clearTimeout(Autocomplete_var.timer),Autocomplete_var.timer=setTimeout(function(){MG_Utils.ajaxGet({url:"/video/search_autocomplete",data:{pornstars:n.options.showPornstars,token:n.input.getAttribute("data-token"),orientation:n.input.getAttribute("data-orientation"),q:n.input.value,alt:0},success:function(e){!function(e){var t=function(e){let t=!1,s=this,i=[],n=[],r=[],a=[],l=[],o=[];if(e.queries instanceof Array&&e.queries.length){Autocomplete_var.matches=e.queries.length;for(var c in e.queries){var p=S.call(s,e.queries[c],"video"),u=S.call(s,e.queries[c],"gifs");p={id:c,href:p,value:e.queries[c]},u={id:c,href:u,value:e.queries[c]},i.push(p),r.push(u)}s.suggestionElement.videoList=JSON.stringify(i),s.suggestionElement.gifList=JSON.stringify(r),t=!0}if(e.albums instanceof Array&&e.albums.length){for(var h in e.albums){var d=S.call(s,e.albums[h],"photo");d={id:h,href:d,value:e.albums[h]},n.push(d),s.suggestionElement.photoList=JSON.stringify(n)}t=!0}if(e.pornstars instanceof Array&&e.pornstars.length){var g,m;for(m in e.pornstars)g={id:m,href:"/pornstar/"+e.pornstars[m].slug,value:e.pornstars[m].name},a.push(g),s.suggestionElement.pornstarList=JSON.stringify(a);t=!0}if(e.models instanceof Array&&e.models.length){var y,v;for(v in e.models)y={id:v,href:"/model/"+e.models[v].slug,value:e.models[v].name},l.push(y),s.suggestionElement.modelList=JSON.stringify(l);t=!0}if(e.channels instanceof Array&&e.channels.length){var f,L;for(L in e.channels)f={id:L,href:"/channels/"+e.channels[L].slug,value:e.channels[L].name},o.push(f),s.suggestionElement.channelList=JSON.stringify(o);t=!0}return t}.call(this,e);t||(Autocomplete_var.matches=0,this.suggestionElement.videoList="",this.suggestionElement.gifList="",this.suggestionElement.photoList="",this.suggestionElement.pornstarList="",this.suggestionElement.modelList="",this.suggestionElement.channelList="");e&&"true"===e.isDdBannedWord?(this.suggestionElement.getVueInstance().isDDBannedWord=!0,this.suggestionsList.style.display="none"):(this.suggestionElement.getVueInstance().isDDBannedWord=!1,this.suggestionsList.style.display="block")}.call(n,e),n.searchesWrapper.style.display="none"}})},this.options.showDelay))}function S(e,t){var s={};switch(t="block"===this.suggestionsList.style.display&&null!==t&&""!==t?t:"video"){case"video":case"models":s.string="1"===isGay?"gay/video/search":"gay"==e.toLowerCase()?"gayporn":"video/search",s.query="search",s.connective="?";break;case"photo":s.string="gay"==e.toLowerCase()||"1"===isGay?"albums/gay":"albums/female-straight-uncategorized",s.query="search",s.connective="?";break;case"pornstars":s.string="gay"==e.toLowerCase()||-1<e.toLowerCase().indexOf("gay")?"gay/pornstars":"1"===isGay?"gay/pornstars/search":"pornstars/search",s.query="search",s.connective="?";break;case"channels":s.string="gay"==e.toLowerCase()||-1<e.toLowerCase().indexOf("gay")?"gay/channels":"1"===isGay?"gay/channels/search":"channels/search",s.query="channelSearch",s.connective="?";break;case"gifs":s.string="gay"==e.toLowerCase()||-1<e.toLowerCase().indexOf("gay")?"gay/gifs":"1"===isGay?"gay/gifs/search":"gifs/search",s.query="search",s.connective="?"}return"gay"===e.toLowerCase()?"/"+s.string:(e=e.toLowerCase(),e=(e=encodeURIComponent(e)).replace(/%20/g,"+"),"/"+s.string+s.connective+s.query+"="+e)}function o(){this.searchesWrapper.style.display="block",MG_Utils.removeClass(this.trendingListWrapper,"hidden")}function c(){let n=this;Autocomplete_var.timer=setTimeout(function(){var e,t=RecentSearches.get(),s=(n.searchesWrapper.style.display="block",t&&t.reverse(),t.length&&MG_Utils.removeClass(n.recentListWrapper,"hidden"),[]);for(e in t){var i=S.call(n,t[e],"video"),i={id:e,href:i,value:t[e]};s.push(i)}n.recentSearchesElement.searchList=JSON.stringify(s)},this.options.showDelay)}return function(){return this.options={minLength:2,showDelay:200,showPornstars:!0,formId:"search_form",inputId:"searchInput",submitBtnId:"btnSearch",suggestionsListId:"searchSuggestions",searchesWrapper:"searchesWrapper",recentListWrapper:"recentSearchesListWrapper",trendingListWrapper:"trendingSearchesListWrapper",trendingPMsWrapper:"pornstarSearchesListWrapper",clearInput:"clearInput",inputLabel:"#searchBarContainer label"},this.form=document.getElementById(this.options.formId),this.input=document.getElementById(this.options.inputId),this.submitBtn=document.getElementById(this.options.submitBtnId),this.suggestionsList=document.getElementById(this.options.suggestionsListId),this.searchesWrapper=document.getElementById(this.options.searchesWrapper),this.suggestionElement=document.querySelector("suggestion-element")?document.querySelector("suggestion-element"):null,this.recentSearchesElement=document.querySelector('search-list[type="recent"]'),this.recentListWrapper=document.querySelector("."+this.options.recentListWrapper),this.trendingListWrapper=document.querySelector("."+this.options.trendingListWrapper),this.trendingPMsWrapper=document.querySelector("."+this.options.trendingPMsWrapper),this.clearInput=document.getElementById(this.options.clearInput),this.inputLabel=document.querySelector(this.options.inputLabel),this.focusInput=focusSearchInput,this.currentType=null,this.cache=null,this.term=null,e||function(){this.input&&(this.focusInput?this.input.focus():this.input.blur(),function(){var t=this;(function(){var t=this;MG_Utils.addEventHandler(this.input,"keyup",function(e){i.call(t,e)}),MG_Utils.addEventHandler(this.input,"keypress",function(e){e=e.keyCode||e.charCode;if(60==e||62==e)return!1}),MG_Utils.addEventHandler(document.body,"click",function(e){!e.target||"searchInput"===e.target.id||"clearInput"===e.target.id||MG_Utils.hasClass(e.target,"searches")||MG_Utils.hasClass(e.target,"clearIcon")||MG_Utils.hasClass(e.target,"keepOpen")||(t.suggestionsList.style.display="none",t.searchesWrapper.style.display="none")}),this.input.addEventListener("click",function(e){(e=e||window.event).preventDefault?e.preventDefault():e.returnValue=!1,0===this.value.length?(t.suggestionsList&&(t.suggestionsList.style.display="none"),c.call(t),o.call(t)):i.call(t,e)})}).call(this),MG_Utils.addEventHandler(this.submitBtn,"click",function(e){s.call(t,e)}),MG_Utils.addEventHandler(this.form,"submit",function(e){s.call(t,e)}),this.clearInput&&this.clearInput.addEventListener("click",function(){t.suggestionsList.style.display="none",t.recentListWrapper.style.display="block",t.trendingListWrapper.style.display="block",t.trendingPMsWrapper&&(t.trendingPMsWrapper.style.display="block"),t.input.value="",t.input.focus(),t.input.click(),MG_Utils.addClass(this,"hidden"),t.inputLabel&&MG_Utils.removeClass(t.inputLabel,"extraPadding"),"none"===window.getComputedStyle(t.searchesWrapper).display&&(t.searchesWrapper.style.display="block")})}.call(this),e=this)}.call(this),e}}(),RecentSearches=(()=>{let i="recentSearch",n=LocalStorageManager.getInstance();function r(){var e=n.get(i);return!!e&&JSON.parse(e)}function a(e){var t,s=r();s?(-1!==(t=s.indexOf(e))?s.splice(t,1):n.set("newTermSearched",1),5<=s.length&&s.shift(),s.push(e),n.set(i,s)):(n.set(i,[e]),n.set("newTermSearched",1))}function s(e){var t=r();t&&(-1!==(e=t.indexOf(e))&&t.splice(e,1),n.set(i,t),t)&&!t.length&&((e=document.querySelector(".recentSearchesListWrapper"))&&(e.style.display="none"),l())}function l(){const e=document.querySelector('search-list[type="trending"]'),t=e?e.searchList:[];e&&t&&(e.searchList="",setTimeout(function(){e.searchList=t},100))}return{add:a,get:r,remove:s,checkBannedWords:function(){const t=r();t&&(function(){var e=n.get("currentTimeStamp"),t=(new Date).getTime();if(!e||t>parseInt(e)+72e5)return n.set("currentTimeStamp",t),1;return}()||n.get("newTermSearched"))&&"function"==typeof validateBannedWords&&validateBannedWords(t,!0,function(e){e&&("boolean"==typeof e?t.pop():-1!==(e=t.indexOf(e))&&t.splice(e,1),n.set(i,t))}),n.get("newTermSearched")&&n.remove("newTermSearched")},initializeElement:function(){Vue.customElement("search-list",{props:{type:{type:String,required:!0},label:{type:String,required:!0},clearBtnText:{type:String},seeMoreText:{type:String},searchList:[String]},computed:{parseData:function(){var e=!!this.searchList&&JSON.parse(this.searchList),t=r();return"trending"===this.type&&e&&0<t.length?e.slice(0,5):e},mainClass:function(){return this.type+"SearchesListWrapper"},topMostClass:function(){var e=r();if((!e||e.length<=0)&&"trending"===this.type)return"trendingFirst"},emptyImgSrc:function(){return"undefined"!=typeof TOP_BODY?TOP_BODY.emptyImgSrc:""}},methods:{removeSearch:function(e,t){t.preventDefault(),s(e),t.target&&t.target.parentElement&&t.target.parentElement.parentElement&&t.target.parentElement.parentElement.removeChild(t.target.parentElement)},recentSearchClick:function(e,t){let s="",i=Math.random()<=1;s="recent"===this.type?"Recent Searches":"trending"===this.type?"Trending Searches":"Trending Pornstars and Models #"+(t+1),"function"==typeof ga&&i&&ga("send","event","Search Bar","click",s),a(e)},removeAllRecentSearch:function(){var e=document.querySelector('search-list[type="recent"]'),t=document.getElementById("recentSearchesList");e&&(e.searchList=""),t&&(t.style.display="none"),n.remove(i),l()}},watch:{searchList:function(e,t){return e!=t}},template:`<div :class="[mainClass, {hidden: !parseData || !parseData.length}]">
                    <div class="label first recentFirst" v-if="type === 'recent' && parseData && parseData.length">
                        <span class="title">{{label}}</span>
                        <span class="clearAllBtn" @click="removeAllRecentSearch">{{clearBtnText}}</span>
                    </div>
                    <p :class="['label', 'first', topMostClass]" v-if="(type === 'trending' || type === 'pornstar') && parseData && parseData.length">{{label}}</p>
                    <ul>
                        <li v-for="(item, index) in parseData" :data-value="item.value">
                            <a v-if="!item.viewAllPMs" :class="['searches', {first: index == 0}]" :href="item.href" @click="type=='pornstar' ? recentSearchClick(item.value, index) : recentSearchClick(item.value)">
                                <img v-if="item.avatar" class="lazy" :src="emptyImgSrc" :data-src="item.avatar">
                                {{item.value}}
                            </a>
                            <a v-if="item.viewAllPMs" :href="item.viewAllPMs">{{seeMoreText}}<em class="arrow"><i></i></em></a>
                            <i v-if="type=='recent'" class="clearIcon" @click="removeSearch(item.value, $event)"></i>
                        </li>
                    </ul>
                </div>`})}}})();function initSuggestionListComponent(){Vue.customElement("suggestion-list",{props:{title:{type:String,required:!0},type:{type:String,required:!0},selected:{type:Boolean,default:!1},noMatch:{type:String,required:!0},currentType:{type:String,required:!0},dataList:[String]},data:function(){return{inputField:document.getElementById("searchInput"),minLength:4,maxLength:10}},computed:{parseDataList:function(){return this.dataList?JSON.parse(this.dataList):{}},mainClass:function(){return this.type+"Suggestion"}},methods:{suggestionClick:function(e){void 0!==RecentSearches&&RecentSearches.add(e)},highLightMatch:function(e){let t=void 0!==Autocomplete_var?Autocomplete_var.value:"",s=e.search(RegExp(""+t,"i"));if(0<=s){t=t.toLowerCase();var i=e.split(/\s|_/);for(let e=0;e<i.length;e++)i[e]=i[e].substr(0,1).toUpperCase()+(1<i[e].length?i[e].substr(1,i[e].length).toLowerCase():"");e=(e=i.join(" ")).slice(0,s)+'<span class="soughtValue">'+t+"</span>"+e.slice(s+t.length)}return e},showLink:function(e){return this.selected&&e<this.maxLength||!this.selected&&e<this.minLength?"":"displayNone"}},watch:{dataList:function(e,t){return e!=t}},template:`<div :class="['keepOpen', 'heading', mainClass, {hidden: !parseDataList || !parseDataList.length}, {'first': type==='video'}]" v-if="parseDataList && parseDataList.length">
                <p :class="['keepOpen', 'label', {'first': type==='video'}]" v-if="!selected">{{title}}</p>
                <a v-for="(item, index) in parseDataList" :href="item.href" class="keepOpen" @click="suggestionClick(item.value)" v-html="highLightMatch(item.value)" :data-value="item.value" :class="showLink(index)"></a>
            </div>
            <div v-else-if="(!parseDataList || (parseDataList && !parseDataList.length)) && currentType!=='all'">
                <p class="noMatches keepOpen">{{noMatch}}</p>
            </div>`})}function initSuggestionElementComponent(){Vue.customElement("suggestion-element",{props:{translation:{type:String,required:!0},videoList:[String],photoList:[String],pornstarList:[String],modelList:[String],channelList:[String],gifList:[String]},data:function(){return{inputField:document.getElementById("searchInput"),searchesWrapper:document.getElementById("searchesWrapper"),i18n:this.translation?JSON.parse(this.translation):{},types:this.translation?JSON.parse(this.translation).types:[],defaultType:"all",currentType:"all",isDDBannedWord:!1}},computed:{noMatches:function(){var e=this.videoList?JSON.parse(this.videoList):{},t=this.photoList?JSON.parse(this.photoList):{},s=this.pornstarList?JSON.parse(this.pornstarList):{},i=this.modelList?JSON.parse(this.modelList):{},n=this.channelList?JSON.parse(this.channelList):{},r=this.gifList?JSON.parse(this.gifList):{};return!(e&&e.length||t&&t.length||s&&s.length||n&&n.length||r&&r.length||i&&i.length)},isPremium:function(){return"undefined"!=typeof premiumFlag&&"1"==premiumFlag}},watch:{videoList:function(e,t){return e!=t},photoList:function(e,t){return e!=t},pornstarList:function(e,t){return e!=t},modelList:function(e,t){return e!=t},channelList:function(e,t){return e!=t},gifList:function(e,t){return e!=t},isDDBannedWord:function(e,t){return e!=t}},methods:{selectTab:function(e){this.currentType=e,Autocomplete_var.type="all"===e?"video":e;e=document.querySelectorAll("#searchesWrapper li, #searchSuggestions a");MG_Utils.removeClassMultiple(e,"selected"),this.inputField.value=Autocomplete_var.originalVal},setType:function(){var e,t=window.location.pathname,s=t.split("/")[1];this.currentType=this.defaultType,s&&("gay"===s||"transgender"===s?"gifs"===(e=t.split("/")[2])?this.currentType="gifs":"pornstars"===e&&(this.currentType="pornstars"):-1!==(e=this.types.indexOf(s))&&"edit"!==t.split("/")[2]&&(this.currentType=this.types[e]))},keyboardMoveHandler:function(e){let t=e.keyCode||e.charCode,s=document.getElementById("searchSuggestions"),i="all"===this.currentType?'[class*="Suggestion"] ':"."+this.currentType+"Suggestion ",n=s.querySelectorAll(i+"a:not(.displayNone)"),r=this.searchesWrapper.querySelectorAll("li"),a=s.querySelector(".selected"),l;40!=t&&38!=t||(n.length||r.length)&&("block"===this.searchesWrapper.style.display&&(n=r,a=this.searchesWrapper.querySelector(".selected")),MG_Utils.removeClassMultiple(n,"selected"),a?40==t?l=a.length||a!==n[n.length-1]?(e=Array.prototype.indexOf.call(n,a),n[e+1]):n[0]:38==t&&(l=a.length||a!==n[0]?(e=Array.prototype.indexOf.call(n,a),n[e-1]):n[n.length-1]):(40==t?a=n[0]:38==t&&(a=n[n.length-1]),l=a),MG_Utils.addClass(l,"selected"),l.getAttribute("data-value")?(this.inputField.value=l.getAttribute("data-value"),this.term=this.inputField.value):this.inputField.value=Autocomplete_var.originalVal)}},mounted:function(){this.setType(),this.inputField&&this.inputField.addEventListener("keydown",this.keyboardMoveHandler);var e=document.querySelectorAll(".scrollableSearchSuggestion");"undefined"!=typeof MG_Scroll&&e&&(e[0].style.maxHeight=window.innerHeight-190+"px",MG_Scroll.init({width:"auto",selector:e,height:"100%",color:"#2F2F2F",size:"7px",alwaysVisible:!0,railVisible:!0,railOpacity:1,railColor:"transparent",distance:0,opacity:1,railClass:"track3",barClass:"handle3",wrapperClass:"wrapper3"}))},template:`<div id="searchSuggestions" class="suggestions keepOpen">
                <div class="scrollableTabsContainer keepOpen">
                    <ul :class="['keepOpen', {hidden: noMatches}]">
                        <li v-for="value in types" :class="['keepOpen', value, {'active' : value == currentType}]" @click="selectTab(value)">{{i18n[value]}}</li>
                    </ul>
                </div>
                <p :class="['noMatches', 'keepOpen', {hidden: !noMatches || isDDBannedWord}]">{{i18n.noMatch}}</p>
                <div class="scrollableSearchSuggestion">
                    <suggestion-list :title="i18n.video" type="video" :selected="currentType === 'video'" :data-list="videoList" v-if="(currentType === 'all' || currentType === 'video') && !noMatches" :no-match="i18n.noMatch" :current-type="currentType"></suggestion-list>
                    <suggestion-list :title="i18n.channels" type="channels" :selected="currentType === 'channels'" :data-list="channelList" v-if="(currentType === 'all' || currentType === 'channels') && !noMatches" :no-match="i18n.noMatch" :current-type="currentType"></suggestion-list>
                    <suggestion-list :title="i18n.models" type="models" :selected="currentType === 'models'" :data-list="modelList" v-if="(currentType === 'all' || currentType === 'models') && !noMatches" :no-match="i18n.noMatch" :current-type="currentType"></suggestion-list>
                    <suggestion-list :title="i18n.pornstars" type="pornstars" :selected="currentType === 'pornstars'" :data-list="pornstarList" v-if="(currentType === 'all' || currentType === 'pornstars') && !noMatches" :no-match="i18n.noMatch" :current-type="currentType"></suggestion-list>
                    <suggestion-list :title="i18n.gifs" type="gifs" :selected="currentType === 'gifs'" :data-list="gifList" v-if="!isPremium && (currentType === 'all' || currentType === 'gifs') && !noMatches" :no-match="i18n.noMatch" :current-type="currentType"></suggestion-list>
                    <suggestion-list :title="i18n.photo" type="photo" :selected="currentType === 'photo'" :data-list="photoList" v-if="!isPremium && (currentType === 'all' || currentType === 'photo') && !noMatches" :no-match="i18n.noMatch" :current-type="currentType"></suggestion-list>
                </div>
            </div>`})}void 0!==RecentSearches&&(RecentSearches.initializeElement(),RecentSearches.checkBannedWords()),initSuggestionListComponent(),initSuggestionElementComponent(),MG_Utils.domReady(function(){var e=document.querySelectorAll("#searchesWrapperScroll");"undefined"!=typeof MG_Scroll&&e.length&&(e[0].style.maxHeight=window.innerHeight-115+"px",MG_Scroll.init({width:"auto",selector:e,height:"100%",color:"#2F2F2F",size:"7px",alwaysVisible:!0,railVisible:!0,railOpacity:1,railColor:"transparent",distance:0,opacity:1,railClass:"track3",barClass:"handle3",wrapperClass:"wrapper3"})),window.addEventListener("resize",function(){var e=document.getElementById("searchesWrapperScroll"),t=document.querySelector(".scrollableSearchSuggestion");e&&(e.style.maxHeight=window.innerHeight-115+"px"),t&&(t.style.maxHeight=window.innerHeight-190+"px")})});
"object"!=typeof console&&(console={log:function(){},warn:function(){},error:function(){},info:function(){}});var friendRequestModal,tooltipPromoContent,tooltipPromoRemove,disablePlaylistPlusButon="false",friendRequestModalContent=document.getElementById("friendRequestModal");function appendedTasteProfile(e){e=document.getElementById(e);if(e&&storageAvailable("localStorage")&&localStorage.tasteCategories)return e.value=localStorage.getItem("tasteCategories")}function scrollToElement(e,t){for(var l=document.body.scrollTop,e=document.querySelector(e),o=MG_Utils.offset(e).top,i=l;i<o;i+=t)document.body.scrollTop=i}function getCookie(e){for(var t,l,o=document.cookie.split(";"),i=0;i<o.length;i++)if(t=o[i].substr(0,o[i].indexOf("=")),l=o[i].substr(o[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(l)}function setCookie(e,t,l){var o=new Date,t=(o.setDate(o.getDate()+l),escape(t)+(null==l?"":"; expires="+o.toUTCString()));document.cookie=e+"="+t}function builtModal(e,t,l,o,i,a){void 0!==friendRequestModal&&friendRequestModal.openModal();var s=document.getElementById("messageRequest"),r=document.getElementById("preventClick"),n=document.getElementById("friendRequestForm"),c=document.getElementById("fromPic"),a=(userId=document.getElementById("friendRequestUserId"),elements=document.querySelectorAll(".request-modal .last"),r.setAttribute("data-refresh",a),r.setAttribute("data-user-id",e),n.setAttribute("action",i),c.setAttribute("src",t),"<a href='"+o+"'></a>"),d=document.createElement("div");for(d.innerHTML=a;d.firstChild;){var u=d.firstChild;c.parentNode.insertBefore(u,c),u.appendChild(c)}s.value=s.getAttribute("data-val"),MG_Utils.setText(userId,e);for(var m=0;m<elements.length;m++)elements[m].innerHTML='You are about to add <a href="'+o+'"> '+l+' </a> as a friend. We will then notify <a href="'+o+'"> '+l+" </a> who will then confirm that you are friends."}function recal(){var e=document.getElementById("messageRequest"),t=document.getElementById("chars_left"),e=1e3-e.value.length;t.innerHTML=Math.max(e,0)+" characters left.",e<0&&MG_Utils.appendString(t,' <span style = "color: #F00">You have over 1000 characters.<br />Anything past 1000 will get chopped off.</span>')}function getUrlVars(){var o={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(e,t,l){o[t]=l}),o}function nl2br(e){return e.replace(/\n/g,"<br />")}function strpos(e,t,l){e=(e+"").indexOf(t,l||0);return-1!==e&&e}function updateQueryStringParameter(e,t,l){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+l+"$2"):e+i+t+"="+l}function initTooltip(){var l=document.getElementById("tooltip");function o(e,t){l.style.left=t.left-l.clientWidth/2+Math.floor(e.clientWidth/2)-1+"px",l.style.left=parseFloat(l.style.left)<0?"0":l.style.left,l.classList.remove("tooltipSmall"),l.style.width="auto"}l&&(document.body.addEventListener("mouseenter",function(e){var t,e=e.target;e&&MG_Utils.hasClass(e,"tooltipTrig")&&(t=e.getAttribute("data-title"),l.innerHTML="<div class='tooltip-sub'>"+t+" </div></div><div class='arrow-down'></div>",l.style.display="block",MG_Utils.addClass(l,e.getAttribute("type")),t=e,e=MG_Utils.offset(t),l.style.left=e.left-l.clientWidth/2+Math.floor(t.clientWidth/2)-1+"px",window.onresize=function(){l.style.left=0},t.classList.contains("pornstarPrev")&&parseFloat(l.style.left)<-3?(l.classList.add("tooltipSmall"),l.style.width=l.clientWidth+parseFloat(l.style.left)-14+"px",l.style.left="0"):o(t,e),l.style.top=e.top-l.clientHeight-l.querySelector(".arrow-down").clientTop+"px")},!0),document.body.addEventListener("mouseleave",function(e){e=e.target;e&&MG_Utils.hasClass(e,"tooltipTrig")&&(l.style.display="none")},!0))}function renderCommentLinks(){for(var e,t=document.querySelectorAll(".commentUsernameLink"),l=0;l<t.length;l++)e=t[l],MG_Utils.hasClass(e,"processed")||(MG_Utils.addClass(e,"processed"),e.getAttribute("data-href")?e.innerHTML='<a href="'+e.getAttribute("data-href")+'">@'+e.getAttribute("data-username")+"</a>":e.innerHTML="<span>@"+e.getAttribute("data-username")+"</span>");var o=document.querySelectorAll(".js_taggable");if(0<o.length){for(l=0;l<o.length;l++)MG_Utils.empty(o[l]);friendList=[]}}friendRequestModalContent&&(friendRequestModal=new MG_Modal({content:friendRequestModalContent,className:"friendRequestContainer"})),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var l,o;if(null==this)throw new TypeError(" this is null or not defined");var i,a=Object(this),s=a.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(l=t),o=0;o<s;)o in a&&(i=a[o],e.call(l,i,o,a)),o++}),document.querySelector(".tooltipPromo")&&document.querySelector("#headerUpgradePremiumBtn")&&(tooltipPromoRemove=(tooltipPromoContent=document.querySelector(".tooltipPromo")).querySelector("span"),MG_Utils.addEventHandler(tooltipPromoRemove,"click",function(e){e.stopPropagation(),setCookie("promoTooltip","1"),tooltipPromoContent.remove()}));var blurTimeout="";function focusReply(){if(document.querySelectorAll("form.streamCommentFrom"))for(var e=document.querySelectorAll("form.streamCommentFrom"),t=0;t<e.length;t++)MG_Utils.addEventHandler(e[t],"blur",function(e){blurTimeout=setTimeout(function(){var e=MG_Utils.closest(this,"form"),t=e.querySelectorAll(".streamSubmitInput"),e=e.querySelectorAll(".streamSections");t&&MG_Utils.addClass(t,"focusReply"),t&&MG_Utils.addClass(t,"hidden"),e&&MG_Utils.addClass(e,"hidden")},200)});if(document.querySelectorAll(".streamTextArea")){var l=document.querySelectorAll(".streamTextArea");MG_Utils.setText(l,"");for(t=0;t<l.length;t++)MG_Utils.addEventHandler(l[t],"focus",function(e){var t=this.value,l=MG_Utils.closest(this,".streamSubmitInput"),o=MG_Utils.closest(this,".streamSections");"Click to leave a comment"===t&&(this.value=""),l&&MG_Utils.addClass(l,"showme"),o&&MG_Utils.addClass(o,"showme"),MG_Utils.triggerEvent(this,"resize")})}}function openReply(){if(document.querySelectorAll(".reply a"))for(var t,l,o,i,e=document.querySelectorAll(".reply a"),a=0;a<e.length;a++)MG_Utils.addEventHandler(e[a],"click",function(e){e=e||window.event,o=MG_Utils.closest(this,".feedItemSection"),t=o.querySelector(".postingForm"),l=o.querySelector(".formAvatar"),o=o.querySelector(".formText"),i=o.querySelector("textarea"),o.querySelector(".js_taggable"),MG_Utils.addClass(this,"hideme"),MG_Utils.addClass(t,"showme"),MG_Utils.addClass(l,"showme"),MG_Utils.addClass(o,"showme"),MG_Utils.setText(i,""),MG_Utils.triggerEvent(i,"click")})}function addShareExternal(e,t,l){WIDGET_SHARE.shareButtonsLoaded?"function"==typeof e&&e():(WIDGET_SHARE.shareButtonsLoaded=!0,void 0===t&&(t=WIDGET_SHARE.urlShare),void 0===l&&(l=WIDGET_SHARE.shareTitle),0<document.querySelectorAll("a.sharesTwitter").length&&(t=(e=doc