var isPopUpOpened=!1,wdi_data=[];function wdi_spider_createpopup(e,t,i,a,r,n,d,o,s){if(e=e.replace(/&/g,"&"),!isPopUpOpened&&(isPopUpOpened=!0,!wdi_spider_hasalreadyreceivedpopup(n)&&!wdi_spider_isunsupporteduseragent())){jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#wdi_spider_popup_loading_"+t).css({display:"block"}),jQuery("#wdi_spider_popup_overlay_"+t).css({display:"block"});for(var _,m=0,c=0;c'+e+"");new wdi_construct_popup(e,o,o.parsedData,s).construct(),e.hide().appendTo("body"),wdi_spider_showpopup(n,d,e,r),jQuery("#wdi_spider_popup_loading_"+t).css({display:"none !important;"})}})}}var wdi_construct_popup=function(y,f,v,b){this.theme_row={},this.construct=function(){this.theme_row=window["wdi_theme_"+f.feed_row.theme_id],f.feed_row.popup_enable_filmstrip&&"1"===f.feed_row.popup_enable_filmstrip&&this.add_filmstrip(),this.set_wdi_data()},this.add_filmstrip=function(){var e="horizontal";"right"!==this.theme_row.lightbox_filmstrip_pos&&"left"!==this.theme_row.lightbox_filmstrip_pos||(e="vertical");for(var t="horizontal"===e?"tenweb-i-angle-left":"tenweb-i-angle-up",i="horizontal"===e?"tenweb-i-angle-right":"tenweb-i-angle-down",a="",r=n="horizontal"===e?void 0!==f.feed_row.popup_filmstrip_height?f.feed_row.popup_filmstrip_height:"20":void 0!==f.feed_row.popup_filmstrip_height?f.feed_row.popup_filmstrip_height:"50",n=r=parseInt(r),d=0;d';break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":g=''+m.alt+'';break;case"EMBED_OEMBED_INSTAGRAM_CAROUSEL":if(0===m.carousel_media.length)continue;switch(m.carousel_media[0].type){case"image":g=''+m.alt+'';break;case"video":g=''+m.alt+'';break;default:g=''+m.alt+''}}a+='
'+g+"
"}i='
'+a+'
';y.find(".wdi_filmstrip_container").append(i)},this.set_wdi_data=function(){wdi_data=[];for(var e=0;e Your browser does not support the video tag. '),n+=d+="";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":d="
'),n+=d+="
";break;case"EMBED_OEMBED_INSTAGRAM_CAROUSEL":d=""}return n}function wdi_testBrowser_cssTransitions(){return wdi_testDom("Transition")}function wdi_testBrowser_cssTransforms3d(){return wdi_testDom("Perspective")}function wdi_testDom(e){for(var t=["","Webkit","Moz","ms","O","Khtml"],i=t.length;i--;)if(void 0!==document.body.style[t[i]+e])return!0;return!1}function wdi_cube(e,t,i,a,r,n,d,o,s,_){return wdi_testBrowser_cssTransitions()?wdi_testBrowser_cssTransforms3d()?(wdi_trans_in_progress=!0,jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),jQuery(".wdi_slide_bg").css("perspective",1e3),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(s).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".wdi_slider").css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".wdi_slider").css({transition:"all "+wdi_transition_duration+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+n+"deg) rotateY("+d+"deg)"})},20),void jQuery(".wdi_slider").one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(function(){jQuery(o).removeAttr("style"),jQuery(s).removeAttr("style"),jQuery(".wdi_slider").removeAttr("style"),jQuery(o).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1}),jQuery(s).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2}),wdi_trans_in_progress=!1,jQuery(o).html(""),"undefined"==typeof event_stack||0').addClass("wdi_grid");jQuery(o).prepend(u);var l=jQuery(".wdi_slide_bg"),w=c.width(),p=c.height(),_=l.width(),l=l.height(),h=Math.floor(_/e),g=Math.floor(l/t),y=_-e*h,f=Math.ceil(y/e),v=l-t*g,b=Math.ceil(v/t),j=0,Q=Math.ceil((jQuery(".wdi_slide_bg").width()-c.width())/2),k=void 0===c.attr("src")?"":c.attr("src");a="min-auto"===(a="auto"===a?_:a)?-_:a,r="min-auto"===(r="auto"===r?l:r)?-l:r;for(var x,C,E,M,I,A,B,O,T,D,S=0;S').css({display:"block",width:x,height:C,top:E,left:I,backgroundImage:'url("'+B+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:A+"px "+M+"px",backgroundSize:O+"px "+T+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+D+"ms",transform:"none"}))),K+=G,R-=G}Q-=V,j+=V}l=u.children().last();u.show(),c.css("opacity",0),u.children().first().addClass("rs-top-left"),u.children().last().addClass("rs-bottom-right"),u.children().eq(t-1).addClass("rs-bottom-left"),u.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){u.children().css({opacity:d,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+n+")"})},1),jQuery(s).css("opacity",1),jQuery(l).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(function(){jQuery(o).css({opacity:0,"z-index":1}),jQuery(s).css({opacity:1,"z-index":2}),c.css("opacity",1),u.remove(),wdi_trans_in_progress=!1,jQuery(o).html(""),"undefined"==typeof event_stack||0=Object.size(e)-a-t;i--){this.commentCounter++;var r=e[i].text,r=wdi_front.escape_tags(r);r=this.filterCommentText(r);var n=e[i].username,d=jQuery('
');d.append(jQuery('

'+n+''+wdi_front.convertUnixDate(e[i].timestamp)+"

")),d.append(jQuery('

'+r+"

")),jQuery("#wdi_added_comments").prepend(d)}0==jQuery(".wdi_single_comment").length&&jQuery("#wdi_added_comments").html('

There are no comments to show

'),this.updateScrollbar()},updateScrollbar:function(){var e=jQuery("#wdi_comments"),t=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments"),jQuery(".wdi_comments").html(""),jQuery(".wdi_comments").append(e),jQuery(".wdi_comments").append(t),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".wdi_comments").mCustomScrollbar({scrollInertia:250}),jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){var e="";void 0!==wdi_data[wdi_comments_manager.currentKey].comments_data.next&&(e=wdi_data[wdi_comments_manager.currentKey].comments_data.next),this.instagram.getRecentMediaComments(this.media_id,{success:function(e){if(""==e||null==e||null==e||void 0!==e.error)return errorMessage="Network Error, please try again later :(",console.log("%c"+errorMessage,"color:#cc0000;"),void jQuery("#wdi_added_comments").html('

Comments are currently unavailable

');if(200!=e.meta.code)return errorMessage=e.meta.error_message,console.log("%c"+errorMessage,"color:#cc0000;"),void jQuery("#wdi_added_comments").html('

Comments are currently unavailable

');void 0!==wdi_data[wdi_comments_manager.currentKey].comments_data.data?(wdi_data[wdi_comments_manager.currentKey].comments_data.data=e.data.concat(wdi_data[wdi_comments_manager.currentKey].comments_data.data),wdi_data[wdi_comments_manager.currentKey].comment_count+=wdi_data[wdi_comments_manager.currentKey].comments_data.data.length):(wdi_data[wdi_comments_manager.currentKey].comments_data=e,wdi_data[wdi_comments_manager.currentKey].comment_count=wdi_data[wdi_comments_manager.currentKey].comments_data.data.length),wdi_data[wdi_comments_manager.currentKey].comments_data.next=void 0!==e.paging?e.paging.next:"",wdi_comments_manager.mediaComments=e.data;var t=wdi_data[wdi_comments_manager.currentKey];wdi_comments_manager.showComments(t.comments_data.data,wdi_comments_manager.load_more_count),wdi_comments_manager.ajax_comments_ready(e.data)}},e)},ajax_comments_ready:function(e){this.createLoadMoreAndBindEvent(wdi_comments_manager.currentKey)},createLoadMoreAndBindEvent:function(e){""==e&&(e=wdi_comments_manager.currentKey),(""!==wdi_data[e].comments_data.next||wdi_data[e].comments_data.data.length>wdi_comments_manager.load_more_count&&jQuery(".wdi_single_comment").lengthload more comments

')),jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){wdi_comments_manager.commentCounter+wdi_comments_manager.load_more_count>wdi_data[e].comments_data.data.length&&""!=wdi_data[e].comments_data.next&&wdi_comments_manager.getAjaxComments(this.currentKey),jQuery(this).remove(),wdi_comments_manager.showComments(wdi_data[e].comments_data.data,wdi_comments_manager.load_more_count),wdi_comments_manager.createLoadMoreAndBindEvent(wdi_comments_manager.currentKey)})},filterCommentText:function(e){for(var t=e.split(" "),i="",a=0;a'+t[a]+" ";break;case"#":i+=''+t[a]+" ";break;default:i+=t[a]+" "}return i=i.substring(0,i.length-1)}};