(function(a){for(var b=["Width","Height"],c;c=b.pop();)(function(b,c){a.fn[b]=b in new Image?function(){return this[0][b]}:function(){var a=this[0],b;"img"===a.tagName.toLowerCase()&&(b=new Image,b.src=a.src,b=b[c]);return b}})("natural"+c,c.toLowerCase())})(jQuery);
(function(a){a.fn.rwdImageMaps=function(){var b=this,c=parseFloat(a.fn.jquery);a(window).resize(function(){b.each(function(){if("undefined"!=typeof a(this).attr("usemap")){var b=this,e=a(b);a("<img />").load(function(){var f,g;1.6>c?(f=b.getAttribute("width"),g=b.getAttribute("height")):(f=e.attr("width"),g=e.attr("height"));if(!f||!g){var h=new Image;h.src=e.attr("src");f||(f=h.width);g||(g=h.height)}var j=e.width()/100,k=e.height()/100,h=e.attr("usemap").replace("#","");a('map[name="'+h+'"]').find("area").each(function(){var b=
a(this);b.data("coords")||b.data("coords",b.attr("coords"));for(var c=b.data("coords").split(","),d=Array(c.length),e=0;e<d.length;++e)d[e]=0===e%2?parseInt(100*(c[e]/f)*j):parseInt(100*(c[e]/g)*k);b.attr("coords",d.toString())})}).attr("src",e.attr("src"))}})}).trigger("resize");return this}})(jQuery);function ModalShare(a){(this.config=a)&&this.init()}
ModalShare.prototype.init=function(){this.$container=$(this.config.el);this.$shareBtn=$(this.config.btnShare);this.$shareEmailMsg=this.$container.find(".j-share-email-msg");this.$shareTabButton=this.$container.find(".j-button-share-tab");this.$shareEmbedButton=this.$container.find(".j-button-embed-tab");this.$addMsgButton=this.$container.find(".j-add-msg");this.$emailSentButton=this.$container.find(".j-email-sent");this.$shareEmailForm=this.$container.find(".j-share-email-form");this.$shareTab=this.$container.find(".j-share-tab");
this.$embedTab=this.$container.find(".j-embed-tab");this.$linkURLInput=this.$container.find(".j-share-link-url");this.$close=this.$container.find(".j-modal-close");this.$tabs=this.$container.find(".j-tabs a");this.gaTrackCategory=this.$container.data("ga-track-category");this.gaTrackAction=this.$container.data("ga-track-action");this.createShareHash();slideshare_object&&(slideshare_object.user&&!0===slideshare_object.user.loggedin&&null!==slideshare_object.user.login)&&this.$container.find(".j-share-email-name").val(slideshare_object.user.login);
this.bindModalToShareButtons();this.bindModalEvents();this.bindCustomModalEvents()};ModalShare.prototype.get_viral_share_url=function(a){$elem=$("li."+a+" a");var b=$.param($elem.data());!b&&(b=this.data.ssLink);return this.SHARE_HASH[a]+b};
ModalShare.prototype.get_viral_share_urls=function(){return{facebook:this.get_viral_share_url("facebook"),linkedin:this.get_viral_share_url("linkedin"),twitter:this.get_viral_share_url("twitter"),wordpress:this.get_viral_share_url("wordpress"),googleplus:this.get_viral_share_url("googleplus"),pinterest:this.get_viral_share_url("pinterest"),reddit:this.get_viral_share_url("reddit"),scoopit:this.get_viral_share_url("scoopit")}};
ModalShare.prototype.sharePopup=function(a){var b=626,c=436,d=this.data.social[a];if(void 0!==d){if("facebook"===a){if(window.FB){this.trackShareClick(a);this.postToFacebook();return}}else if("linkedin"===a){if(window.IN&&window.IN.UI){IN.UI.Share().params({url:this.data.ssLink}).place();this.trackShareClick(a);this.saveShare(a);return}}else if("scoopit"===a)b=596,c=708;else if("reddit"===a)b=958,c=803;else if("wordpress"===a){$("#button-share-tab").hasClass("selected")&&$(".j-tabs a").toggleClass("selected");
this.$shareTab.toggle();this.$embedTab.toggle();this.$container.find(".j-share-embed-wp").focus().click();return}window.open(d,"shareDialog","width="+b+",height="+c);this.trackShareClick(a);this.saveShare(a)}};ModalShare.prototype.show=function(){this.reset();this.$container.show();this.shareGATracking("modalOpen")};ModalShare.prototype.close=function(){};
ModalShare.prototype.reset=function(){this.$shareTab.is(":visible")||(this.$shareTab.show(),this.$shareTabButton.addClass("selected"),this.$shareEmbedButton.removeClass("selected"));this.$container.find(".j-embed-related-cbox").prop("checked",!0);this.$container.find(".j-embed-use-ssl-cbox").prop("checked",!1);this.$embedTab.is(":visible")&&this.$embedTab.hide();this.$shareEmailForm.show();this.$shareEmailMsg.hide();this.$emailSentButton.hide();this.$addMsgButton.show()};
ModalShare.prototype.updateEmbed=function(){var a=this.$container.find(".j-share-embed-link"),b=a.val(),c=this.$container.find(".j-embed-size-picker :selected").data("width"),d=this.$container.find(".j-embed-size-picker :selected").data("height"),e=this.$container.find(".j-embed-related-cbox").is(":checked"),f=this.$container.find(".j-embed-use-ssl-cbox").is(":checked"),g=b.match(/src="([^"]+)"/)[1].split("?")[0],h=this.$container.find(".j-embed-start-picker").val()||1,b=b.replace(/src="[^"]+"/,'src="'+
g+"?rel="+(e?1:0)+"&startSlide="+h+'"'),b=b.replace(f?"http://":"https://",f?"https://":"http://"),b=b.replace(/height="\d+"/,'height="'+d+'"'),b=b.replace(/width="\d+"/,'width="'+c+'"');a.text(b);this.shareGATracking("share_embed","updateembed")};
ModalShare.prototype.sendShareEmail=function(){this.shareGATracking("share_email","send");var a=this,b=this.$container.find(".j-share-email-send"),c=this.$container.find(".j-share-email-to").val(),d=this.$container.find(".j-share-email-name").val(),e=this.$container.find(".j-share-email-msg").val(),f=!1;b.val("Sending...");b.addClass("sending");f||(f=!0,$.post("/newlist/email_share",{data:{id:this.data.ssId,name:d,recipients:c,msg:e},dataType:"json"}).done(function(c){if(c.isSuccess)a.$container.find(".j-share-email-to").val(""),
a.$shareEmailMsg.hide(),a.$shareEmailForm.hide(),a.$container.find("#email-sent").fadeIn(400);else{var d=a.$container.find(".j-email-flash");d.text(c.resp).show();setTimeout(function(){d.fadeOut(400)},5E3)}f=!1;b.val("Send");b.removeClass("sending")}).fail(function(){f=!1;b.val("Send");b.removeClass("sending")}))};ModalShare.prototype.shareGATracking=function(a,b){var c=window._gaq||[],a=this.gaTrackAction?this.gaTrackAction+"_"+a:a;c.push(["_trackEvent",this.gaTrackCategory,a,b])};
ModalShare.prototype.renderDefaultEmbedOptions=function(){var a={"0":{small:[344,292],"default":[429,357],large:[514,422],xlarge:[599,487]},1:{small:[386,410],"default":[481,512],large:[576,614],xlarge:[672,716]}}[this.data.ssType%2],b="",c;for(c in a){var d=a[c][0]+" x "+a[c][1],b=b+('<option value="'+c+'" data-width="'+a[c][0]+'" data-height="'+a[c][1]+'"');"default"===c&&(b+=" selected");b+=">"+d+"</option>"}a=this.$container.find(".j-embed-size-picker");a.empty();a.append(b);this.$container.find(".j-embed-start-picker").val(1);
this.$container.find(".j-share-embed-wp").val(this.data.social.wordpress);this.$container.find(".j-share-embed-link").text(this.data.embedCode)};
ModalShare.prototype.bindModalEvents=function(){var a=this;this.$close.bind("click",function(){a.close()});this.$tabs.click(function(){$(this).hasClass("selected")||(a.$tabs.toggleClass("selected"),a.$shareTab.toggle(),a.$embedTab.toggle())});this.$shareEmailForm.submit(function(b){b.preventDefault();b.stopPropagation();a.sendShareEmail()});$(".j-send-another-email").click(function(){a.$container.find("#email-sent").hide();a.$shareEmailForm.fadeIn(400);a.$addMsgButton.show()});this.$addMsgButton.click(function(){$(this).hide();
a.$shareEmailMsg.slideDown(400)});this.$container.find(".j-share-social-list li").click(function(){a.sharePopup($(this).attr("class"))});this.$container.find(".j-share-embed-link, .j-share-embed-wp, .j-last-screen-ssurl").bind("click",function(){this.select()});this.$container.find(".j-share-link-url").click(function(){this.select();a.shareGATracking("share_social",$(this).data("ga"))});this.$container.find(".j-share-email-form input, .j-share-email-form textarea, .j-add-msg, .j-send-another-email").click(function(){"send"!==
$(this).data("ga")&&a.shareGATracking("share_email",$(this).data("ga"))});this.$container.find(".j-embed-tab input, .j-embed-tab textarea, .j-embed-use-ssl-cbox, .j-embed-related-cbox").click(function(){a.shareGATracking("share_embed",$(this).data("ga"))});this.$container.find(".j-embed-size-picker").change(function(){a.shareGATracking("share_embed","size-picker")})};ModalShare.prototype.bindCustomModalEvents=function(){};
ModalShare.prototype.createShareHash=function(){this.SHARE_HASH={facebook:"https://www.facebook.com/sharer/sharer.php?u=",linkedin:"https://www.linkedin.com/cws/share?",twitter:"https://twitter.com/share?",wordpress:"",googleplus:"https://plus.google.com/share?",pinterest:"http://pinterest.com/pin/create/button/?",reddit:"http://www.reddit.com/submit?",scoopit:"http://scoop.it/bookmarklet?"}};ModalShare.prototype.getSSId=function(a){return a.length?a.data("slideshowid"):slideshare_object.modal_player.get_ss_id()};
ModalShare.prototype.bindModalToShareButtons=function(){};ModalShare.prototype.trackShareClick=function(){};ModalShare.prototype.saveShare=function(a){$.post("/share/viralshare",{data:{id:this.data.ssId,network:a}})};
ModalShare.prototype.loadFBWidget=function(){var a,b=document.getElementsByTagName("script")[0];document.getElementById("facebook-jssdk")||(a=document.createElement("script"),a.id="facebook-jssdk",a.src="//connect.facebook.net/en_US/all.js",b.parentNode.insertBefore(a,b));var c=this,d=function(){c.shareGATracking("share_social","fb_success_callback")},e={appId:2490221586,status:!0,cookie:!0,xfbml:!0,oauth:!0,channelUrl:NaN};"object"===typeof FB?window.setTimeout(function(){FB.XFBML.parse();FB.Event.subscribe("edge.create",
d)},50):window.fbAsyncInit=function(){FB.init(e);FB.Event.subscribe("edge.create",d)}};ModalShare.prototype.showLikeUsModal=function(){};ModalShare.prototype.postToFacebook=function(){var a=this;window.FB&&FB.ui({method:"feed",display:"popup",link:this.data.ssLink},function(b){b&&b.post_id&&a.saveShare("facebook");a.showLikeUsModal()})};function PlayerModalShare(a,b){this.config=$.extend(a,b.config);this.sslastscreen=b;a&&this.init();this.gaCategory=b.gaCategory}PlayerModalShare.prototype=new ModalShare;
PlayerModalShare.prototype.updateEmbed=function(){var a=this.config.iframe_code,b=this.config.iframe_url,c=this.sslastscreen.lastScreen;this.$container.find(".j-embed-related-cbox").is(":checked");var d=this.$container.find(".j-embed-use-ssl-cbox").is(":checked"),e=this.$container.find(".j-embed-related-cbox").is(":checked"),f=parseInt(c.find(".j-embed-start-picker").val(),10),g=c.find(".j-embed-size-picker").val(),h=this.config.embed_sizes.presets[g].size.width,g=this.config.embed_sizes.presets[g].size.height;
d&&(b=b.replace("http://","https://"));var j=[];!e&&j.push("rel=0");!isNaN(f)&&1<f&&j.push("startSlide="+f);j.length&&(b+="?"+j.join("&"));a=a.replace("{iframe_url}",b);a=a.replace("{width}",h);a=a.replace("{height}",g);d&&a.replace("http://","https://");c.find(".j-share-embed-link").val(a);this.shareGATracking("share_embed","updateembed")};
PlayerModalShare.prototype.set_data=function(){this.data={ssLink:location.href,ssId:this.sslastscreen.config.slideshowId};this.data.social=this.get_viral_share_urls();this.SHARE_ABBRS={facebook:"fb",linkedin:"li",twitter:"tw",wordpress:"wp",googleplus:"gb",pinterest:"pi",reddit:"rit",scoopit:"sit"}};
PlayerModalShare.prototype.showLikeUsModal=function(){0===$("#fb_like_modal").length&&($("body").append('<div class="modal fade hide" id="fb_like_modal" style="width:auto;top:85%;"></div>'),$("#fb_like_modal").load("/fb_share_complete"));$("#last-screen-modal-share .j-modal-close").click();$("#fb_like_modal").modal("show")};
PlayerModalShare.prototype.bindCustomModalEvents=function(){this.set_data();var a=$(this.config.parentEl),b=this;this.$shareBtn.click(function(a){a.preventDefault();a.stopPropagation();b.open()});a.find(".j-embed-size-picker, .j-embed-start-picker, .j-embed-related-cbox, .j-embed-use-ssl-cbox").bind("change",function(){b.updateEmbed()})};
PlayerModalShare.prototype.close=function(){this.reset();this.$container.hide();this.sslastscreen.restoreLastScreenState();this.sslastscreen.isShareScreenVisible=!1;this.shareGATracking("modalClose")};PlayerModalShare.prototype.open=function(){$.slideshareEventManager.trigger("playershare");this.shareGATracking("share_cta")};PlayerModalShare.prototype.trackShareClick=function(a){this.shareGATracking(this.SHARE_ABBRS[a],"share_open")};
PlayerModalShare.prototype.shareGATracking=function(a,b){"undefined"!==typeof b&&(a=a+"_"+b);$.slideshareEventManager.trackEvent(this.gaCategory+a)};
(function(a){function b(){}function c(a){F=[a]}function d(a,b,c){return a&&a.apply(b.context||b,c)}function e(e){function L(a){z++||(A(),B&&(H[m]={s:[a]}),M&&(a=M.apply(e,[a])),d(I,e,[a,N,e]),d(O,e,[e,N]))}function G(a){z++||(A(),B&&a!=P&&(H[m]=a),d(J,e,[e,a]),d(O,e,[e,a]))}var e=a.extend({},Q,e),I=e.success,J=e.error,O=e.complete,M=e.dataFilter,C=e.callbackParameter,R=e.callback,X=e.cache,B=e.pageCache,S=e.charset,m=e.url,r=e.data,T=e.timeout,D,z=0,A=b,l,w,K;U&&U(function(a){a.done(I).fail(J);I=
a.resolve;J=a.reject}).promise(e);e.abort=function(){!z++&&A()};if(!1===d(e.beforeSend,e,[e])||z)return e;m=m||h;r=r?"string"==typeof r?r:a.param(r,e.traditional):h;m+=r?(/\?/.test(m)?"&":"?")+r:h;C&&(m+=(/\?/.test(m)?"&":"?")+encodeURIComponent(C)+"=?");!X&&!B&&(m+=(/\?/.test(m)?"&":"?")+"_"+(new Date).getTime()+"=");m=m.replace(/=\?(&|$)/,"="+R+"$1");B&&(D=H[m])?D.s?L(D.s[0]):G(D):(V[R]=c,l=a(u)[0],l.id=n+Y++,S&&(l[g]=S),W&&11.6>W.version()?(w=a(u)[0]).text="document.getElementById('"+l.id+"')."+
q+"()":l[f]=f,Z&&(l.htmlFor=l.id,l.event=p),l[t]=l[q]=l[x]=function(a){if(!l[E]||!/i/.test(l[E])){try{l[p]&&l[p]()}catch(b){}a=F;F=0;a?L(a[0]):G(j)}},l.src=m,A=function(){K&&clearTimeout(K);l[x]=l[t]=l[q]=null;y[s](l);w&&y[s](w)},y[k](l,C=y.firstChild),w&&y[k](w,C),K=0<T&&setTimeout(function(){G(P)},T));return e}var f="async",g="charset",h="",j="error",k="insertBefore",n="_jqjsp",p="onclick",q="on"+j,t="onload",x="onreadystatechange",E="readyState",s="removeChild",u="<script>",N="success",P="timeout",
V=window,U=a.Deferred,y=a("head")[0]||document.documentElement,H={},Y=0,F,Q={callback:n,url:location.href},W=V.opera,Z=!!a("<div>").html("<\!--[if IE]><i><![endif]--\>").find("i").length;e.setup=function(b){a.extend(Q,b)};a.jsonp=e})(jQuery);function SSBandInteraction(a){this.config=a;this._init()}
SSBandInteraction.prototype._init=function(){var a=this,b=this.config.container,c=this.config.linksDisabled;b.bind("mousedown",function(d){if(1===d.which){var e=$(this).offset();a.startX=d.pageX-e.left;b.bind("mouseup",function(a){var d,a=a.target,e=a.tagName.toUpperCase();if(c)d=!1;else if("SPAN"===e&&"A"===a.parentNode.tagName.toUpperCase())d=a.parentNode;else if("A"===e||"AREA"===e)d=a;d&&(a=parseInt(d.attributes.href.value,10),isNaN(a)&&window.open(d.href),$.slideshareEventManager.trackOutboundClick(d.href));
b.unbind("mouseup")})}});$(b).bind("click",function(a){a.preventDefault()});$(this).bind("bandclick",function(b){b.preventDefault();var b=b.ssData.x,c=a.config.width/3;b<c?$(a).trigger("bandprevious"):b>2*c&&$(a).trigger("bandnext")});$(".leftpoint").click(function(){$(a).trigger("bandprevious")});$(".rightpoint").click(function(){$(a).trigger("bandnext")})};
SSBandInteraction.prototype.activate=function(){$(this).bind("bandprevious",function(){$.slideshareEventManager.trigger("previous",{source:"band"})});$(this).bind("bandnext",function(){$.slideshareEventManager.trigger("next",{source:"band"})})};SSBandInteraction.prototype.deactivate=function(){$(this).unbind("bandprevious");$(this).unbind("bandnext")};SSBandInteraction.prototype.destroy=function(){};
"undefined"===typeof window.cookie&&(window.cookie=function(a,b,c){if("undefined"!=typeof b){c=c||{};null===b&&(b="",c.expires=-1);var d="";if(c.expires&&("number"==typeof c.expires||c.expires.toUTCString))"number"==typeof c.expires?(d=new Date,d.setTime(d.getTime()+864E5*c.expires)):d=c.expires,d="; expires="+d.toUTCString();var e=c.path?"; path="+c.path:"",f=c.domain?"; domain="+c.domain:"",c=c.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(b),d,e,f,c].join("")}else{b=null;if(document.cookie&&
""!==document.cookie){c=document.cookie.split(";");for(d=0;d<c.length;d++)if(e=jQuery.trim(c[d]),e.substring(0,a.length+1)==a+"="){b=decodeURIComponent(e.substring(a.length+1));break}}return b}});
void 0===$.slideshareEventManager&&$.extend({slideshareEventManager:{SHOUTEVENTS:{next:!0,previous:!0,gotoslide:!0,slidechanged:!0,leadcreated:!0,insight:!0},stats:{viewer_id:window.cookie("_uv_id")||Math.ceil(1E8*Math.random()),session_id:Math.ceil(1E8*Math.random()),last_slide:1,last_activity:$.now()},functions:{showlastscreen:function(){this.controller.displayLastScreen()},hidelastscreen:function(){this.controller.hideLastScreen()},gotofirstslide:function(){var a=this.controller;a.play(1);a.config.has_audio&&
this.trigger("slidecastseekslide",{index:1});"video"===a.config.player_type&&a.multimediaResource&&a.multimediaResource.videoPlayer.seek(0).play(!0)},next:function(a){var b=this.controller,c=b.currentPosition,d=b.slideCount,e=a&&a.touchedSlideNo,f=b.slides[c];e<c-3||(e>d-1&&b.lastSlideReached(),"ytube_video"===f.config.slideMode&&f._pauseVideo(),c===d&&"undefined"===typeof new_mobile_player?this.trigger("showlastscreen"):(c+=1,b.play(c,!1,a&&a.source),b.config.has_audio&&this.trigger("slidecastseekslide",
{index:c}),a&&a.source&&$.slideshareEventManager.trackEvent(a.source+"_"+c)))},previous:function(a){var b=this.controller,c=b.currentPosition,d=c-1,e=a&&a.source;b.slides[c].stop();b.play(d,!1,e);b.config.has_audio&&this.trigger("slidecastseekslide",{index:d});a&&a.source&&$.slideshareEventManager.trackEvent(a.source+"_"+d)},mobileScrollPlayingMode:function(a){this.controller.playingMode=a},gotolastslide:function(){var a=this.controller;a.play(a.slideCount)},document_touch_scroll:function(a){this.controller.currentComponentSet.slidedisplayer.manualScroll(a.delta)},
toggleaudio:function(){var a=this.controller;a.multimediaResource&&a.multimediaResource.togglePlay()},audioplayed:function(){this.controller.currentComponentSet.toolbar.updateAudioInteraction({audioPlaying:!0})},audiopaused:function(){this.controller.currentComponentSet.toolbar.updateAudioInteraction({audioPlaying:!1})},videoready:function(a){var b=this.controller;b.initVideoPlayer(a.mode);b.currentComponentSet.videobar._bindEvents();a.nonIosMobile&&((a=document.getElementsByTagName("video")[0])&&
a.play(),a.addEventListener("canplaythrough",function(){b.currentComponentSet.videobar.playReady=!0;b.currentComponentSet.videobar.addVideoListeners()}))},gotoslide:function(a){this.controller.play(a.index);$.slideshareEventManager.trackEvent("jumptoslide_"+a.index)},viewonss:function(){window.open(this.controller.config.slideview_url,"viewer")},viewfullscreen:function(){var a=this.controller,b=a.currentComponentSet,c=/msie/.test(navigator.userAgent.toLowerCase());"nativefullscreen"==a.currentViewMode||
"fullscreen"==a.currentViewMode||("document"===a.config.player_type&&b.slidedisplayer.setZoom(0),b.videobar&&(a.disableLeadForFullscreenVideo(!0),b.slidedisplayer.adjustSpinnerPosition(!0)),a.isNativeFullScreenSupported?("undefined"!==typeof SSDocumentDisplayer&&a.currentComponentSet.slidedisplayer instanceof SSDocumentDisplayer&&this.trigger("gotoslide",{index:1}),b.container.addClass("fullscreen"),a.switchNativeView("nativefullscreen")):"video"===a.config.player_type&&!c?(b.container.addClass("fullscreen"),
a.goHtmlFullscreenForVideo()):a.config.inpage_full_screen?(b.container.addClass("fullscreen"),a.switchView("fullscreen")):("undefined"!==typeof SSVideoEmbedSlide&&(a.currentPosition&&a.slides[a.currentPosition]instanceof SSVideoEmbedSlide)&&a.slides[a.currentPosition].stop(),window.open(a.getFullScreenUrl(),"viewer","width="+screen.width+",height="+screen.height+",location=no")))},leavefullscreen:function(){var a=this.controller;"normal"!=a.currentViewMode&&(a.currentComponentSet.container.removeClass("fullscreen"),
a.leaveFullScreen())},zoomin:function(){this.controller.currentComponentSet.slidedisplayer.zoomin()},zoomout:function(){this.controller.currentComponentSet.slidedisplayer.zoomout()},playersearch:function(){},playershare:function(a){this.controller.displayShareScreen(a)},metadataloaded:function(a){var b=this.controller,c=a.type;b._metaDataHandlers()[c].success.call(b,a.json)},metadataloadfailed:function(a){var b=this.controller,a=a.type;b._metaDataHandlers()[a].failure.call(b);this.trackRawEvent("jsplayer_debug",
a+"_metadataloadfailed",void 0,!0)},slidechanged:function(a){this.trigger("hidelastscreen");var b=a.index,c=this.controller;if(c.currentPosition!==b||a.force)c.updateCurrentPosition(b),b===c.config.start_slide&&c.config.show_image_player?c._load(b,!0):c._load(b),a.alreadyInPosition||c.currentComponentSet.slidedisplayer._scrollTo(b),2===b?$.slideshareEventManager.trackEvent("slidechange_2"):b===c.slideCount&&$.slideshareEventManager.trackEvent("slidechange_last"),c.has_lead&&(!this.controller.checkLeadFilledForAuthor()&&
b===c.config.form_after_slide_no)&&this.trigger("showleadform"),this.trackSlideTransitionTime(),$(window).trigger("resize")},slidescrolled:function(a){(this.controller.currentPosition!==a.index||a.force)&&this.trigger("slidechanged",a)},handlemultimedia:function(){var a=this.controller;a.multimediaResource&&(a.wasPlaying=a.multimediaResource.isPlaying(),a.multimediaResource.pause())},showleadform:function(){this.controller.leadShownAndDisabled||(this.trigger("handlemultimedia"),this.controller.currentComponentSet.leadForm.toggle(),
this.controller.currentComponentSet.leadForm.isVisible()&&this.controller.deactivateToolbar())},showleadforvideo:function(){this.controller.has_lead&&!this.controller.checkLeadFilledForAuthor()&&this.trigger("showleadform")},showleadcta:function(){this.controller.config.show_lead_cta&&this.controller.currentComponentSet.leadcta.show()},leadformloaded:function(a){this.trigger("showleadcta");a&&(this.controller.config.leadFormHtml=a.leadFormHtml)},leadcreated:function(){this.controller.leadShownAndDisabled=
!0;this.controller.setLeadFilledForAuthor();this.controller.currentComponentSet.leadcta&&this.controller.currentComponentSet.leadcta.hide();this.controller.activateToolbar()},screenoverlayclosed:function(){this.controller.multimediaResource&&this.controller.wasPlaying&&this.controller.multimediaResource.play()},showvideospinner:function(){var a=this.controller;a.currentComponentSet.slidedisplayer.videoSpinner.css("z-index",a.VIDEO_FULLSCREEN_ZINDEX).show()},hidevideospinner:function(){this.controller.currentComponentSet.slidedisplayer.videoSpinner.css("z-index",
"auto").hide()},toolbarshown:function(){$(".toolbar").css("z-index",$(".slideDisplayer").css("z-index"))},leadcancelled:function(){this.controller.leadShownAndDisabled=!0;this.controller.currentComponentSet.leadcta&&this.controller.currentComponentSet.leadcta.hide();this.controller.activateToolbar()},currentversionloaded:function(a){this.controller.slides[a.index].updateRenderedResourceVersion(a.resourceKey)},resourceloaded:function(a){var b=this.controller.slides[a.index];b.updateResource(a.resourceKey,
{status:"cached"});if("failed"!==b.status){var c=b.resources,d;for(d in c)if(!0===c[d].cacheable&&"cached"!==c[d].status)return;b.status="cached";this.trigger("slideloaded",{index:a.index})}},resourceloadfailed:function(a){var b=this.controller.slides[a.index],c=a.resourceKey;b.updateResource(c,{status:"failed"});!0===b.resources[c].isCritical&&(b.status="failed",this.trigger("slideloadfailed",{index:a.index}));this.trackRawEvent("jsplayer_debug",c+"_resourceloadfailed",void 0,!0)},fontresourceloaded:function(a){var b=
this.controller;b.config.use_ssl&&-1!==a.style.indexOf(".eot")&&(a.style=a.style.replace(/http:\/\//g,"https://"));$("<style>"+a.style+"</style>").appendTo(b.currentComponentSet.container)},slideloaded:function(a){var b=this.controller,a=a.index,c=b.slides[a];c.currentViewMode.rendered&&("undefined"!==typeof new_mobile_player&&b.resetSlideShowHeight(a),c.paint());$("#playerFacade").hide();b.startSlide===a&&(window._jspl&&_jspl.pageInitTime)&&(c=(new Date).getTime()-_jspl.pageInitTime,window._ssPageMetrics&&
(window._ssPageMetrics.first_slide_time=c));b.preloadMoreIfIdle(a)},slideloadfailed:function(a){controller=this.controller;var b=controller.slides[a.index];$("#playerFacade").hide();b.currentViewMode.rendered&&b.displayError(controller.generateErrorDom("slide_error_template",{width:b.currentViewMode.width,height:b.currentViewMode.height}));controller.preloadMoreIfIdle(a.index);this.trackRawEvent("jsplayer_debug","slideloadfailed",this.controller.config.id+"_slide_"+a.index,!0)},videoloadfailed:function(){this.trackRawEvent("jsplayer_debug",
"videoloadfailed",void 0,!0)},slideloading:function(a){var b=this.controller,c=b.slides[a.index];-1===b.loadingSlides.indexOf(a.index)&&b.loadingSlides.push(a.index);c.currentViewMode.rendered&&c.displayLoading();b.currentPosition===a.index&&this.trackRawEvent("jsplayer_debug","current_slide_loading",void 0,!0)},audioloaded:function(){var a=this.controller,b=a.multimediaResource;b&&b.triggerPlayProgress();b.soundLoadHandler=function(){};a.currentComponentSet.toolbar.updateAudioInteraction({audioReady:!0})},
audiometaloaded:function(a){var b=this.controller,c=b.multimediaResource;c.slidePositions=a.transitions||{};c.metaDataReady=!0;c._trySoundCreation();b.currentComponentSet.toolbar.updateAudioInteraction({audioMetaReady:!0});(a=b.currentComponentSet.audiobar)&&(a.resource=c)&&a.renderSeekBar();0<b.currentPosition&&a.updateCurrentPosition(b.currentPosition)},audioloadfailed:function(){this.trackRawEvent("jsplayer_debug","audioloadfailed",void 0,!0)},audiometaloadfailed:function(){this.trackRawEvent("jsplayer_debug",
"audiometaloadfailed",void 0,!0)},updateaudioprogress:function(a){var b=this.controller.currentComponentSet.audiobar;b&&b.updateProgress(a.milliseconds)},updateaudiobuffer:function(a){var b=this.controller.currentComponentSet.audiobar;b&&b.updateBuffer(a.milliseconds)},updateaudiomarker:function(a){var b=this.controller.currentComponentSet.audiobar;b&&b.updateCurrentPosition(a.index)},slidecastseekslide:function(a){var a=a.index||1,b=this.controller.multimediaResource;b&&(b.setPosition(1E3*((b.slidePositions||
{})[a]||0)),b.triggerPlayProgress());this.trigger("gotoslide",{index:a})},showvolumecontrol:function(){var a=this.controller.currentComponentSet.toolbar;a&&a.volumeControl&&a.volumeControl.show()},hidevolumecontrol:function(){var a=this.controller.currentComponentSet.toolbar;a&&a.volumeControl&&a.volumeControl.hide()},changevolume:function(a){var b=this.controller.multimediaResource;b&&b.changeVolume(a.volume)},volumechanged:function(a){var b=this.controller.currentComponentSet.toolbar;b&&b.volumeControl&&
b.volumeControl.setVolume(a.volume)},repaint:function(a){this.controller.repaint(a.mobile)}},registerController:function(a){this.controller=a},registerPlayer:function(a){this.player=$(a)},registerEnvironment:function(a){this.hostedIn=a||"slideshare"},trigger:function(a,b){void 0!==this.functions[a]&&this.functions[a].call(this,b);this.SHOUTEVENTS[a]&&this.player.trigger({type:a,ssData:b})},trackEvent:function(a,b){void 0!==window._gaq&&window._gaq.push(["_trackEvent","jsplayer",this.hostedIn,a,void 0,
!!b])},trackRawEvent:function(a,b,c,d){void 0!==window._gaq&&window._gaq.push(["_trackEvent",a,b,c,void 0,!!d])},trackValueEvent:function(a,b,c,d){void 0!==window._gaq&&window._gaq.push(["_trackEvent",a,b,c,d])},trackOutboundClick:function(a){this.beaconState({event:"outbound_click",href:a,slide_no:this.controller.currentPosition,ts:$.now()})},trackUniqueViewer:function(){this.beaconState({event:"page_hit",ts:$.now()})},trackSlideTransitionTime:function(){var a=$.now(),b=a-this.stats.last_activity;
this.stats.last_activity=a;var c=this.stats.last_slide,d=this.controller.slideCount;this.trigger("insight",{index:c,time:b});this.beaconState({event:"slide_time_spent",time_spent:b,slide_no:c,total_slides:d,ts:a});this.stats.last_slide=this.controller.currentPosition},beaconState:function(a){var b=this.controller.config;if(1===b.track_slide_enable){var c=("https:"===document.location.protocol?"https://":"http://")+b.beacon_url,a=$.extend(a,{slideshow_id:b.id,author_id:b.author_id,source:b.hosted_in,
_uv_id:this.stats.viewer_id,session_id:this.stats.session_id});b.referer&&(a.ref=b.referer);var d=function(a){(new Image(1,1)).src=c+(0>c.indexOf("?")?"?":"&")+$.param(a)};"complete"===document.readyState?d(a):window.addEventListener?window.addEventListener("load",function(){d(a)},!1):window.attachEvent&&window.attachEvent("onload",function(){d(a)});!b.do_not_track&&window.cookie("_uv_id",this.stats.viewer_id,{expires:730,path:"/"})}},getController:function(){return this.controller},getCurrentPosition:function(){return this.controller.currentPosition}}});
function SSLastScreen(a){this.config=a;this._init()}SSLastScreen.prototype._init=function(){this.isShareScreenVisible=this.isVisible=!1;this.gaCategory="lastscreen_v1_";this.$container=$("#lastScreen")};SSLastScreen.prototype.exitFullScreenIfIdle=function(){var a=setTimeout(function(){$(".lastScreen").is(":visible")&&($.browser.mozilla||$(".btnLeaveFullScreen").trigger("click"))},5E3);$(".lastScreen").on("click",function(){clearTimeout(a)})};
SSLastScreen.prototype.show=function(a,b){this.isVisible=!0;if(void 0!==this.overlay)this.overlay.show(),this.lastScreen.show();else{var c="lastScreenContainer";isMobile()&&(c+=" mobile");this.lastScreen=this.$container.addClass(c).appendTo(this.config.renderTo);this.overlay=this.lastScreen.find(".j-last-screen-overlay");this.setDimensions(a);this.populateTemplate();b&&this.exitFullScreenIfIdle()}};
SSLastScreen.prototype.populateTemplate=function(){this.lastScreen.find(".lastScreenEmbedCode, .j-share-embed-link").val(this.config.embed_code);this.lastScreen.find(".lastScreenSSUrl, .j-share-link-url").val(this.config.settings.url);this.lastScreen.find(".j-share-embed-wp").val(this.config.wp_code);$.fn.tooltip&&this.lastScreen.find(".j-tooltip").tooltip();this.config.disableRelated&&(this.lastScreen.find(".lastScreen").addClass("j-disable-related"),this.config.disableShare&&this.lastScreen.find(".lastScreen").addClass("j-disable-share"),
this.isProLastScreen=!0);this._bindEvents();this.initShareWidget();this.populateEmbedSizes()};SSLastScreen.prototype.initShareWidget=function(){this.shareWidgets=new SSShareWidgets({container:this.lastScreen,gaCategory:this.gaCategory})};SSLastScreen.prototype.populateEmbedSizes=function(){var a=this.lastScreen.find(".j-embed-size-picker");$.each(this.config.embed_sizes.presets,function(b,c){var d=$("<option/>").val(b).text(c.size.width+"x"+c.size.height);a.append(d)});a.val(this.config.embed_sizes.config.defaultPreset).change()};
SSLastScreen.prototype._bindEvents=function(){this.lastScreenModalShare=new PlayerModalShare({btnShare:".lastscreen-share-cta",parentEl:".lastScreenContainer .lastScreen",el:".lastScreenContainer .lastScreen .modal-share"},this);var a=this;this.lastScreen.find(".j-email-cta").bind("click",function(){a.lastScreen.find("#last-screen-modal-share, .j-lastscreen").toggle();a.lastScreen.find(".j-share-email-to").focus();$.slideshareEventManager.trackEvent(a.gaCategory+"email_cta")});this.lastScreen.find(".j-last-screen-replay").bind("click",
function(b){b.preventDefault();b.stopPropagation();a.hide();$.slideshareEventManager.trigger("gotofirstslide");$.slideshareEventManager.trackEvent(a.gaCategory+"replay")});this.lastScreen.find(".j-last-screen-overlay, .j-lastscreen-close").bind("click",function(){a.hide()});this.lastScreen.find(".j-lastscreen-related a").bind("click",function(){$.slideshareEventManager.trackEvent(a.gaCategory+"relatedclick")})};
SSLastScreen.prototype.showShareScreen=function(a){this.shareOpenedFromLastScreen=this.isVisible;this.isShareScreenVisible?this.hide():(this.isShareScreenVisible=!0,this.show(a),this.lastScreen.find(".j-lastscreen").hide(),this.lastScreen.find("#last-screen-modal-share").show())};SSLastScreen.prototype.restoreLastScreenState=function(){this.shareOpenedFromLastScreen?this.lastScreen.find(".j-lastscreen").show():(this.lastScreen.find(".j-lastscreen").show(),this.hide())};
SSLastScreen.prototype.hide=function(){this.isShareScreenVisible=this.isVisible=!1;this.overlay.hide();this.lastScreen.hide()};SSLastScreen.prototype.destroy=function(){this.overlay&&(this.overlay.remove(),delete this.overlay);this.lastScreen&&(this.lastScreen.remove(),delete this.lastScreen)};
SSLastScreen.prototype.setDimensions=function(a){void 0!==this.lastScreen&&(this.config.lastScreenClass&&this.lastScreen.find(".lastScreen").addClass(this.config.lastScreenClass),this.lastScreen.css({height:a.height,width:a.width}))};function SSLeadCTA(a){this.config=a;this.image_width=103;this._init()}SSLeadCTA.prototype._init=function(){this.lead_cta_div=$("<div/>").html(this.config.html).appendTo(this.config.renderTo);this.cta_link=$("#lead_cta",this.lead_cta_div);this.setDimensions();this.deactivate()};
SSLeadCTA.prototype.setDimensions=function(){this.lead_cta_div.addClass("lead_cta_div").css({left:"50%","margin-left":-this.image_width/2+"px"});this.config.has_audio&&this.lead_cta_div.addClass("slide_cast")};SSLeadCTA.prototype._bindEvents=function(){this.cta_link.unbind("click").bind("click",function(a){a.preventDefault();a.stopPropagation();$.slideshareEventManager.trigger("showleadform")})};
SSLeadCTA.prototype._unbindEvents=function(){this.cta_link.unbind("click").bind("click",function(a){a.preventDefault();a.stopPropagation()})};SSLeadCTA.prototype.deactivate=function(){this._unbindEvents()};SSLeadCTA.prototype.activate=function(){this._bindEvents()};SSLeadCTA.prototype.hide=function(){$(".lead_cta_div").hide();$.slideshareEventManager.trigger("screenoverlayclosed")};SSLeadCTA.prototype.show=function(){this.lead_cta_div.show()};
SSLeadCTA.prototype.destroy=function(){this._unbindEvents();this.lead_cta_div.remove()};function SSLeadForm(a){this.config=a;this.config.showLeadForm=!0;this._init()}SSLeadForm.prototype._init=function(){var a=this;""===this.config.leadFormHtml?$.ajax({url:this.config.lead_form_url,data:{},dataType:"html",cache:!1,type:"GET",success:function(b){a.config.leadFormHtml=b;$.slideshareEventManager.trigger("leadformloaded",{leadFormHtml:b})},failure:function(){}}):$.slideshareEventManager.trigger("leadformloaded")};
SSLeadForm.prototype.toggle=function(){null===document.getElementById("leadsform-placeholder-new")&&($(this.config.leadFormHtml).insertBefore(this.config.renderTo),this.config.show_skip_button||$(".j-lead-cancel").remove());$(".lead-overlay").fadeToggle(1E3,"linear")};
SSLeadForm.prototype._bindEvents=function(){$(".player").on("submit",".lead-overlay form",function(a){a.preventDefault();a.stopPropagation();var c=$(".lead-overlay #leadsform-placeholder-new"),d=$(".lead-overlay .progress"),e=$(".lead-overlay .progress_done"),f=$(".lead-overlay .progress_error");c.form=$("form",c);try{c.form[0].validate_formfields()&&(c.css({height:"120px"}),d.show(),c.form.hide(),$.slideshareEventManager.trackEvent("bigfoot_leadsform","sent"),$.ajax({url:c.form[0].action,data:"mechanism=Sidebar&"+
c.form.serialize(),type:"POST",cache:!1,success:function(){e.show();d.hide();$(".lead-overlay").fadeOut(3E3,"linear");$.slideshareEventManager.trigger("leadcreated");c.html('<div class="progress_done">'+e.html()+"</div>")},error:function(){d.hide();f.show();$(".lead-overlay").fadeOut(2E3,"linear");setTimeout(function(){f.hide();c.form.show()},2E3)}}))}catch(g){}});if(this.config.show_skip_button){var a=this;$(this.config.renderTo).parent().on("click",".j-lead-cancel",function(b){b.preventDefault();
b.stopPropagation();$.slideshareEventManager.trigger("leadcancelled");a.hide()})}else $(".j-lead-cancel").remove()};SSLeadForm.prototype._unbindEvents=function(){$(".j-lead-cancel").off("click");$(".player").off("submit",".lead-overlay form")};SSLeadForm.prototype.deactivate=function(){this._unbindEvents();$(".lead-overlay").remove()};SSLeadForm.prototype.activate=function(){this._unbindEvents();this._bindEvents()};SSLeadForm.prototype.hide=function(){$(".lead-overlay").hide()};
SSLeadForm.prototype.show=function(){$(".lead-overlay").show()};SSLeadForm.prototype.isVisible=function(){return $(".lead-overlay").is(":visible")};SSLeadForm.prototype.destroy=function(){$(".lead-overlay").remove()};function SSReferralShare(a){this.config=a;this._init()}SSReferralShare.prototype={};
SSReferralShare.prototype._init=function(){$.slideshareEventManager.trackValueEvent("bigfoot_slideview","social_referral_share",this.config.network+"_load");$(".j-socialActions").hide();this.shareInfo={facebook:{text:"Share",color:"#3b5998"},linkedin:{text:"Share",color:"#0e76a8"},twitter:{text:"Share",color:"#00acee"},googleplus:{text:"Share",color:"#dd4b39"}}[this.config.network];this.config.isExperiment?(this.$container=$('<div class="viral-share j-viral-share-cta"><div class="share-icon '+this.config.network+
'"></div><span class="share-text">'+this.shareInfo.text+"</span></div>"),this.config.renderTo.append(this.$container)):this.$container=$(".j-share");this.bindEvents()};
SSReferralShare.prototype.bindEvents=function(){var a=this,b=0;this.config.isExperiment&&(this.$container.click(function(){a.share()}),this.$container.hover(function(){$(this).css({background:a.shareInfo.color})},function(){$(this).css({background:""})}),this.config.renderTo.bind("mousemove",function(){a.show();a.hideTimeout&&window.clearTimeout(a.hideTimeout);a.hideTimeout=window.setTimeout(function(){a.hide()},2E3)}));this.$container.click(function(){b+=1;1===b&&$.slideshareEventManager.trackValueEvent("bigfoot_slideview",
"social_referral_share",a.config.network+"_click")})};SSReferralShare.prototype.show=function(){this.$container.fadeIn(300)};SSReferralShare.prototype.hide=function(){this.$container.fadeOut(300)};SSReferralShare.prototype.share=function(){window.open(this.config.shareOptions[this.config.network+"_share"],"shareDialog","width=626,height=436")};function SSReplayScreen(a){this.config=a;this.html=a.settings.html;this._init()}SSReplayScreen.prototype._init=function(){};
SSReplayScreen.prototype.show=function(a){void 0===this.overlay&&(this.overlay=$("<div/>").css({width:"100%",height:"100%","background-color":"black",opacity:0.75,position:"absolute",top:0,left:0}).appendTo(this.config.renderTo),this.lastScreen=$("<div/>").css({position:"absolute"}).html(this.html).appendTo(this.config.renderTo),this.setDimensions(a),this.bindEvents())};
SSReplayScreen.prototype.destroy=function(){this.overlay&&(this.overlay.remove(),delete this.overlay);this.lastScreen&&(this.lastScreen.remove(),delete this.lastScreen)};SSReplayScreen.prototype.bindEvents=function(){var a=this;this.lastScreen.find(".replayScreenReplay").bind("click",function(b){b.preventDefault();a.destroy();$.slideshareEventManager.trigger("gotofirstslide");$.slideshareEventManager.trackEvent("lastscreen_replay")})};
SSReplayScreen.prototype.setDimensions=function(a){if(void 0!==this.lastScreen){var b;b=(a.height-25)/2;a=(a.width-93)/2;b=0>b?0:parseInt(b,10);a=0>a?0:parseInt(a,10);this.lastScreen.css({top:b,left:a})}};function SSResource(a){"undefined"!==typeof a&&(this.TIMEOUT_LIMIT=1E5,this.RETRY_WAIT_TIME=3E3,this.config=a,this.resourceKey=a.resourceKey,this._init())}SSResource.prototype._init=function(){this._initResourceConfig();this.status="initialized"};
SSResource.prototype.reset=function(){this.status="initialized";this.retries=0;if(this.suffixes){var a,b;for(a in this.suffixes)b=this.suffixes[a],b.status="initialized",delete b.startTime,b.retries=2}};SSResource.prototype.load=function(){this.status="loading";this.loadBlocked||(this.startTime=(new Date).getTime(),this._tryLoad())};
SSResource.prototype.update=function(a){var b,c;for(b in a)c=a[b],"image"===this.resourceKey&&"sizes"===b?this.delayedInitialize&&this.delayedInitialize(c):"image"===this.resourceKey&&"linkData"===b?this.addLinks(c):this[b]=c};
SSResource.prototype.resourceErrorInternalHandler=function(){var a=this;return function(){var b=a.startTime,b=(new Date).getTime()-b,c=a.retries;0<c&&b<a.TIMEOUT_LIMIT?(a.update({retries:c-1}),setTimeout(function(){a._tryLoad()},a.RETRY_WAIT_TIME)):$.slideshareEventManager.trigger("resourceloadfailed",{index:a.config.slideIndex,resourceKey:a.resourceKey})}};function SSShareCta(a){this.config=a;this.visible=!1;this.init()}
SSShareCta.prototype.init=function(){this.container=$(this.config.html).appendTo(this.config.renderTo);this.hideLikeSave();this.setLikeButtonState();slideshare_object&&(slideshare_object.add_signin_link&&!slideshare_object.user.loggedin&&!this.isParentSSObjLoggedIn())&&slideshare_object.add_signin_link("a.favorite, a.save");this.bindEvents()};SSShareCta.prototype.isParentSSObjLoggedIn=function(){try{return window.parent.slideshare_object.user.loggedin}catch(a){return!1}};
SSShareCta.prototype.hideLikeSave=function(){(!this.isSSEmbed()||"slideview"===this.config.hosted_in)&&$(this.config.renderTo).addClass("hide_like_save_player")};
SSShareCta.prototype.setLikeButtonState=function(){var a=$(".action-btns-container a.j-favorite").data("ssid");this.isSSEmbed()&&(window&&window.parent&&window.parent.document&&($(window.parent.document.getElementById("modal_player_like")).hasClass("j-favorited")||$(window.parent.document).find("a.favorite").filter("[data-ssid="+a+"]").hasClass("j-favorited")))&&slideshare_object.toggleLikeButton(".action-btns-container a.j-favorite")};
SSShareCta.prototype.isSSEmbed=function(){try{return parentWindow=window.parent.document,!0}catch(a){return!1}};
SSShareCta.prototype.bindEvents=function(){that=this;this.container.on("click",".share",function(a){a.preventDefault();a.stopPropagation();$.slideshareEventManager.trigger("playershare",!0);$.slideshareEventManager.trackEvent("share_cta_clicked")});if(this.isSSEmbed())this.container.on("click",".favorite",function(a){if(window.parent.slideshare_object.modal_favorite_click)window.parent.slideshare_object.modal_favorite_click(a,this);else if(slideshare_object.user.loggedin||that.isParentSSObjLoggedIn()){a.preventDefault();
a.stopPropagation();var b=$(this),c=b.hasClass("j-favorite"),d=c?"/favorite/create":"/favorite/delete",a=b.data("ssid"),b={element:b,url:d,selectors:".j-favorite, .j-favorited",event_category:"player",is_favorited:c,data:{slideshow_id:a,user_id:slideshare_object.user.id,source:"slideviewer",response_type:"json"}};slideshare_object.toggleLikeButton($(window.parent.document).find("div.grid_thumbnail_content a.favorite").filter("[data-ssid="+a+"]"));slideshare_object.favorites_call_handler(b)}});this.container.on("click",
".j-save",function(a){$.slideshareEventManager.trackEvent("save_cta_clicked");!slideshare_object.user.loggedin&&(!that.isParentSSObjLoggedIn()&&that.isSSEmbed()&&window.parent.slideshare_object.logged_out_action_button_click)&&(a.preventDefault(),a.stopPropagation(),window.parent.slideshare_object.logged_out_action_button_click(this))})};SSShareCta.prototype.show=function(){this.container.fadeIn(100);return this.visible=!0};
SSShareCta.prototype.hide=function(){this.visible=!1;return this.container.fadeOut(100)&&!1};function SSShareWidgets(a){this.gaCategory=a.gaCategory;this.container=a.container}
SSShareWidgets.prototype.loadTwWidget=function(){var a=window,b;var c,d=document.getElementsByTagName("script")[0];document.getElementById("twitter-wjs")?b=void 0:(b=document.createElement("script"),b.id="twitter-wjs",b.src="//platform.twitter.com/widgets.js",d.parentNode.insertBefore(b,d),b=window.twttr||(c={_e:[],ready:function(a){c._e.push(a)}}));a.twttr=b;var e=this;twttr.ready(function(a){a.events.bind("tweet",function(a){a&&$.slideshareEventManager.trackEvent(e.gaCategory+"twitter_share")});
a.events.bind("click",function(){$.slideshareEventManager.trackEvent(e.gaCategory+"twitter_click")})})};
SSShareWidgets.prototype.loadFBWidget=function(){var a,b=document.getElementsByTagName("script")[0];document.getElementById("facebook-jssdk")||(a=document.createElement("script"),a.id="facebook-jssdk",a.src="//connect.facebook.net/en_US/all.js",b.parentNode.insertBefore(a,b));var c=this,d=function(){$.slideshareEventManager.trackEvent(c.gaCategory+"fb_share")},e={appId:2490221586,status:!0,cookie:!0,xfbml:!0,oauth:!0,channelUrl:NaN};"object"===typeof FB?window.setTimeout(function(){FB.XFBML.parse();
FB.Event.subscribe("edge.create",d)},50):window.fbAsyncInit=function(){FB.init(e);FB.Event.subscribe("edge.create",d)}};
SSShareWidgets.prototype.loadLIwidget=function(){var a=document.location.protocol+"//platform.linkedin.com/in.js?async=true";"undefined"===typeof IN?$.getScript(a,function(){IN&&IN.init({api_key:"y4wa9oe4c6nu",credentials_cookie:!0,authorize:!0,entropy:Math.floor(1E4*Math.random())})}):IN.parse(document);window.socialScreenLinkedInSuccess=function(){$.slideshareEventManager.trackEvent(that.gaCategory+"li_share")}};
SSShareWidgets.prototype.loadGplusWidget=function(){window.___gcfg={lang:"en-US"};var a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src="https://apis.google.com/js/plusone.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);window.socialScreenPlusOneSuccess=function(){$.slideshareEventManager.trackEvent(that.gaCategory+"gplus_share")}};
SSShareWidgets.prototype.loadPinItWidget=function(){var a=document.getElementsByTagName("SCRIPT")[0],b=document.createElement("SCRIPT");b.type="text/javascript";b.async=!0;b.src="//assets.pinterest.com/js/pinit.js";a.parentNode.insertBefore(b,a);this.container.find(".pinit-btn").click(function(){$.slideshareEventManager.trackEvent(that.gaCategory+"pinit_share")})};
SSShareWidgets.prototype.sendMail=function(a){var b=!1,c=a.sendButton;b||(c.trigger("mailSending"),b=!0,$.post(a.postTo,{data:a.params,dataType:"json"}).success(function(a){b=!1;a.isSuccess?c.trigger("mailSendSuccess"):c.trigger("mailSendFailure",a)}).error(function(){b=!1;c.trigger("mailSendError")}))};function SSShareOptions(a){this.config=a;this.renderTo=a.renderTo;this.html=this.config.html;this._init()}SSShareOptions.prototype._init=function(){};
SSShareOptions.prototype.show=function(){var a=this;this.shareOptions=$("<div/>").html(this.html).appendTo(this.renderTo);this.setShareObjects();$.each({".thirdPartyShare a.Twitter":this.config.twitterShare,".thirdPartyShare a.Linkedin":this.config.linkedinShare},function(b,c){a.shareOptions.find(b).bind("click",function(a){a.preventDefault();window.open(c,"ss_share","width=660,height=490,toolbar=no,resizable=fixed,status=no,scrollbars=no,menubar=no,screenX=0,screenY=0").focus()})});this.fbLike.replaceWith(this.config.facebookLike)};
SSShareOptions.prototype.setShareObjects=function(){this.twitter=this.shareOptions.find(".Twitter");this.linkedIn=this.shareOptions.find(".Linkedin");this.fbLike=this.shareOptions.find(".fb-like")};function SSShareScreen(a){this.config=a;this.html=a.settings.html;this._init()}SSShareScreen.prototype._init=function(){};
SSShareScreen.prototype.show=function(a){void 0===this.overlay&&(this.overlay=$("<div/>").addClass("jsplShareScreenOverlay").appendTo(this.config.renderTo),this.shareScreen=$("<div/>").addClass("jsplShareScreenContainer").html(this.html).appendTo(this.config.renderTo),this.setDimensions(a),this.populateTemplate(),this.bindEvents())};
SSShareScreen.prototype.populateTemplate=function(){this.shareScreen.find(".shareScreenEmbedCode").val(this.config.embed_code);this.shareScreen.find(".shareScreenSSUrl").val(this.config.settings.url);this.shareScreen.find(".shareScreenFromName").val(this.config.settings.user_name);this.populateShareOptions()};
SSShareScreen.prototype.populateShareOptions=function(){this.shareOptions=new SSShareOptions({renderTo:this.shareScreen.find(".shareScreen"),html:this.config.shareOptions.html,linkedinShare:this.config.shareOptions.linkedin_share,twitterShare:this.config.shareOptions.twitter_share,facebookLike:this.config.shareOptions.facebook_like_button});this.shareOptions.show()};SSShareScreen.prototype.destroy=function(){this.overlay.remove();delete this.overlay;this.shareScreen.remove();delete this.shareScreen};
SSShareScreen.prototype.bindEvents=function(){var a=this;this.shareScreen.find(".close").bind("click",function(b){b.preventDefault();a.destroy();$.slideshareEventManager.trigger("screenoverlayclosed")});this.shareScreen.find("input[type=text]").bind("click",function(){this.select()});var b=this.shareScreen.find("input[type=submit]");this.shareScreen.find("form").bind("submit",function(a){a.preventDefault()});b.bind("click",function(c){c.preventDefault();var c=a.shareScreen.find(".shareScreenFromName").val(),
d=a.shareScreen.find(".shareScreenMailID").val(),e=a.shareScreen.find(".shareDefaultMessage").val();0===c.length||0===d.length||("undefined"!==typeof a.emailProgress&&a.emailProgress.remove(),$.slideshareEventManager.trackEvent("lastscreen_emailsending"),a.emailProgress=$("<span/>").text("sending..."),b.parent().prepend(a.emailProgress),$.ajax({url:"/share/contacts/"+a.config.settings.slideshow_id,type:"POST",data:{"message[body]":e,"message[from]":c,"message[to]":d},dataType:"json",success:function(b){!0===
b.success?($.slideshareEventManager.trackEvent("lastscreen_emailsent"),a.emailProgress.text("Sent")):($.slideshareEventManager.trackEvent("lastscreen_emailfailed"),a.emailProgress.text("Sending failed"))},error:function(){$.slideshareEventManager.trackEvent("lastscreen_emailerror");a.emailProgress.text("Sending failed")}}))});this.shareScreen.find("[name=embed-code], [name=embed-url]").bind("click",function(){$.slideshareEventManager.trackEvent("lastscreen_embedclick")})};
SSShareScreen.prototype.setDimensions=function(a){if(void 0!==this.shareScreen){this.config.shareScreenClass&&this.shareScreen.find(".shareScreen").addClass(this.config.shareScreenClass);var b=$(this.shareScreen).width(),c=$(this.shareScreen).height(),c=(a.height-c)/2,a=(a.width-b)/2,c=0>c?0:parseInt(c,10),a=0>a?0:parseInt(a,10);this.shareScreen.css({top:c,left:a})}};
function SSSlide(a){"undefined"!==typeof a&&(this.index=a.index,this.realIndex=a.realIndex,this.setContentDimensions(a.contentWidth,a.contentHeight),delete a.contentWidth,delete a.contentHeight,this.config=a,this._init())}SSSlide.prototype.setContentDimensions=function(a,b){this.contentWidth=a;this.contentHeight=b};
SSSlide.prototype._init=function(){this.status="initialized";this.controller=$.slideshareEventManager.getController();this.playerContainer="#"+this.controller.config.container;this.$stage=$(this.playerContainer+" .stage");this.$slide=this.$stage.find(".slide").eq(this.index-1);this.$imageEle=this.$slide.children(".slide_image");this.viewModes={};this.resources={};this._createResources();this._bindEvents()};SSSlide.prototype.stop=function(){};
SSSlide.prototype._createResources=function(){"undefined"===typeof this.config.timestamp&&(this.config.timestamp=(new Date).getTime());switch(this.config.slideMode){case "image":this.resources.image=new SSFallbackImageResource({baseUrl:this.config.bucketLocation,timestamp:this.config.timestamp,resourceKey:"image",indexGenerator:this.config.indexGenerator,playerWidth:this.config.playerWidth,slideIndex:this.index,realIndex:this.realIndex,is_private:this.config.is_private,signatures:{},availableSizes:this.config.availableSizes,
contentWidth:this.contentWidth,privateImageSignatures:this.config.privateImageSignatures,conversionVersion:this.config.conversionVersion,isFullscreen:this.isFullscreen(),show_image_player:this.config.show_image_player});break;case "html":this.resources.image=new SSBgImageResource({baseUrl:this.config.bucketLocation,availableSizes:this.config.availableSizes,timestamp:this.config.timestamp,resourceKey:"image",indexGenerator:this.config.indexGenerator,playerWidth:this.config.playerWidth,slideIndex:this.index,
realIndex:this.realIndex,is_private:this.config.is_private,contentWidth:this.contentWidth,conversionVersion:this.config.conversionVersion,privateImageSignatures:this.config.privateImageSignatures}),this.resources.html=new SSHtmlResource({baseUrl:this.config.bucketLocation,timestamp:this.config.timestamp,resourceKey:"html",indexGenerator:this.config.indexGenerator,slideIndex:this.index,realIndex:this.realIndex,is_private:this.config.is_private,conversionVersion:this.config.conversionVersion,signature:this.config.htmlResourceSignature})}delete this.config.availableSizes};
SSSlide.prototype.reset=function(){this.status="initialized";for(var a in this.resources)resource=this.resources[a].reset()};
SSSlide.prototype.load=function(){if("cached"===this.status)this._getNewResourceVersions(this.currentViewMode.wrapperWidth),$.slideshareEventManager.trigger("slideloaded",{index:this.index});else if("loading"===this.status)$.slideshareEventManager.trigger("slideloading",{index:this.index});else if("failed"===this.status)$.slideshareEventManager.trigger("slideloadfailed",{index:this.index});else{this.status="loading";$.slideshareEventManager.trigger("slideloading",{index:this.index});for(var a in this.resources)resource=
this.resources[a],resource.status="loading",resource.load()}};SSSlide.prototype.updateResource=function(a,b){"undefined"!==typeof this.resources[a]&&this.resources[a].update(b)};SSSlide.prototype.displayError=function(a,b){this.empty();a.appendTo(this.currentViewMode.wrapper);var c=this,d=a.find("input");b?d.hide():d.bind("click",function(a){a.preventDefault();a.stopPropagation();c.reset();c.load()})};
SSSlide.prototype.paint=function(){"undefined"===typeof this.currentViewMode.imageElement&&this.render();this.currentViewMode.imageElement.css({width:this.currentViewMode.width});if("html"===this.config.slideMode){var a;a=Modernizr.csstransforms?{"-moz-transform":"scale("+this.currentViewMode.contentScale+")","-webkit-transform":"scale("+this.currentViewMode.contentScale+")","-o-transform":"scale("+this.currentViewMode.contentScale+")",msTransform:"scale("+this.currentViewMode.contentScale+")","-moz-transform-origin":"0 0",
"-webkit-transform-origin":"0 0","-o-transform-origin":"0 0",msTransformOrigin:"0 0"}:{zoom:this.currentViewMode.contentScale};this.currentViewMode.contentElement.css({width:this.currentViewMode.width,height:this.currentViewMode.height});this.currentViewMode.contentElement.children(".ssml_div").css(a)}else"image"===this.config.slideMode&&!0!==this.config.show_image_player&&this._updateLinks()};SSSlide.prototype.isFullscreen=function(){return"fullscreen"===this.currentMode||"nativefullscreen"===this.currentMode};
SSSlide.prototype.render=function(){this.empty();var a,b,c=this;$.slideshareEventManager.getCurrentPosition();this.config.show_image_player?(a=this.$imageEle,b=this.isFullscreen()||638<this.$stage.width()?this.$imageEle.data("full"):320>=this.$stage.width()?this.$imageEle.data("small"):this.$imageEle.data("normal")):(a=$("<img/>").css({height:"auto",position:"absolute",top:0,left:0,margin:0,padding:0}),b=this.resources.image.getContent());if("undefined"!==typeof b){this.imageEle=a;this.currentViewMode.imageElement=
a;var d=new Image;d.onload=function(){var a=c.controller.currentPosition,d=c.$slide.height(),g=c.$stage.scrollTop();c.$slide.css("min-height",0);c.controller.firstLoad="undefined"===typeof c.controller.firstLoad?!0:!1;c.currentViewMode.imageElement.attr({src:b});"infographic"===c.config.playerType&&c.addScrollIfNeeded();"document"===c.config.playerType&&(d=c.$slide.height()-d,c.controller.firstLoad&&!isMobile()&&(c.controller.currentComponentSet.slidedisplayer.$slides.css("min-height",c.$slide.height()),
g+=d*(a-2)),c.index<a&&c.$stage.scrollTop(g+d));$(window).trigger("resize");a=function(){c.loadLinks()};c.config.show_image_player&&("complete"===document.readyState?a():window.addEventListener?window.addEventListener("load",a,!1):window.attachEvent&&window.attachEvent("onload",a));"function"===typeof isIos&&isIos()&&$(this).css("-webkit-backface-visibility","hidden");"slideview"===c.config.hosted_in&&!c.config.show_image_player&&(a=$(this).height(),$(this).css("height","auto"),g=$(this).height(),
a!==g&&!window.slideResizeEventFired&&(window.slideResizeEventFired=!0,a=c.config.ssid,g="00",d=/slide-(\d+)-.*/,d.test(this.src)&&(g=this.src.match(d)[1]),$.slideshareEventManager.trackRawEvent("jsplayer_debug","slideresize",a+"_slide_"+g)),$(this).css("height","auto"))};d.src=b;this.config.show_image_player||a.appendTo(this.currentViewMode.wrapper);"html"===this.config.slideMode&&(a="<style>"+this.resources.html.getContent().style+"</style>",$(a).appendTo(this.currentViewMode.wrapper),this.currentViewMode.contentElement=
$("<div/>").css({position:"absolute",overflow:"hidden"}).html(this.resources.html.getContent().html),this.currentViewMode.contentElement.appendTo(this.currentViewMode.wrapper))}};SSSlide.prototype.addScrollIfNeeded=function(){this.$imageEle.height()>this.$slide.height()+15&&this.$slide.css("overflow-y","auto")};
SSSlide.prototype.areLinksEnabled=function(){return this.config.is_render_all_links||"undefined"!==typeof slideshare_object&&slideshare_object.user.su?!0:-1!==$.inArray(this.index,[1,2,3])?!1:!0};
SSSlide.prototype.loadLinks=function(){var a=this;!0===a.controller.linksLoaded?this.renderLinksForSlide():$.jsonp({url:a.config.bucketLocation+"/meta.js?"+this.config.timestamp,callback:"slideshare_jsonp_meta_hook_trigger",cache:!0,timeout:1E4,success:function(b){a.controller.links=b.links;a.controller.linksLoaded=!0;a.renderLinksForSlide();a.controller.slideAspectRatio=b.sizes[1].height/b.sizes[1].width;a.controller.updateEmbedSizes()}})};
SSSlide.prototype.renderLinksForSlide=function(){if(this.areLinksEnabled()){var a="#"+this.controller.config.container,b=this.index-this.config.linkOffset;if(!("undefined"===typeof this.controller.links||"undefined"===typeof this.controller.links[b])){var c=this.imageEle,d=c.naturalWidth(),e=c.naturalHeight(),b=this.controller.links[b].links,f=b.length,g,h,j,k="image_map_"+this.index+"_"+(new Date).getTime();void 0!==this.currentViewMode.imageMapId&&$("#"+this.currentViewMode.imageMapId).remove();
this.currentViewMode.imageMapId=k;var n='<map id="'+k+'" name="'+k+'">';for(g=0;g<f;g++)h=b[g],j=[parseInt((h.box[0]||0)*d/100,10),parseInt((h.box[3]||0)*e/100,10),parseInt((h.box[2]||0)*d/100,10),parseInt((h.box[1]||0)*e/100,10)],j=j.join(","),n=n+'<area shape="rect" target="_blank" coords="'+j+'" href="'+h.url+'" rel="nofollow" />';$(n+"</map>").appendTo(a+" .image_maps");c.attr("usemap","#"+k);$(document).ready(function(){c.rwdImageMaps()});$("map area").click(function(a){$.slideshareEventManager.trackOutboundClick(a.target.href)})}}};
SSSlide.prototype._updateLinks=function(){void 0!==this.currentViewMode.imageMapId&&$("#"+this.currentViewMode.imageMapId).remove();this._renderLinks()};
SSSlide.prototype._renderLinks=function(){var a=this.resources.image.links;if(void 0!==a){var b=this.currentViewMode.width,c=this.currentViewMode.height,d=a.length,e,f,g,h="image_map_"+this.currentMode+"_"+this.index+parseInt(2500*Math.random(),10),j='<map id="'+h+'" name="'+h+'">';for(e=0;e<d;e++)f=a[e],g=[parseInt((f.box[0]||0)*b/100,10),parseInt((f.box[3]||0)*c/100,10),parseInt((f.box[2]||0)*b/100,10),parseInt((f.box[1]||0)*c/100,10)],g=g.join(","),j=j+'<area shape="rect" coords="'+g+'" href="'+
f.url+'" rel="nofollow" />';$(j+"</map>").appendTo(this.currentViewMode.wrapper);this.currentViewMode.imageElement.attr("usemap","#"+h);this.currentViewMode.imageMapId=h}};SSSlide.prototype._getNewResourceVersions=function(){this.resources.image._tryLoad(this.currentViewMode.wrapperWidth)};SSSlide.prototype.updateRenderedResourceVersion=function(a){this.currentViewMode.rendered&&"image"===a&&void 0!==this.currentViewMode.imageElement&&this.currentViewMode.imageElement.attr({src:this.resources.image.getContent()})};
SSSlide.prototype._bindEvents=function(){};function SSSlideDisplayer(a){"undefined"!==typeof a&&(this.config=a,this.slideOffsets=[],this.playerBgColor=a.playerBgColor||"jsplBgColorBigfoot",this.state="initialized",this.zoomIndex=0,this._init())}SSSlideDisplayer.prototype._init=function(){this.config.show_image_player?this.container=$(".stage"):(this.container=$("<div/>").addClass("slideDisplayer "+this.playerBgColor).appendTo(this.config.renderTo),this.showInitializer())};
SSSlideDisplayer.prototype.hideInitializer=function(){!this.config.show_image_player&&this.container.empty()};SSSlideDisplayer.prototype.error=function(a){this.hideInitializer();a.appendTo(this.container)};SSSlideDisplayer.prototype.zoomin=function(){var a=this.zoomIndex+1;a!==this.zoomLevels.length&&(this.zoomIndex=a,this.setZoom(a),$(this).trigger("zoomchanged"))};SSSlideDisplayer.prototype.zoomout=function(){0!==this.zoomIndex&&(this.zoomIndex-=1,this.setZoom(this.zoomIndex),$(this).trigger("zoomchanged"))};
SSSlideDisplayer.prototype.activate=function(){};SSSlideDisplayer.prototype.deactivate=function(){};SSSlideDisplayer.prototype.destroy=function(){this.container.remove()};SSSlideDisplayer.prototype._bindEvents=function(){};SSSlideDisplayer.prototype.refresh=function(a){var b=this;$.each(a,function(a,d){b.config[a]&&(b.config[a]=d)})};function SSTouchInteraction(a){this.config=a;this._init()}SSTouchInteraction.prototype._init=function(){this.touch={active:!1};this._bindEvents()};
SSTouchInteraction.prototype.scrollVariables=function(){this.slideHeight=$(".verticalStack").height();this.scrollBottomOffset=2*this.slideHeight};SSTouchInteraction.prototype.loadNextSlides=function(a){var a=a.data.touch,b=$(window).scrollTop();if($(".slideShow").height()-b<a.scrollBottomOffset)for(a=0;2>a;a++)$.slideshareEventManager.trigger("next",{source:"scroll_next"})};
SSTouchInteraction.prototype.loadNextSlide=function(a){a=$(a.target);a.hasClass(".verticalStack")||(a=a.closest(".verticalStack"));var b=parseInt(a.attr("touchCount"),10),c=parseInt(a.attr("slideNumber"),10);isNaN(c)&&(c=parseInt($("div[touchcount]").last().attr("slidenumber"),10));isNaN(b)?(a.attr("touchCount",1),$.slideshareEventManager.trigger("next",{source:"scroll_next",touchedSlideNo:c}),window._gaq.push(["_trackEvent","jsplayer","slideTouched",config.player_type]),_sstq&&_sstq.push(["track",
"mobile_swipe","next_slide_"+c])):3>b&&(a.attr("touchCount",b+1),$.slideshareEventManager.trigger("next",{source:"scroll_next",touchedSlideNo:c}));1===c&&1<b||90===window.orientation||-90===window.orientation?updateSlideNumber(c):updateSlideNumber(c+1)};SSTouchInteraction.prototype.getTouchEvent=function(){return"ontouchstart"in window?"touchstart":window.navigator.msPointerEnabled?"MSPointerDown":"click"};
SSTouchInteraction.prototype.slideNextOnScroll=function(){var a=this;if(!config.scroll_test)$("#slideshow").on(this.getTouchEvent(),function(b){a.loadNextSlide(b)});$("#more-slide").on("click",function(b){window._gaq.push(["_trackEvent","jsplayer","LoadMoreSlide",config.player_type]);a.loadNextSlide(b)})};
SSTouchInteraction.prototype.activate=function(){var a=$(".hideControls"),b=$(".slideShow"),c=$.slideshareEventManager,d=this.getTouchEvent(),e=this,f=0<window.innerWidth?window.innerWidth:screen.width,g=this.config.container.width();"embed"===this.config.hostedIn&&f<g&&$("body").width(f);a.show();$("#slide_next_mobile").on(d,function(a){a.preventDefault();c.trigger("next",{source:"tap_next"});window._gaq.push(["_trackEvent","jsplayer","mobile_next",config.real_player_type])});$("#slide_previous_mobile").on(d,
function(a){a.preventDefault();c.trigger("previous",{source:"tap_previous"});window._gaq.push(["_trackEvent","jsplayer","mobile_prev",config.real_player_type])});if("undefined"!==typeof new_mobile_player){$("#slide-end").live(d,function(){$(window).scrollTop(0)});this.slideNextOnScroll();$("#play-icon").on(this.getTouchEvent(),function(a){a.stopPropagation();"undefined"!==typeof e.containerHeight?b.height(e.containerHeight):b.height(2*$(".verticalStack").height());$("#play-icon, .presentationSharing, #more-related-content").hide();
$("#view-done, #view-save, #slidecount, #more-slide").show();$(".header").removeClass("fixed-header");config.scroll_test&&(e.scrollVariables(),$(window).bind("scroll",{touch:e},e.loadNextSlides));c.trigger("mobileScrollPlayingMode","play");window._gaq.push(["_trackEvent","jsplayer","Mobile_PlayButton",config.player_type])});$("#view-done").on(this.getTouchEvent(),function(a){a.stopPropagation();a.preventDefault();e.containerHeight=b.height();b.height($(".verticalStack").height());$("#view-done, #view-save, #slidecount, #more-slide, #slide-end").hide();
$(".header").addClass("fixed-header");c.trigger("mobileScrollPlayingMode","pause");$.mobile.silentScroll(0);$(".presentationSharing, #more-related-content").show();$("#play-icon").css("display","table");config.scroll_test&&$(window).unbind("scroll",e.loadNextSlides);window._gaq.push(["_trackEvent","jsplayer","Mobile_ViewDoneButton",config.player_type])});var h=$("#view-save");h.on(this.getTouchEvent(),function(a){a.stopPropagation();a.preventDefault();h.hasClass("mobile_view_saved")||(h.addClass("mobile_view_saved"),
a=h.data("save-url"),window._gaq.push(["_trackEvent","jsplayer","Mobile_ViewSaveButton_Click",config.player_type]),$.ajax({url:a,success:function(a){a.success?(h.text("Saved"),window._gaq.push(["_trackEvent","jsplayer","Mobile_ViewSaveButton_Success",config.player_type])):(h.removeClass("mobile_view_saved"),window._gaq.push(["_trackEvent","jsplayer","Mobile_ViewSaveButton_Failure",config.player_type]))},error:function(){h.removeClass("mobile_view_saved");window._gaq.push(["_trackEvent","jsplayer",
"Mobile_ViewSaveButton_Error",config.player_type])}}))});$(document).bind("touchmove",function(){h.is(":visible")&&(h.addClass("scrolling-hide"),$("#view-done, #view-save").hide())});$(document).bind(this.getTouchEvent(),function(){h.hasClass("scrolling-hide")&&(h.removeClass("scrolling-hide"),$("#view-done, #view-save").show())})}else a.on(d,function(){var a=parseInt($(".current_slide_number").text(),10),b=$(".previous .ui-btn-inner"),c=$(".next .ui-btn-inner"),d=$(".landscape-full-screen-slidecount");
d.show();setTimeout(function(){d.hide()},1E3);1!==a&&(b.show(),setTimeout(function(){b.hide()},1E3));a!==parseInt($("#total_slides_number").text(),10)?(c.show(),setTimeout(function(){c.hide()},1E3)):setTimeout(function(){$(".lastScreen").css("z-index",99999)},2E3);4===a&&$(".navIcons").removeClass("highlight")})};SSTouchInteraction.prototype.deactivate=function(){};SSTouchInteraction.prototype.destroy=function(){};SSTouchInteraction.prototype._bindEvents=function(){};
function SSFontResource(a){this.resourceTemplate={prefix:a.baseUrl,cacheable:!0,retries:2,isCritical:!1};SSResource.call(this,a)}SSFontResource.prototype=new SSResource;SSFontResource.prototype._initResourceConfig=function(){var a=this.resourceTemplate;this.url=a.prefix+"meta-"+this.config.indexString+this.config.suffix+"?"+this.config.timestamp;this.cacheable=a.cacheable;this.retries=a.retries||0;this.isCritical=a.isCritical};
SSFontResource.prototype._tryLoad=function(){$.jsonp({url:this.url,callback:"slideshare_jsonp_font_hook_trigger",success:this.resourceLoadedInternalHandler(),error:this.resourceErrorInternalHandler(),cache:!0,timeout:1E4})};SSFontResource.prototype.resourceLoadedInternalHandler=function(){var a=this;return function(b){a.status="cached";$.slideshareEventManager.trigger("fontresourceloaded",{style:b.style})}};
SSFontResource.prototype.resourceErrorInternalHandler=function(){var a=this;return function(){var b=a.startTime,b=(new Date).getTime()-b,c=a.retries;0<c&&b<a.TIMEOUT_LIMIT?(a.update({retries:c-1}),setTimeout(function(){a._tryLoad()},1E3)):$.slideshareEventManager.trigger("fontloadfailed",{})}};
function SSHtmlResource(a){this.resourceTemplate={prefix:a.baseUrl,key:"page_",suffix:".js?"+a.timestamp,digitLength:4,cacheable:!0,retries:2,isCritical:!0};a.is_private&&void 0===a.signature&&(this.loadBlocked=!0);SSResource.call(this,a)}SSHtmlResource.prototype=new SSResource;SSHtmlResource.prototype.ready=function(){this._initResourceConfig();this.loadBlocked=!1;"loading"===this.status&&this.load()};
SSHtmlResource.prototype._initResourceConfig=function(){if(!(this.config.is_private&&void 0===this.config.signature)){var a=this.resourceTemplate,b=this.config.indexGenerator(this.config.realIndex,a.digitLength);this.url=this.config.is_private?a.prefix+a.key+b+".js"+this.config.signature:a.prefix+a.key+b+a.suffix;this.cacheable=a.cacheable;this.retries=a.retries||0;this.isCritical=a.isCritical}};SSHtmlResource.prototype.updateSignature=function(a){this.config.signature=a};
SSHtmlResource.prototype._tryLoad=function(){$.jsonp({url:this.url,callback:"slideshare_jsonp_hook_trigger",success:this.resourceLoadedInternalHandler(),error:this.resourceErrorInternalHandler(),cache:!0,timeout:1E4})};
SSHtmlResource.prototype.resourceLoadedInternalHandler=function(){var a=this;return function(b){var c=b.style.replace(/a\.ssml_a \{.*?\}/,"").replace(/\.ssml_div span \{.*?\}/,"").replace(/\.ps([\s\S]*?)\{[\s\S]*?\}/g,"").replace(/@font-face[\s\S]*?\{[\s\S]*?\}/g,"");a.html=b.html;a.style=c;$.slideshareEventManager.trigger("resourceloaded",{index:a.config.slideIndex,resourceKey:a.resourceKey})}};SSHtmlResource.prototype.getContent=function(){return{html:this.html,style:this.style}};
function SSImageResource(a){"undefined"!==typeof a&&(a.availableSizes?(this.imageVersions=this._mapSizesToVersions(a.availableSizes),delete a.availableSizes,this._setUrlGenerator(a.is_private)):this.loadBlocked=!0,this.contentWidth=a.contentWidth,delete a.contentWidth,SSResource.call(this,a),this.RETRY_WAIT_TIME=1E3,delete this.imageVersions)}SSImageResource.prototype=new SSResource;
SSImageResource.prototype._initResourceConfig=function(){if(void 0!==this.imageVersions){var a=this.resourceTemplate;this.indexString=this.config.indexGenerator(this.config.realIndex,a.digitLength);this.suffixes=this._getSuffixes();this.cacheable=a.cacheable;this.retries=a.retries||0;this.isCritical=a.isCritical;this.privateUrls={}}};SSImageResource.prototype._getUrl=function(a){return a[a.length-1].url};
SSImageResource.prototype._mapSizesToVersions=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&(b[parseInt(c,10)]=a[c]);return b};SSImageResource.prototype._setUrlGenerator=function(a){a?(this.useTimeStamp=!1,this._generateUrl=this._generatePrivateUrl):this._generateUrl=this._generateUrl};SSImageResource.prototype.delayedInitialize=function(a){this.imageVersions=this._mapSizesToVersions(a.availableSizes);this.contentWidth=a.contentWidth;this._setUrlGenerator(a.is_private);a.is_private||this.ready()};
SSImageResource.prototype.ready=function(){this._initResourceConfig();delete this.imageVersions;this.loadBlocked=!1;"loading"===this.status&&this.load()};
SSImageResource.prototype._tryLoad=function(a){var a=a||this.config.playerWidth,a=this._getAppropriateWidth(a),b=this.suffixes[a],c;c=this._getUrl(b);a===this.currentWidth&&"initialized"!==b.status||("failed"===b.status?this.versionErrorInternalHandler(a,c)():(this.currentWidth=a,"loading"!==b.status&&("loaded"===b.status?this.versionLoadedInternalHandler(a,c)():(b.status="loading",void 0===b.startTime&&(b.startTime=(new Date).getTime()),this.config.show_image_player&&(c=$(".slide").eq(this.config.realIndex-
1).children(),c=this.config.isFullScreen?c.data("full"):c.data("normal")),b=new Image,$(b).bind("load",this.versionLoadedInternalHandler(a,c)).bind("error",this.versionErrorInternalHandler(a)),void 0!==c&&(b.src=c)))))};
SSImageResource.prototype.versionLoadedInternalHandler=function(a,b){var c=this;return function(){c.suffixes[a].status="loaded";"loading"===c.status?(c.url=b,c.resourceLoadedInternalHandler()()):"cached"===c.status&&a===c.currentWidth&&(c.url=b,$.slideshareEventManager.trigger("currentversionloaded",{index:c.config.slideIndex,resourceKey:c.resourceKey}))}};
SSImageResource.prototype.versionErrorInternalHandler=function(a){var b=this;return function(){var c=b.suffixes[a],d=c.startTime,d=(new Date).getTime()-d,e=c.retries;if(0<e&&d<b.TIMEOUT_LIMIT)c.retries=e-1,c.status="initialized",setTimeout(function(){b._tryLoad()},b.RETRY_WAIT_TIME);else if(c.status="failed","loading"===b.status&&a===b.currentWidth){var c=!1,f;for(f in b.suffixes)if(d=b.suffixes[a],"loading"===d.status||"loaded"==d.status)c=!0;c||b.resourceErrorInternalHandler()()}}};
SSImageResource.prototype.resourceLoadedInternalHandler=function(){var a=this;return function(){$.slideshareEventManager.trigger("resourceloaded",{index:a.config.slideIndex,resourceKey:a.resourceKey})}};SSImageResource.prototype.getContent=function(){var a=this.suffixes[this.currentWidth];if("loaded"===a.status)return this.url;for(var b in this.suffixes)if(a=this.suffixes[b],"loaded"===a.status)return url=this._getUrl(a);return this.url};
SSImageResource.prototype._getAppropriateWidth=function(a){var b,c,d;b=this.suffixes;var e=[];for(c in b)c=parseInt(c,10),b.hasOwnProperty(c)&&e.push(c);e.sort(function(a,b){return a-b});426>a&&2<=window.devicePixelRatio&&(a=638);for(b=0;b<e.length;b++)if(d=c=e[b],a<=c)return c;return d};function SSMetaResource(a){this.resourceTemplate={url:a.url,cacheable:!0,retries:2,isCritical:!0};SSResource.call(this,a)}SSMetaResource.prototype=new SSResource;
SSMetaResource.prototype._initResourceConfig=function(){var a=this.resourceTemplate;this.url=a.url+"?"+this.config.timestamp;this.cacheable=a.cacheable;this.retries=a.retries||0;this.isCritical=a.isCritical};SSMetaResource.prototype._tryLoad=function(){$.jsonp({url:this.url,callback:"slideshare_jsonp_meta_hook_trigger",success:this.resourceLoadedInternalHandler(),error:this.resourceErrorInternalHandler(),cache:!0,timeout:1E4})};
SSMetaResource.prototype.resourceLoadedInternalHandler=function(){var a=this;return function(b){a.status="loaded";$.slideshareEventManager.trigger("metadataloaded",{type:a.config.type,json:b})}};SSMetaResource.prototype.resourceErrorInternalHandler=function(){var a=this;return function(){var b=a.startTime,b=(new Date).getTime()-b,c=a.retries;0<c&&b<a.TIMEOUT_LIMIT?(a.update({retries:c-1}),setTimeout(function(){a._tryLoad()},1E3)):$.slideshareEventManager.trigger("metadataloadfailed",{type:a.config.type})}};
function SSBgImageResource(a){this.resourceTemplate={prefix:a.baseUrl,digitLength:3,cacheable:!0,retries:0,isCritical:!0};this.useTimeStamp=!0;var b=a.availableSizes;this.imageVersions=[];for(var c in b)this.imageVersions[parseInt(c,10)]=b[c];a.is_private?(this.useTimeStamp=!1,this._generateUrl=this._generatePrivateUrl):this._generateUrl=this._generateUrl;SSImageResource.call(this,a)}SSBgImageResource.prototype=new SSImageResource;
SSBgImageResource.prototype._generateUrl=function(a,b,c){return this.config.baseUrl+"images/"+parseInt(c,10)+"/slide-"+a+"-"+b+".jpg?cb="+this.config.timestamp};SSBgImageResource.prototype._generatePrivateUrl=function(a,b,c){return this.config.baseUrl+"images%2F"+parseInt(c,10)+"%2Fslide-"+a+"-"+b+".jpg"+this.config.privateImageSignatures[b][c].url};
SSBgImageResource.prototype._getSuffixes=function(){var a={},b=this.imageVersions,c,d,e,f,g,h;for(d in b)if(b.hasOwnProperty(d)){d=parseInt(d,10);e=b[d];a[d]=[];f=e.length;for(c=0;c<f;c++)g=parseInt(e[c],10),h={url:this._generateUrl(this.indexString,d,e[c]),status:"initialized",retries:2},a[d][isNaN(g)?75:g]=h}return a};function SSFallbackImageResource(a){this.resourceTemplate={prefix:a.baseUrl,digitLength:1,cacheable:!0,retries:0,isCritical:!0};this.useTimeStamp=!0;SSImageResource.call(this,a)}
SSFallbackImageResource.prototype=new SSImageResource;SSFallbackImageResource.prototype._generateUrl=function(a,b,c){return this.config.baseUrl+"/"+c+"/slide-"+a+"-"+b+".jpg?"+this.config.timestamp};SSFallbackImageResource.prototype._generatePrivateUrl=function(a,b,c){return"undefined"===typeof this.config.privateImageSignatures?"":this.config.baseUrl+"%2F"+c+"%2Fslide-"+a+"-"+b+".jpg"+this.config.privateImageSignatures[b][c].url};
SSFallbackImageResource.prototype._getSuffixes=function(){var a=[],b=this.imageVersions,c,d,e,f,g,h;for(d in b)if(b.hasOwnProperty(d)){d=parseInt(d,10);f=b[d];a[d]=[];h=f.length;for(c=0;c<h;c++)g=parseInt(f[c],10),e={url:this._generateUrl(this.indexString,d,g),status:"initialized",retries:2},a[d][g]=e}return a};SSFallbackImageResource.prototype.addLinks=function(a){this.links=a.links||[]};SSFallbackImageResource.prototype.addSignature=function(a){this.config.privateImageSignatures=a};
function SSInfographicDisplayer(a){"undefined"!==typeof a&&SSSlideDisplayer.call(this,a)}SSInfographicDisplayer.prototype=new SSSlideDisplayer;
SSInfographicDisplayer.prototype.start=function(a){"undefined"===typeof this.slidesContainer&&(this.slidesContainer=$(".slide_container"),this.bindEvents());this.config.playerBgColor&&(this.playerBgColor=this.config.playerBgColor);this.slides=a.slides;this.slide=this.slides[1];this.slideContainer=this.slidesContainer.children(".slide");this.slide.setContainer({mode:a.mode,bgColor:this.playerBgColor,container:this.slideContainer})};
SSInfographicDisplayer.prototype.bindEvents=function(){this.config.isMobileDevice||this.slidesContainer.bind("click",function(a){a.preventDefault();a.stopPropagation();$.slideshareEventManager.trigger("viewfullscreen")})};SSInfographicDisplayer.prototype.setDimensions=function(a){"object"===typeof a&&(this.config.width=a.width,this.config.height=a.height)};SSInfographicDisplayer.prototype.emptySlides=function(){};SSInfographicDisplayer.prototype.setPrerenderedSlides=function(){};
SSInfographicDisplayer.prototype.showInitializer=function(){this.config.show_image_player||$("<div/>").addClass(".jsplInitializer").css({width:this.container.width()-10,height:this.container.height()-20}).html("Loading...").appendTo(this.container)};SSInfographicDisplayer.prototype._scrollTo=function(a){if(this.config.show_image_player){var b=this.slidesContainer.children();b.removeClass("show");b.eq(a-1).addClass("show")}};function SSInfographicSlide(a){SSSlide.call(this,a);this.padding=5}
SSInfographicSlide.prototype=new SSSlide;SSInfographicSlide.prototype.empty=function(){};SSInfographicSlide.prototype.setContainer=function(a){var b=a.mode;void 0===this.viewModes[b]&&(this.viewModes[b]={rendered:!1,bgColor:a.bgColor||"jsplBgColorBigfoot",container:a.container,wrapper:$("<div/>")});this.viewModes[b].container.css({position:"relative"});this.currentViewMode=this.viewModes[b];this.currentViewMode.wrapper.removeClass("hide");this.currentMode=a.mode};
SSInfographicSlide.prototype.show=function(a){if(!this.currentViewMode.rendered||a)this.currentViewMode.rendered=!0,this.load()};SSInfographicSlide.prototype.hide=function(){this.$slide.hide()};SSInfographicSlide.prototype.displayLoading=function(){};
$(document).ready(function(){var a=$("#main_navbar").height(),b=!0;setInterval(function(){b=!0},10);$(window).on("scroll",function(){var c=$("#svPlayerId");if(b&&c&&c.offset()){b=!1;abs_top=c.offset().top-a;var d=parseInt(c.css("height"),10);550>d||(c=$(this).scrollTop(),d=d+abs_top-450,c>d&&(c=d),c>abs_top?($(".action-btns-container").css("top",8+c-abs_top+"px"),$(".modal-popup").css("top",75+c-abs_top+"px")):($(".action-btns-container").css("top","8px"),$(".modal-popup").css("top","75px")))}})});
function SSPresentationDisplayer(a){"undefined"!==typeof a&&(SSSlideDisplayer.call(this,a),this.zoomLevels=[1],this.prerenderedSlides=[],!a.isTouch&&this.initPointlyFinger())}SSPresentationDisplayer.prototype=new SSSlideDisplayer;SSPresentationDisplayer.prototype.initPointlyFinger=function(){this.rightbandInteraction=$("<div/>").attr({"class":"rightpoint pointly"}).insertAfter(this.container);this.leftbandInteraction=$("<div/>").attr({"class":"leftpoint pointly"}).insertAfter(this.container)};
SSPresentationDisplayer.prototype._scrollTo=function(a){if("playing"===this.state)if(this.config.show_image_player){var b=this.slidesContainer.children();b.removeClass("show");b.eq(a-1).addClass("show")}else"function"==typeof isIos&&isIos(),this.slidesContainer.css("margin-left",-1*this.slideOffsets[a])};
SSPresentationDisplayer.prototype.start=function(a){var b,c;void 0===this.slideContainers&&(this.slideContainers=[]);var d=this.slideContainers;if(void 0===this.slides){this.slides=a.slides;this.state="playing";this.hideInitializer();this.slidesContainer=this.config.show_image_player?$(".slide_container"):$("<div/>").appendTo(this.container);for(b=1;b<=this.config.slideCount;b++)d[b]=this.config.show_image_player?$(".slide").eq(b-1):$("<div/>").appendTo(this.slidesContainer)}!this.config.show_image_player&&
this.slidesContainer.removeClass(this.playerBgColor).addClass("slidesContainer "+a.playerBgColor);a.playerBgColor&&(this.slidesContainer.removeClass(this.playerBgColor),this.playerBgColor=a.playerBgColor,this.slidesContainer.addClass(this.playerBgColor));for(b=1;b<=this.config.slideCount;b++)c=this.slides[b],c.setContainer({mode:a.mode,container:d[b],bgColor:this.playerBgColor,slideNumber:b})};
SSPresentationDisplayer.prototype.showInitializer=function(){var a,b;a=this.container.height()/2-16;b=this.container.width()/2-16;$("<img/>").attr({src:this.config.spinnerUrl,"class":"jsplInitializer"}).css({width:32,height:32,top:a,left:b}).appendTo(this.container)};
SSPresentationDisplayer.prototype.setDimensions=function(a){"object"===typeof a&&(this.config.width=a.width,this.config.height=a.height);a=a&&a.partial;!this.config.show_image_player&&this.container.css({height:this.config.height,width:this.config.width});if(!a&&"playing"===this.state){this.panelWidth=0;var b,c;c=0;for(a=1;a<=this.config.slideCount;a++)b=this.slides[a],!this.config.show_image_player&&b.setDimensions({parentHeight:this.config.height,parentWidth:this.config.width}),this.slideOffsets[a]=
c,c+=b.wrapperOffset();this.slidesContainer.width(c);this.width=c}};SSPresentationDisplayer.prototype.setPrerenderedSlides=function(a){var b;for(b=a.start;b<=a.end;b++)-1===$.inArray(b,this.prerenderedSlides)&&this.prerenderedSlides.push(b)};SSPresentationDisplayer.prototype.emptySlides=function(){for(var a in this.slides){var b=this.slides;b.hasOwnProperty(a)&&b[a].hide()}this.prerenderedSlides=[]};function SSPresentationSlide(a){SSSlide.call(this,a);this.PADDING=0}
SSPresentationSlide.prototype=new SSSlide;SSPresentationSlide.prototype.wrapperOffset=function(){return this.currentViewMode.wrapperWidth};SSPresentationSlide.prototype.empty=function(){"undefined"!==typeof this.currentViewMode.wrapper&&this.currentViewMode.wrapper.empty()};
SSPresentationSlide.prototype.displayLoading=function(){var a,b;a=this.currentViewMode.height/2-16;b=this.currentViewMode.width/2-16;this.empty();this.spinnerUrl=this.isFullscreen()?this.config.spinnerUrlFullscreen:this.config.spinnerUrl;$("<img/>").attr({src:this.spinnerUrl}).css({width:32,height:32,top:a,left:b,position:"absolute"}).appendTo(this.currentViewMode.wrapper)};
SSPresentationSlide.prototype.setDimensions=function(a){var b,c,d,e,f=a.parentWidth,g=a.parentHeight,h=f/g;void 0===this.contentWidth||void 0===this.contentHeight?(b=f,c=g,e=d=h,$.slideshareEventManager.trackRawEvent("jsplayer_debug","no_content_meta_info","st_"+this.config.stripped_title)):(b=this.contentWidth,c=this.contentHeight,d=b/c,e=b/(c-20));var j;e>h?(b=f/b,c=16*b,e=f,j=h/d,h=0,d=100*((1-j)/2)+"%",a=j*a.parentHeight):(b=g/c,c=16*b,j=d/h,d=0,h=100*((1-j)/2)+"%",e=j*a.parentWidth,a=g);e=parseInt(e,
10);a=parseInt(a,10);this.currentViewMode.container.css({width:f,height:g});!this.config.show_image_player&&this.currentViewMode.wrapper.css({width:e,height:a,top:d,left:h,position:"absolute",padding:this.PADDING,overflow:"hidden"});this.currentViewMode.wrapperWidth=f;this.currentViewMode.wrapperHeight=g;this.currentViewMode.top=d;this.currentViewMode.left=h;this.currentViewMode.contentScale=b;this.currentViewMode.fontscale=c;this.currentViewMode.width=e;this.currentViewMode.height=a};
SSPresentationSlide.prototype.hide=function(){this.currentViewMode.rendered&&(this.empty(),delete this.currentViewMode.contentElement,delete this.currentViewMode.imageElement,this.currentViewMode.rendered=!1)};SSPresentationSlide.prototype.show=function(a){if(!this.currentViewMode.rendered||a)this.currentViewMode.rendered=!0,this.load()};SSPresentationSlide.prototype.play=function(){this.show()};
SSPresentationSlide.prototype.setContainer=function(a){var b=a.mode,c=this.viewModes[b],d=!1;this.config.isStartSlide&&this.config.show_image_player&&(d=!0);d={rendered:d,container:a.container};void 0===c?(this.config.show_image_player||(d.wrapper=$("<div/>").appendTo(a.container)),c=d):"nativefullscreen"==b&&(this.config.show_image_player||(d.wrapper=this.currentViewMode.wrapper),c=d);this.config.show_image_player||(c.container.removeClass(),d=a.bgColor||"jsplBgColorBigfoot",d="undefined"===typeof new_mobile_player?
d+" horizontalStack":d+" verticalStack",c.container.addClass(d));(d=a.slideNumber)&&c.container.attr("slideNumber",d);this.currentViewMode=this.viewModes[b]=c;this.currentMode=a.mode};
function SSToolbar(a){this.config=a;this.GA_EVENTS={viewonss:"toolbar_viewonss",zoomin:"toolbar_zoomin",zoomout:"toolbar_zoomout",viewfullscreen:"toolbar_fullscreen",leavefullscreen:"toolbar_leavefullscreen"};this.GA_EVENTS_SRC={previous:"toolbar_prev",next:"toolbar_next"};this._init();this._ELEMENTS=this.getElements(a.elementOverrides);this._ELEMENT_PRIORITIES={1:["nav"],5:["viewOnSS"],2:["fullScreen","leaveFullScreen"],3:["share"],4:["goToSlide"],6:["zoomButtons"]};this._BUTTONS=this.getButtons({btnFirst:".btnFirst",
btnPrevious:".btnPrevious",btnNext:".btnNext",btnLast:".btnLast",btnSS:".btnSS",btnViewOnSS:".btnViewOnSS",btnFullScreen:".btnFullScreen",btnLeaveFullScreen:".btnLeaveFullScreen",btnZoomOut:".btnZoomOut",btnZoomIn:".btnZoomIn",btnFind:".btnFind",btnShare:".btnShare",btnAudio:".btnAudio",btnVolume:".btnVolume"},a.buttonOverrides);this._ELEMENT_VISIBILITY={share:!this.config.disableShare,fullScreen:!this.config.disableFullScreen&&!this.config.isFullScreen,leaveFullScreen:!this.config.disableLeaveFullScreen&&
this.config.isFullScreen,viewOnSS:this.config.enableViewSS,zoomButtons:this.config.enableZoomButtons||!1,nav:!this.config.disableNav,goToSlide:!this.config.disableGoToSlide};this._ELEMENT_SECTION={nav:"one",share:"two",fullScreen:"two",leaveFullScreen:"two",goToSlide:"two",viewOnSS:"one",zoomButtons:"two"};a={small:29,normal:88};"document"==this.config.playerType||"infographic"===this.config.playerType?(this._ELEMENT_WIDTHS={nav:30,share:72,fullScreen:24,leaveFullScreen:24,goToSlide:57,viewOnSS:a[this.config.toolbarClass],
zoomButtons:56},this._ELEMENT_SECTION.share="one"):this._ELEMENT_WIDTHS={nav:57,share:35,fullScreen:24,leaveFullScreen:24,goToSlide:57,viewOnSS:a[this.config.toolbarClass]};this.config.toolbarPadding=6}
SSToolbar.prototype._init=function(){var a=this.container=this.config.show_image_player?$(".toolbar"):$("<div/>").attr({"class":"toolbar"}).css({height:this.config.height}).html(this.config.html).appendTo(this.config.renderTo);this.config.toolbarClass=this._getToolbarClass();this.container.addClass(this.config.toolbarClass);this.config.disableShare&&a.find(".btnShare").hide();this.config.enableViewSS&&a.find(".btnViewOnSS").show();this.config.isFullScreen&&(a.find(".btnFullScreen").hide(),a.find(".btnLeaveFullScreen").show());
if(this.config.hasAudio||"video"===this.config.playerType)this.volumeControl=new SSVolumeControl({container:a.find(".jspl_volume_control"),renderTo:a,trigger:a.find(".btnVolume"),player:this.config.renderTo}),this.audioActive=!0;a.find(".goToSlideLabel>span").html("/"+this.config.totalSlideCount)};
SSToolbar.prototype._initForNativeFullScreen=function(){this._ELEMENT_VISIBILITY.fullScreen=!this.config.disableFullScreen&&!this.config.isFullScreen;this._ELEMENT_VISIBILITY.leaveFullScreen=!this.config.disableLeaveFullScreen&&this.config.isFullScreen};SSToolbar.prototype._getToolbarClass=function(){var a="";return a=400>this.config.width?"small":"normal"};SSToolbar.prototype.resetButtons=function(a){this._unbindButtonHandler(a);this._bindButtonHandler(a)};
SSToolbar.prototype.getElements=function(a){var b=this.container,c={};$.each({nav:".nav",share:".btnShare",fullScreen:".btnFullScreen",leaveFullScreen:".btnLeaveFullScreen",viewOnSS:".btnViewOnSS",goToSlide:".goToSlideLabel",zoomButtons:".docActions"},function(d,e){c[d]=a&&a[d]?$(a[d]):b.find(e)});return c};SSToolbar.prototype.getButtons=function(a,b){var c=this,d={};$.each(a,function(a,f){d[a]=b&&b[a]?$(b[a]):c.container.find(f)});return d};
SSToolbar.prototype.deactivate=function(){$.each(this._BUTTONS,function(a,b){b.unbind("click")});this._unbindButtonHandler(this._BUTTONS);this.container.find(".goToSlideLabel>input[type=text]").attr("disabled",!0);this.active=!1;this.config.hasAudio&&this.updateAudioInteraction();"video"===this.config.playerType&&this._activateAudio()};
SSToolbar.prototype.activate=function(){this._bindButtonHandler({btnViewOnSS:"viewonss",btnFirst:"gotofirstslide",btnSS:"viewonss",btnPrevious:"previous",btnNext:"next",btnLast:"gotolastslide",btnFullScreen:"viewfullscreen",btnLeaveFullScreen:"leavefullscreen",btnZoomOut:"zoomout",btnZoomIn:"zoomin",btnFind:"playersearch",btnShare:"playershare"});var a=this.container.find(".goToSlideLabel>input[type=text]");a.attr("disabled",!1);a.bind("keyup",function(a){a.stopPropagation();13===a.keyCode&&(a=$(a.target).val(),
isNaN(a)||(a=parseInt(a,10),$.slideshareEventManager.trigger("gotoslide",{index:a})))});a.bind("focus",function(a){$(a.target).select()});this.active=!0;this.config.hasAudio&&this.updateAudioInteraction();"video"===this.config.playerType&&this._activateAudio()};
SSToolbar.prototype.updateAudioInteraction=function(a){for(var b in a)this[b]=a[b];"video"===this.config.playerType?this._activateAudio():this.active&&this.audioReady&&this.audioMetaReady?(!this.audioActive&&this._activateAudio(),this._updateAudioDisplay()):this.audioActive&&this._deactivateAudio()};
SSToolbar.prototype._activateAudio=function(){this.container.find(".btnAudio,.btnVolume").removeClass("disabled");this._bindButtonHandler({btnAudio:"toggleaudio",btnVolume:"showvolumecontrol"});this.audioActive=!0};SSToolbar.prototype._deactivateAudio=function(){this.container.find(".btnAudio,.btnVolume").addClass("disabled");this._unbindButtonHandler({btnAudio:null,btnVolume:null});this.audioActive=!1};
SSToolbar.prototype._updateAudioDisplay=function(){this.audioPlaying?this.container.find(".btnAudio").removeClass("btnAudioPlay").addClass("btnAudioPause").attr("title","Pause"):this.container.find(".btnAudio").removeClass("btnAudioPause").addClass("btnAudioPlay").attr("title","Play")};
SSToolbar.prototype._bindButtonHandler=function(a){var b=this;$.each(a,function(a,d){var e=b._BUTTONS[a];e&&(e.unbind(),e.bind("click",function(a){$.slideshareEventManager.trigger(d,{source:b.GA_EVENTS_SRC[d]});a.preventDefault();a.stopPropagation();(a=b.GA_EVENTS[d])&&$.slideshareEventManager.trackEvent(a)}))})};SSToolbar.prototype._unbindButtonHandler=function(a){var b=this;$.each(a,function(a){a=b._BUTTONS[a];a.unbind();a.bind("click",function(a){a.preventDefault();a.stopPropagation()})})};
SSToolbar.prototype.setDimensions=function(a){var b=this,a=a.width/2-b.config.toolbarPadding-b._ELEMENT_WIDTHS[b._ELEMENT_PRIORITIES[1][0]],c={one:a,two:a},d,e,f,g;$.each(this._ELEMENT_PRIORITIES,function(a,j){d=j.length;for(var k=0;k<d;k++){e=j[k];var n=b._ELEMENT_SECTION[e];f=b._ELEMENT_WIDTHS[e];g=b._ELEMENT_VISIBILITY[e]&&c[n]>f;1==a||g?(b._ELEMENTS[e].show(),1!=a&&(c[n]-=f)):b._ELEMENTS[e].hide()}})};SSToolbar.prototype.updateCurrentPosition=function(a){this.container.find(".goToSlideLabel>input[type=text]").val(a)};
SSToolbar.prototype.destroy=function(){this.container.remove()};function SSVideoEmbedSlide(a){SSPresentationSlide.call(this,a);this.config=a;this.PLAYER_UNINITIALIZED=-1;this.PLAYER_AUTOHIDE=2;this.ENABLE_JS_API=1;this.PADDING=0;this.playerReady=!1;this._initVideoSlidesLoading()}SSVideoEmbedSlide.prototype=new SSPresentationSlide;
SSVideoEmbedSlide.prototype._initVideoSlidesLoading=function(){"function"!==typeof window.onYouTubePlayerAPIReady&&(window.onYouTubePlayerAPIReady=function(){$(window.video_slides||[]).each(function(a,b){b.playerReady=!0})});window.video_slides||(window.video_slides=[]);window.video_slides.push(this)};SSVideoEmbedSlide.prototype._videoReady=function(a){this.ytube_player=a.target};
SSVideoEmbedSlide.prototype._playVideo=function(){if(this.ytube_player.getPlayerState)this.ytube_player.getPlayerState()===this.PLAYER_UNINITIALIZED&&this.ytube_player.playVideo();else{var a=this;setTimeout(function(){a._playVideo()},1E3)}};SSVideoEmbedSlide.prototype._pauseVideo=function(){this.ytube_player.pauseVideo&&this.ytube_player.pauseVideo()};SSVideoEmbedSlide.prototype._videoLoadFailed=function(){$.slideshareEventManager.trigger("videoloadfailed")};
SSVideoEmbedSlide.prototype._tryPlayerLoad=function(){var a="ytube_player"+this.config.current_video_count,b="100%";navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(b="80%");if(!this.ytube_player){var c=this;this.ytube_player=new YT.Player(a,{videoId:this.config.video_id,playerVars:{autohide:this.PLAYER_AUTOHIDE,enablejsapi:this.ENABLE_JS_API,origin:"http://www.slideshare.net",theme:"light"},width:b,height:"100%",events:{onReady:function(a){c._videoReady(a)},onError:this._videoLoadFailed}})}};
SSVideoEmbedSlide.prototype.retryPlayerLoad=function(){clearTimeout(this.retrying);if(this.playerReady)this._tryPlayerLoad();else{var a=this;this.retrying=setTimeout(function(){a.retryPlayerLoad()},1E3)}};SSVideoEmbedSlide.prototype.removeLoading=function(){var a=this.currentViewMode.wrapper;$("#ytube_player"+this.config.current_video_count,a).show();$(".ytube_message",a).remove()};
SSVideoEmbedSlide.prototype.showLoading=function(){var a=this.currentViewMode.wrapper;$(this.config.loading_message_partial).appendTo(a);this.hideLoadingMessage=!0};SSVideoEmbedSlide.prototype.show=function(){this.currentViewMode.rendered=!0;this.load();this.painted&&this.showMessage()};
SSVideoEmbedSlide.prototype.showMessage=function(){if(this.hideLoadingMessage)$("#ytube_player"+this.config.current_video_count).show();else{this.showLoading();clearTimeout(this.removeLoadingTimeout);var a=this;if(void 0===this.hideLoadingMessage||this.hideLoadingMessage)this.removeLoadingTimeout=setTimeout(function(){a.removeLoading()},3E3)}};
SSVideoEmbedSlide.prototype.emptySlide=function(){this.currentViewMode.contentElement=null;this.painted=this.currentViewMode.rendered=!1;this.ytube_player=null};SSVideoEmbedSlide.prototype.stop=function(){this._pauseVideo()};SSVideoEmbedSlide.prototype.load=function(){$.slideshareEventManager.trigger("slideloaded",{index:this.index})};
SSVideoEmbedSlide.prototype.paint=function(){var a="ytube_player"+this.config.current_video_count;this.config.show_image_player?0===this.$slide.find(".ytube-container").length&&(this.currentViewMode.contentElement=$("<div id="+a+"></div>").css({overflow:"hidden"}),this.currentViewMode.contentElement.appendTo($("<div/>").addClass("ytube-container").css({height:this.$stage.height()||this.contentHeight}).appendTo(this.$slide)),this.playerReady?this._tryPlayerLoad():this.retryPlayerLoad()):(this.currentViewMode.contentElement=
$("<div id="+a+"></div>").css({position:"absolute",overflow:"hidden",display:"none"}),this.currentViewMode.contentElement.appendTo(this.currentViewMode.wrapper),this.playerReady?this._tryPlayerLoad():this.retryPlayerLoad())};SSVideoEmbedSlide.prototype._getNewResourceVersions=function(){};
function SSPlayerController(a){"undefined"!==typeof a&&(this.config=a,this.slideCount=this.realSlideCount=this.config.slide_count,this.config.has_video&&(this.slideCount+=this.config.video_slides_count),delete this.config.slide_count,this.mode=this.config.show_image_player?"image":this.config.mode,this.config.disable_meta=this.config.show_image_player?!0:!1,delete this.config.mode,this.currentPosition=0,this.loadingSlides=[],this.loadedSlides=[],this.slideModes={},this.availableBgSizes={},this.availableFallbackSizes=
{},this.config.has_lead&&(this.has_lead=!0,this.leadShownAndDisabled=!1,this.config.form_after_slide_no===this.slideCount?this.config.form_after_slide_no=this.slideCount-1:0<=this.config.form_after_slide_no&&(this.config.form_after_slide_no+=1)),this.PRELOAD_PRE_LIMIT=2,this.PRELOAD_POST_LIMIT=5,this.FONT_BATCH_COUNT=10,this.DEFAULT_ERROR_SCORE=0,this.AUTOVERIFICATION_ERROR_THRESHOLD=0.0010,this.AUTOVERIFICATION_THRESHOLDS={"bad v1.0":0.0010,"bad v1.1":1E-4,"bad v2.0":1E-4},this.MAX_PERCENTAGE_FAILING=
{"bad v1.0":100,"bad v1.1":20,"bad v2.0":20},this.TOOLBAR_HEIGHT=30,this.TOOLBAR_PADDING=8,this.MULTIMEDIABAR_HEIGHT=25,this.config.show_image_player&&(this.MULTIMEDIABAR_HEIGHT=29),this.initialized=!1,this.PRERENDER_COUNT=1,this._init(),this.startSlide=parseInt(this.config.start_slide||1,10),this.play(this.startSlide))}
SSPlayerController.prototype._init=function(){var a;$.slideshareEventManager.registerController(this);$.slideshareEventManager.registerEnvironment(this.config.hosted_in);this.cachedDomElements={};this.componentSets={};a=this._isFullScreen()?"fullscreen":"normal";this._createComponentSet(a);this.isNativeFullScreenSupported=this._isNativeFullScreenSupported();this._bindEvents();this.exitFullScreenHandler=this.exitFullScreenHandlerFactory();"video"!==this.mode?(!this.config.disable_meta||!this.config.show_image_player?
(this._initMetadata(),this._loadMetadata()):(this.conversionVersion=2,this.slideSizes={},this.slideLinks={},this.postInitialize()),this.config.has_audio&&!this.config.touch&&this._loadAudioMetadata()):(this.VIDEO_FULLSCREEN_ZINDEX=this.VIDEO_REINITIALISE_TIME=100,this._loadVideoMeta());$.slideshareEventManager.trackEvent("player_initialized",!0);$.slideshareEventManager.trackEvent(this.config.player_type,!0);$.slideshareEventManager.trackUniqueViewer();$.slideshareEventManager.trackEvent(this.mode+
"_mode",!0)};SSPlayerController.prototype._loadVideoMeta=function(){this.config.is_private&&this._getHtmlSignatures();this.initialized=!0};
SSPlayerController.prototype._initMetadata=function(){if("html"===this.mode)this.config.is_private&&this._getHtmlSignatures(),this._initFontResources(),this._initHtmlMetadata(),this.config.image_ready&&this._initImageMetadata(!0);else if("image"===this.mode)this._initImageMetadata();else throw window._gaq&&_gaq.push(["_trackEvent","jsplayer","invalidplayermode",this.config.id]),"Unknown player mode";};
SSPlayerController.prototype._loadMetadata=function(){if("html"===this.mode)this.metaResource.load(),this.config.image_ready&&this.imageMetaResource.load();else if("image"===this.mode)this.imageMetaResource.load();else throw"Unknown player mode";};SSPlayerController.prototype._initHtmlMetadata=function(a){this.metaResource=new SSMetaResource({url:this.config.bucket_location+"meta.js",timestamp:this.config.timestamp,type:"html",is_private:this.config.is_private,signature:a})};
SSPlayerController.prototype._initImageMetadata=function(a){this.imageMetaResource=new SSMetaResource({url:this.config.image_bucket_location+"/meta.js",timestamp:this.config.timestamp,type:a?"imagefallback":"imageprimary"})};
SSPlayerController.prototype._initFontResources=function(a,b){var c=navigator.userAgent.toLowerCase();fontBatchNum=b?Math.ceil(this.slideCount/b):Math.ceil(this.slideCount/this.FONT_BATCH_COUNT);var c=/msie/.test(c)&&!/opera/.test(c)?this.config.html_eotfont_url_suffix:this.config.html_ttffont_url_suffix,d;this.fontResources=[];for(d=1;d<=fontBatchNum;d++)this.fontResources[d]=new SSFontResource({baseUrl:this.config.bucket_location,indexString:this._getIndexString(d,0),timestamp:this.config.timestamp,
suffix:c})};SSPlayerController.prototype._loadAudioMetadata=function(){this.multimediaResource=new SSAudioResource({url:this.config.audio_bucket_location+".js",timestamp:this.config.audio_timestamp,slideCount:this.slideCount,audioDuration:this.config.audio_duration,audioUrl:this.config.audio_url,audioTransition:this.config.audio_transition,flashRoot:this.config.sound_manager_flash_component_root,assetId:this.config.sound_manager_asset_id});this.multimediaResource.load()};
SSPlayerController.prototype.setLeadFilledForAuthor=function(){if(window.localStorage){var a=localStorage.getItem("leadFormFilled");a?0>a.split(",").indexOf(""+this.config.author_id)&&(a+=","+this.config.author_id,localStorage.setItem("leadFormFilled",a)):localStorage.setItem("leadFormFilled",this.config.author_id)}};
SSPlayerController.prototype.checkLeadFilledForAuthor=function(){return window.slideshare_object&&slideshare_object.slideshow&&slideshare_object.user&&slideshare_object.slideshow.user_login===slideshare_object.user.login?!1:"undefined"===typeof localStorage?!1:(v=localStorage.getItem("leadFormFilled"))&&0<=$.inArray(""+this.config.author_id,v.split(","))};
SSPlayerController.prototype.getImagePrivateSignatures=function(a,b){var c=this;$.ajax({url:c.config.images_signature_request_route,data:{id:c.config.id,key:c.config.secret_key,mode:b,images_sizes:a,version:c.conversionVersion,password_hash:c.config.password_hash,slidetracking_hash:c.config.slidetracking_hash,authenticity_token:window._auth_token},dataType:"json",cache:!1,type:"POST",success:function(a){"html"===b?c.privateImageSignatures=a:"image"===b&&(c.privateFallBackImageSignatures=a);if("html"===
b||"image"===b)c.postInitialize();else if(c.slidesCreated){var e=c.slideModes.image.length,f,g;for(i=0;i<e;i++)g=c.slideModes.image[i],f=c.slides[c.realIndexToIndex[g]],f.resources.image.addSignature(a[g]),f.resources.image.ready()}else c.privateFallBackImageSignatures=a}})};
SSPlayerController.prototype._getHtmlSignatures=function(){var a=this;$.ajax({url:this.config.signature_request_route,data:{id:this.config.id,key:this.config.secret_key},dataType:"json",cache:!1,type:"GET",success:function(b){var c=b.length;if(0!==c){for(var d=0;d<c;d++)a.htmlResourceSignatures=b[d].info;for(d=0;d<a.slideCount;d++)a.slides&&a.slides[d]&&(slide=a.slides[d],slide.resources.html.updateSignature(a.htmlResourceSignatures[d].url),slide.resources.html.ready())}},failure:function(){$.slideshareEventManager.trigger("metadataloadfailed",
{type:a.config.type})}})};
SSPlayerController.prototype._metaDataHandlers=function(){var a=function(){var a,c,d=this.currentComponentSet.slidedisplayer;a=d.container.height();c=d.container.width();d.error(this.generateErrorDom("meta_error_template",{width:c,height:a}));$("#playerFacade").hide()};return{html:{success:function(a){this.conversionVersion=parseInt(a.version||2,10);this.slideSizes=a.sizes||{};this.availableBgSizes=a.available_sizes||{};var c=a.error_scores||{};this.algo=c.algo||"bad v1.0";this.errorScores=c.webkit||
{};c="\n.ssml_div span {line-height:normal;} \n.ssml_div div {line-height:normal;}\n.ssml_div{font-size:16px;}";"none"===this.config.render_links&&(c+="\n.ssml_div a{cursor:default;}");$("<style>"+(a.global_styles_css||"a.ssml_a {text-decoration:none;color:inherit;vertical-align:top;} \n.ssml_div span {position:absolute; white-space:pre; vertical-align:top;} \n.ssml_div div {position:absolute;}")+c+"</style>").appendTo(this.currentComponentSet.container);a.pages_per_fontfile&&(this.FONT_BATCH_COUNT=
a.pages_per_fontfile,this._initFontResources());this.config.is_private?this.getImagePrivateSignatures(this.availableBgSizes,"html"):this.postInitialize()},failure:a},imagefallback:{success:function(a){"none"===this.config.render_links&&(a.links={});this.slidesCreated?this.fallbackMetaHandler(a):this.fallbackMetaData=a},failure:function(){var a=this.slideModes.image.length,c,d,e,f;for(c=0;c<a;c++)d=this.slideModes.image[c],f=this.slides[d],d=f.currentViewMode.width,e=f.currentViewMode.height,f.displayError(this.generateErrorDom("slide_error_template",
{width:d,height:e}),!0)}},imageprimary:{success:function(a){this.conversionVersion=parseInt(a.version||2,10);this.slideSizes=a.sizes||{};"none"===this.config.render_links&&(a.links={});this.slideLinks=a.links||{};this.availableFallbackSizes=a.available_sizes;this.config.is_private?this.getImagePrivateSignatures(this.availableFallbackSizes,"image"):this.postInitialize()},failure:a}}};
SSPlayerController.prototype.fallbackMetaHandler=function(a){var b=parseInt(a.version||2,10),c=a.sizes||{},d=a.available_sizes||{},a=a.links||{},e=this.slideModes.image.length,f,g,h;for(i=0;i<e;i++)slideIndex=this.slideModes.image[i],g=c[slideIndex]||{},f=d[slideIndex],void 0===f&&(f={320:[75],768:[75]},f[g.width]=[75]),h=this.slides[this.realIndexToIndex[slideIndex]],h.setContentDimensions(g.width||0,g.height||0),h.updateResource("image",{sizes:{contentWidth:g.width||0,availableSizes:f,conversionVersion:b,
is_private:this.config.is_private},linkData:a[slideIndex]||[]});this.config.is_private&&this.getImagePrivateSignatures(d,"imagefb")};SSPlayerController.prototype.postInitialize=function(){this._initSlides();this._activateComponentSet(this.currentViewMode);this._setModeForSlides(this.currentViewMode);this.setDimensions();$(this).trigger("playerinitialized");try{window.parent.infographic_campaign&&$.slideshareEventManager.trigger("viewfullscreen")}catch(a){}};
SSPlayerController.prototype.initVideoPlayer=function(a){this.multimediaResource=this.currentComponentSet.videobar;this.multimediaResource.videoPlayer=jwplayer("videoSlideContainer_"+a);this._activateComponentSet(a);this.setDimensions();$("[id*=videoSlideContainer]").css("cursor","default")};
SSPlayerController.prototype._bindEvents=function(){var a=this;$(this).bind("playerinitialized",function(){this.initialized=!0;a.play()});this.config.preload_after_pageload&&$(window).bind("load",function(){a.pageLoadFired=!0});!this.config.touch&&!("document"===this.config.player_type||"video"===this.config.player_type)&&$(document).bind("keyup",function(b){if("INPUT"!==b.target.nodeName&&"TEXTAREA"!==b.target.nodeName){var c=a.currentComponentSet.leadForm;if(37===b.keyCode&&(!c||!c.isVisible()))a.currentComponentSet.lastScreen&&
a.currentComponentSet.lastScreen.destroy(),$.slideshareEventManager.trigger("previous");39===b.keyCode&&(!c||!c.isVisible())&&$.slideshareEventManager.trigger("next")}});this.isNativeFullScreenSupported&&$(document).bind(this.nativeFullScreen.fullScreenChangeEventName(),function(b){a._nativeFullScreenHandler.call(a,b)})};
SSPlayerController.prototype._bindComponentSetEvents=function(){var a=this;$(this.currentComponentSet.slidedisplayer).bind("zoomchanged",function(){a.repaint();if(this.documentSlider)for(var b=1;b<a.slides.length&&"undefined"!==typeof a.slides[b].currentViewMode.imageElement;)a.currentComponentSet.slidedisplayer.slidesContainer.width()!==a.slides[b].currentViewMode.imageElement.width()&&a.slides[b].show(!0),b++})};
SSPlayerController.prototype._createComponentSet=function(a){this.componentSets[a]={};this.currentComponentSet=this.componentSets[a];this.currentViewMode=a;var b=this.currentComponentSet;if("normal"===a||this.config.show_image_player){b.container=$("#"+this.config.container);if(1!==b.container.length)throw"Unable to find container for player";b.container.css({overflow:"hidden"})}else"fullscreen"===a&&(this.normalModeScrollPosition=$(window).scrollTop(),b.container=$("<div/>").addClass("jsplInpageFullScreen").appendTo($("body")),
$("body, html").css({overflow:"hidden"}));var c=this._isFullScreen(a),d=this._getPlayerBgColor(a);b.navigators=[];d={renderTo:b.container,spinnerUrl:this.config.spinner_url,errorImageUrl:this.config.error_image_url,mode:this.mode,slideCount:this.slideCount,playerType:this.config.player_type,playerBgColor:d,hosted_in:this.config.hosted_in,show_image_player:this.config.show_image_player};this._isFullScreen(a)&&(d.spinnerUrl=this.config.spinner_url_fullscreen);"document"===this.config.player_type?b.slidedisplayer=
"undefined"!==typeof new_mobile_player?new SSMobileDocumentDisplayer(d):new SSDocumentDisplayer(d):"video"===this.config.player_type?(this.videoSpecialSettings=this.getSpecialSettingsForVideo(),d.videoBucket=this.config.video_bucket,d.pptLocation=this.config.ppt_location,d.screenMode=a,d.videoSpinner=this.config.video_spinner_location,d.playerDomName=this.config.container,d.videoExtension=this.config.video_extension,d.useDefaultToolbar=this.videoSpecialSettings.defaultToolbar,d.ieAndLessThan8=this.videoSpecialSettings.ieLT8,
d.swfLocation=this.config.swf_location,d.playIcon=this.config.video_play_icon,d.posterImage=this.config.poster_img_url,d.embedOnIe=this.isEmbedAndIE(),d.isEmbed="embed"===this.config.hosted_in,this.hasToolbar=!this.videoSpecialSettings.defaultToolbar,d.isMobileDevice=this.config.touch,d.isMobileAndNonIos=this.config.touch&&!navigator.userAgent.match(/(iPhone|iPad|iPod)/i),b.slidedisplayer=new SSVideoDisplayer(d)):"infographic"===this.config.player_type?(d.isMobileDevice=this.config.touch,b.slidedisplayer=
new SSInfographicDisplayer(d)):(d.isTouch=this.config.touch,b.slidedisplayer="undefined"!==typeof new_mobile_player?new NewMobilePresentationDisplayer(d):new SSPresentationDisplayer(d));this.hasToolbar=!this.config.touch||"mobile_slideview"!==this.config.hosted_in;b.navigators.push(b.slidedisplayer);this.setDimensions();a=this.currentComponentSet.width;d=this.currentComponentSet.height;this.config.shareScreenClass="";this.config.lastScreenClass="";this.config.showProLastScreen=!0;"mobile_slideview"!==
this.config.hosted_in&&(this.config.disable_share||(this.config.shareScreenClass=this._getShareScreenClass(a,d),this.config.shareScreenClass||(this.config.disable_share=!0)),"slideview"!==this.config.hosted_in&&(this.config.lastScreenClass=this._getLastScreenClass(a,d)),this.config.showProLastScreen=this.canShowProLastScreen(a,d));this.config.touch?(b.touchInteraction=new SSTouchInteraction({container:b.slidedisplayer.container,playerType:this.config.player_type,hostedIn:this.config.hosted_in}),b.navigators.push(b.touchInteraction)):
"presentation"===this.config.player_type&&!isMobile()&&(b.bandInteraction=new SSBandInteraction({container:b.slidedisplayer.container,width:b.width,linksDisabled:"none"===this.config.render_links}),b.navigators.push(b.bandInteraction));this.config.has_lead&&(!this.leadShownAndDisabled&&!this.checkLeadFilledForAuthor())&&(this.config.show_lead_cta&&(b.leadcta=new SSLeadCTA({renderTo:b.container,html:this.config.lead_form_cta_html,has_audio:this.config.has_audio}),b.navigators.push(b.leadcta)),b.leadForm=
new SSLeadForm({leadFormHtml:this.config.leadFormHtml||"",renderTo:b.slidedisplayer.container,lead_form_url:this.config.lead_form_url,show_skip_button:this.config.show_skip_button,width:this.currentComponentSet.width,height:this.currentComponentSet.height}),b.navigators.push(b.leadForm));this.hasToolbar&&(c={width:b.width,height:this.TOOLBAR_HEIGHT,html:this.config.toolbar_html,renderTo:b.container,totalSlideCount:this.slideCount,primaryResourceType:this.config.primaryResourceType,disableShare:this.config.disable_share,
enableViewSS:this.config.enable_viewSS,isFullScreen:c,playerType:this.config.player_type,hasAudio:this.config.has_audio,enableZoomButtons:"document"==this.config.player_type,show_image_player:this.config.show_image_player},"infographic"===this.config.player_type&&(a={disableNav:!0,disableGoToSlide:!0,disableShare:!1,enableViewSS:!0,enableZoomButtons:!1,disableFullScreen:!1,disableLeaveFullScreen:!1,buttonOverrides:{btnLeaveFullScreen:".infographic_player a.j-exit-fullscreen"},elementOverrides:{leaveFullScreen:".infographic_player a.exit-fullscreen"}},
"slideview"==this.config.hosted_in&&(a.enableViewSS=!1,a.disableShare=!0,a.disableFullScreen=!1,a.disableLeaveFullScreen=!1,a.enableZoomButtons=!1,a.buttonOverrides.btnFullScreen="li a.btnFullScreen",a.elementOverrides.fullScreen="li a.btnFullScreen"),"slideshare"==this.config.hosted_in&&(a.enableViewSS=!1),$.extend(c,a)),b.toolbar=new SSToolbar(c),b.navigators.push(b.toolbar));this.config.has_audio&&!this.config.touch&&(c=b.container,this.config.show_image_player&&(c=b.container.find(".toolbar_wrapper")),
b.audiobar=new SSAudioBar({renderTo:c,slideCount:this.slideCount,height:this.MULTIMEDIABAR_HEIGHT,html:this.config.multimediabar_html,resource:this.multimediaResource,css2ConfettiUrl:this.config.css2_confetti_url,show_image_player:this.config.show_image_player}),b.navigators.push(b.audiobar));"video"===this.config.player_type&&(b.toolbar||(b.toolbar=$("<div/>")),b.videobar=new SSVideoBar({renderTo:b.toolbar.container,height:this.MULTIMEDIABAR_HEIGHT,html:this.config.multimediabar_html,showLead:this.config.has_lead,
leadFormTime:this.config.form_after_slide_no,isMobileDevice:this.config.touch}),b.navigators.push(b.videobar),this.multimediaResource=b.videobar);this.config.has_video&&(b.videoConfetti=$("<img/>").attr({src:this.config.confetti_url}).css({position:"absolute",top:"-1px",left:"-1px"}).appendTo(b.container));if(!this.config.disable_share&&this.config.share_cta){var c=SSShareCta,a=b.container,d=b.slidedisplayer,e=[d.container];d.rightbandInteraction&&d.leftbandInteraction&&(e.push(d.rightbandInteraction),
e.push(d.leftbandInteraction));b.share_cta=new c({renderTo:a,bindTo:e,html:this.config.share_cta.html,hosted_in:this.config.hosted_in})}"video"!==this.mode&&this._bindComponentSetEvents();document.referrer&&"slideview"===this.config.hosted_in&&(c="",/(\/(www\.)?twitter\.com\/)|(\/t.co\/)/.test(document.referrer)?c="twitter":/(\/(www\.)?facebook\.com\/)|(\/(www\.)?fb\.me\/)/.test(document.referrer)?c="facebook":/(\/(www\.)?linkedin\.com\/)|(\/(www\.)?lnkd\.in)/.test(document.referrer)?c="linkedin":
/\/plus\.url\.google\.com\//.test(document.referrer)&&(c="googleplus"),0<c.length&&(b.referralShare=new SSReferralShare({network:c,renderTo:b.container,shareOptions:this.config.shareoptions,isExperiment:!1})))};SSPlayerController.prototype.configureComponentsForNativeMode=function(a){var b=this.currentComponentSet;b.slidedisplayer.refresh({spinnerUrl:this.config.spinner_url_fullscreen});b.toolbar.config.isFullScreen=this._isFullScreen(a);b.toolbar._initForNativeFullScreen(a)};
SSPlayerController.prototype._isFullScreen=function(a){return"fullscreen"===a||"nativefullscreen"===a||this.config.is_fullscreen};SSPlayerController.prototype._getPlayerBgColor=function(a){var b="jsplBgColorBigfoot";return b=this._isFullScreen(a)?this.config.fullscreen_bgcolor:this.config.player_bgcolor};SSPlayerController.prototype._getShareScreenClass=function(a,b){var c=null;360<a&&260<b?c="normal":320<a&&250<b?c="small":290<a&&280<b&&(c="tiny");return c};
SSPlayerController.prototype.canShowProLastScreen=function(a,b){return 337>a||142>b?!1:!0};SSPlayerController.prototype._getLastScreenClass=function(a,b){var c="small";512<=a&&421<=b?c="medium":427<=a&&356<=b&&(c="normal");return c};
SSPlayerController.prototype._destroyComponentSet=function(a){var b=this.componentSets[a];$.each(b.navigators,function(a,b){b.destroy()});delete this.componentSets[a].navigators;delete this.componentSets[a].slidedisplayer;"fullscreen"===a&&(b.container.remove(),$("body, html").css({overflow:"auto"}));for(var c=1;c<=this.slideCount;c++)b=this.slides[c],b.viewModes[a].container.remove(),delete b.viewModes[a];delete this.componentSets[a].container;delete this.componentSets[a]};
SSPlayerController.prototype._mapIndexes=function(){for(var a=this.config.video_hash,b=1,c=this.slideCount,d={},e={},f=1;f<=c;f++)a&&a[f]?d[f]=null:(d[f]=b,e[b]=f,b++);this.config.has_video&&(a=document.createElement("script"),a.src=(this.config.use_ssl?"https://":"http://")+"www.youtube.com/player_api",b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(a,b));this.indexToRealIndex=d;this.realIndexToIndex=e};
SSPlayerController.prototype._percentageFailing=function(a){var b=0,c;for(c in this.errorScores)this.errorScores[c]>a&&b++;return 0===this.slideCount?0:parseInt(100*(b/this.slideCount),10)};
SSPlayerController.prototype._initSlides=function(){this.slides=[];this.slideModes.image=[];this.slideModes.html=[];var a,b,c,d=!1,e,f=0,g=this.config.video_hash;this._mapIndexes();var h=this.indexToRealIndex,j=this.AUTOVERIFICATION_ERROR_THRESHOLD,k=0,n=100;2===this.conversionVersion&&"undefined"!==typeof this.AUTOVERIFICATION_THRESHOLDS[this.algo]&&(j=this.AUTOVERIFICATION_THRESHOLDS[this.algo],k=this._percentageFailing(j));2===this.conversionVersion&&"undefined"!==typeof this.MAX_PERCENTAGE_FAILING[this.algo]&&
(n=this.MAX_PERCENTAGE_FAILING[this.algo]);for(a in h)if(h.hasOwnProperty(a)){a=parseInt(a,10);e=h[a];null===h[a]?(b="ytube_video",f++):1===a&&this.config.image_ready?(b="image",d=!0):"html"===this.mode&&!this.config.image_ready?b="html":"image"===this.mode?b="image":2===this.conversionVersion&&k>n?(b="image",this.disableLoadingFonts=d=!0):(b=parseFloat(this.errorScores[a]),isNaN(b)&&(b=this.DEFAULT_ERROR_SCORE),b>j?(b="image",d=!0):b="html");null===e&&(e=g[a].parent);c=this.slideSizes[e]||{};"html"===
b?this.slideModes.html.push(e):"image"===b&&this.slideModes.image.push(e);var p="all"===this.config.render_links;c={ssid:this.config.id,realIndex:e,index:a,type:this.mode,linkOffset:f,slideMode:b,indexGenerator:this._getIndexString,contentWidth:parseInt(c.width,10)||638,contentHeight:parseInt(c.height,10)||479,playerWidth:this.currentComponentSet.width,errorImageUrl:this.config.error_image_url,spinnerUrl:this.config.spinner_url,spinnerUrlFullscreen:this.config.spinner_url_fullscreen,playerType:this.config.player_type,
stripped_title:this.config.stripped_title,timestamp:this.config.timestamp,ppt_location:this.config.ppt_location,is_private:this.config.is_private,is_render_all_links:p,hosted_in:this.config.hosted_in,show_image_player:this.config.show_image_player,isStartSlide:this.config.start_slide===a};"html"===b?(c.bucketLocation=this.config.bucket_location,c.availableSizes=this.availableBgSizes[e]):"image"===b&&(c.bucketLocation=this.config.image_bucket_location,c.availableSizes=this.config.disable_meta?{1024:[95]}:
this.availableFallbackSizes[e]);this.config.is_private&&("html"==b?(this.htmlResourceSignatures&&this.htmlResourceSignatures[e]&&(c.htmlResourceSignature=this.htmlResourceSignatures[e].url),c.privateImageSignatures=this.privateImageSignatures[e]):"image"==b&&this.privateFallBackImageSignatures&&(c.privateImageSignatures=this.privateFallBackImageSignatures[e]));"document"===this.config.player_type?b="undefined"!==typeof new_mobile_player?new MobileDocumentSlide(c):new SSDocumentSlide(c):"infographic"===
this.config.player_type?b=new SSInfographicSlide(c):"ytube_video"!==b?b="undefined"!==typeof new_mobile_player?new SlideshareMobileSlide(c):new SSPresentationSlide(c):(c.video_id=g[a].video_id,c.current_video_count=f,c.loading_message_partial=this.config.loading_message_partial,1===a&&(c.contentWidth=728,c.contentHeight=542),b=new SSVideoEmbedSlide(c));"image"===this.mode&&void 0!==this.slideLinks[e]&&b.updateResource("image",{linkData:this.slideLinks[e]||{}});this.slides[a]=b;delete this.availableFallbackSizes[e]}!0===
d&&(this.slidesCreated=!0,this.fallbackMetaData&&this.fallbackMetaHandler(this.fallbackMetaData))};SSPlayerController.prototype._getIndexString=function(a,b){var c=""+a,d=c.length,e;for(e=0;e<b-d;e++)c="0"+c;return c};SSPlayerController.prototype._getContainerSize=function(){this.currentComponentSet.width=this.currentComponentSet.container.width();this.currentComponentSet.height=this.currentComponentSet.container.height()};
SSPlayerController.prototype.setDimensions=function(a,b){var c=this.currentComponentSet;this._getContainerSize();a=a||!1;c.viewHeight=c.height;this.hasToolbar&&(c.viewHeight-=this.TOOLBAR_HEIGHT+this.TOOLBAR_PADDING);this.config.has_audio&&(c.viewHeight-=this.MULTIMEDIABAR_HEIGHT);c.slidedisplayer.setDimensions({width:c.width,height:c.viewHeight,partial:a});if(!a){var d={height:c.viewHeight,width:c.width},e=this.currentComponentSet;$.each("toolbar audiobar videobar leadcta shareScreen lastScreen".split(" "),
function(a,c){e[c]&&"function"===typeof e[c].setDimensions&&e[c].setDimensions(d,b)})}};
SSPlayerController.prototype.getSpecialSettingsForVideo=function(){var a=navigator.userAgent.toLowerCase(),b=/mozilla/.test(a)&&!/(compatible|webkit)/.test(a),a=/msie/.test(a)&&!/opera/.test(a)&&document.documentMode&&8>document.documentMode,c={ieLT8:a},d=!1;"video"===this.config.player_type?b&&!document.mozFullScreenEnabled&&"embed"!=this.config.hosted_in?d=!0:a&&this.isEmbedAndIE()&&(d=!0):d=!1;c.defaultToolbar=d;return c};
SSPlayerController.prototype.repaint=function(a){var b=navigator.userAgent.toLowerCase(),b=/msie/.test(b)&&!/opera/.test(b);if(!(void 0===this.currentComponentSet.slidedisplayer||"video"===this.config.player_type&&b&&this.currentComponentSet.videobar.fullscreen)){this.setDimensions(!0);this.setDimensions(!1,a);this._repaintPrerenderedSlides();if(this.config.has_video){var c=this;setTimeout(function(){c.resizeVideoEmbeds()},250)}this.config.show_image_player||this.currentComponentSet.slidedisplayer._scrollTo(this.currentPosition)}};
SSPlayerController.prototype._repaintPrerenderedSlides=function(){var a=this.currentComponentSet.slidedisplayer.prerenderedSlides,b;if(a&&0<a.length){var c;for(c=0;c<a.length;c++)b=a[c],this.slides[b].show(!0)}};
SSPlayerController.prototype.updateCurrentPosition=function(a){this.config.show_image_player&&(this.currentComponentSet.slidedisplayer.currentPosition=a);if("video"!==this.config.player_type){var b=this.currentComponentSet.toolbar,c=this.currentComponentSet.audiobar;b&&b.updateCurrentPosition(a);c&&c.updateCurrentPosition(a);c=this.multimediaResource;b&&(this.config.has_audio&&c)&&(b.updateAudioInteraction({audioReady:c.audioReady,audioMetaReady:c.metaDataReady,audioPlaying:c.playing}),b.volumeControl.setVolume(this.multimediaResource.volume));
this.currentPosition=a;this.slides[a].painted=!0}};
SSPlayerController.prototype.displayLastScreen=function(){var a=this;if(!("video"===this.config.player_type&&this.currentComponentSet.videobar.fullscreen)){"undefined"===typeof this.currentComponentSet.lastScreen&&(this.config.is_only_private||this.config.disable_lastscreen&&!this.config.showProLastScreen||this.config.show_replay_screen?this.currentComponentSet.lastScreen=new SSReplayScreen({renderTo:this.currentComponentSet.container,settings:this.config.replayscreen}):("undefined"===typeof this.currentComponentSet.lastScreen&&
(this.currentComponentSet.lastScreen=this._getShareScreen()),this.currentComponentSet.lastScreen=this.currentComponentSet.shareScreen),$(this.currentComponentSet.lastScreen).bind("gotofirstslide",function(){$(a).trigger("gotofirstslide")}));var b=this.currentComponentSet;b.viewHeight=b.height;this.hasToolbar&&(b.viewHeight-=this.TOOLBAR_HEIGHT+this.TOOLBAR_PADDING);this.config.has_audio&&(b.viewHeight-=this.MULTIMEDIABAR_HEIGHT);this.currentComponentSet.lastScreen.show({width:b.width,height:b.viewHeight},
this._isFullScreen(this.currentViewMode));this.currentComponentSet.lastScreen.isProLastScreen?$.slideshareEventManager.trackEvent("proLastscreen_shown"):$.slideshareEventManager.trackEvent("lastscreen_shown");this.currentComponentSet.toolbar&&this.currentComponentSet.videobar&&(b=this.currentComponentSet.lastscreen.overlay.css("z-index")-1,$(this.currentComponentSet.toolbar.container).css("z-index",b))}};
SSPlayerController.prototype.hideLastScreen=function(){this.currentComponentSet.lastScreen&&this.currentComponentSet.lastScreen.isVisible&&this.currentComponentSet.lastScreen.hide()};
SSPlayerController.prototype.displayShareScreen=function(a){this._getShareScreen();a=!0===a?"share_btn_":this.currentComponentSet.shareScreen.gaCategory;this.currentComponentSet.shareScreen.showShareScreen({width:this.currentComponentSet.width,height:this.currentComponentSet.height});this.currentComponentSet.shareScreen.lastScreenModalShare.gaCategory=a;$.slideshareEventManager.trackEvent("sharescreen_shown")};
SSPlayerController.prototype.updateEmbedSizes=function(){var a=this.config.embed_sizes,b=this.slideAspectRatio;if(!("infographic"!==this.config.player_type||!a||!b))for(var c in a.presets)a.presets.hasOwnProperty(c)&&(preset=a.presets[c],preset.size.height=parseInt(preset.size.width*b+40,10))};
SSPlayerController.prototype._getShareScreen=function(){"undefined"===typeof this.currentComponentSet.shareScreen&&(this.currentComponentSet.shareScreen=new SSLastScreen({renderTo:this.currentComponentSet.container,settings:this.config.lastscreen,slideshowId:this.config.id,embed_code:this.config.embed_code,iframe_url:this.config.iframe_url,iframe_code:this.config.iframe_code,embed_sizes:this.config.embed_sizes,wp_code:this.config.wp_code,show_related_content:this.config.show_related_content,lastScreenClass:this.config.lastScreenClass,
disableRelated:this.config.disable_lastscreen,disableShare:this.config.disable_share,shareOptions:this.config.shareoptions,hostedIn:this.config.hosted_in}));return this.currentComponentSet.shareScreen};SSPlayerController.prototype.loadFonts=function(a){"html"!==this.mode||!0===this.disableLoadingFonts||"initialized"===this.fontResources[a].status&&this.fontResources[a].load()};
SSPlayerController.prototype.getPrerenderSlideIndices=function(a){var b=a-this.PRERENDER_COUNT;1>b&&(b=1);a+=this.PRERENDER_COUNT;a>this.slideCount&&(a=this.slideCount);return[b,a]};
SSPlayerController.prototype._load=function(a,b){var c=navigator.userAgent.toLowerCase(),d=/msie/.test(c)&&!/opera/.test(c);if("video"!==this.config.player_type){var a=a||this.config.start_slide,e,f,g=this;this.loadFonts(Math.ceil(a/this.FONT_BATCH_COUNT));if(!b){e=this.getPrerenderSlideIndices(a,b);var c=e[0],h=e[1];for(e=c;e<=h;e++)this.config.show_image_player&&this.slides[e].render(),this.slides[e].show(),this.loadedSlides[e]=!0;if((d||"function"===typeof isIos&&isIos())&&"undefined"===typeof new_mobile_player){d=
this.currentComponentSet.slidedisplayer.prerenderedSlides;for(e=0;e<d.length;e++)if(f=d[e],f<c||f>h)f=this.slides[f],f.hide();this.currentComponentSet.slidedisplayer.prerenderedSlides=[]}this.currentComponentSet.slidedisplayer.setPrerenderedSlides({start:c,end:h})}this.config.disable_eagerload&&a===this.config.start_slide||(c=this.preloadAnchorIndex,this.preloadAnchorIndex=a,e=function(){g.preloadSlides()},this.config.preload_after_pageload&&!this.pageLoadFired?c||$(window).bind("load",e):(clearTimeout(this.preloadTimeoutId),
this.preloadTimeoutId=setTimeout(e,2E3)))}};
SSPlayerController.prototype.preloadSlides=function(){if(this.preloadAnchorIndex){var a=this.PRELOAD_PRE_LIMIT+this.PRELOAD_POST_LIMIT+1,b=this.preloadAnchorIndex-this.PRELOAD_PRE_LIMIT;1>b&&(b=1);a=b+a-1;a>this.slideCount&&(a=this.slideCount);var c=Math.ceil(b/this.FONT_BATCH_COUNT),d=Math.ceil(a/this.FONT_BATCH_COUNT);for(i=c;i<=d;i++)this.loadFonts(i);for(i=b;i<=a;i++)this.loadedSlides[i]||(slide=this.slides[i],this.config.show_image_player&&slide.render(),slide.load(),this.loadedSlides[i]=!0);
delete this.preloadAnchorIndex}};SSPlayerController.prototype.preloadMoreIfIdle=function(a){if(!this.config.disable_eagerload){var b=this.loadingSlides,a=b.indexOf(a);-1<a&&b.splice(a,1);if(!this.preloadAnchorIndex&&2>b.length){var c=this.loadedSlides.length+1;if(!(c>this.realSlideCount)){var d=this;setTimeout(function(){d._load(c,!0)},0)}}}};
SSPlayerController.prototype.play=function(a,b,c){if(this.initialized){if(void 0===a&&("undefined"!==typeof this.playQueue?(a=this.playQueue,delete this.playQueue):a=1),1>a&&(a=1),a>this.slideCount&&(a=this.slideCount),this.currentPosition!==a||b)"video"===this.config.player_type?this.currentComponentSet.slidedisplayer.start():$.slideshareEventManager.trigger("slidechanged",{index:a,force:b,source:c})}else this.playQueue=a||1};
SSPlayerController.prototype._enableVideoReloading=function(){var a=this.slides,b;for(b in a)a.hasOwnProperty(b)&&a[b]&&"ytube_video"===a[b].config.slideMode&&a[b].emptySlide()};
SSPlayerController.prototype.switchNativeView=function(a){if("nativefullscreen"==a){var b=this.currentComponentSet.container;b.length&&this.nativeFullScreen.request(b[0])}else this.nativeFullScreen.cancel();void 0===this.componentSets[a]&&(this.componentSets[a]=this.componentSets[this.currentViewMode]);this.currentComponentSet=this.componentSets[a];this.currentViewMode=a;this.currentComponentSet.slidedisplayer.emptySlides();this.configureComponentsForNativeMode(a);this._setModeForSlides(a);this._load(this.currentPosition);
this.updateCurrentPosition(this.currentPosition)};SSPlayerController.prototype._nativeFullScreenHandler=function(){var a=this;this.nativeFullScreen.isFullScreen()?this.currentViewMode="nativefullscreen":$.slideshareEventManager.trigger("leavefullscreen");window.setTimeout(function(){a.repaint.call(a)},500)};
SSPlayerController.prototype.nativeFullScreen={request:function(a){document.webkitFullscreenEnabled?Element&&Element.ALLOW_KEYBOARD_INPUT?a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):a.webkitRequestFullScreen():document.mozFullScreenEnabled&&a.mozRequestFullScreen()},cancel:function(){document.webkitFullscreenEnabled?document.webkitCancelFullScreen():document.mozFullScreenEnabled&&document.mozCancelFullScreen()},fullScreenChangeEventName:function(){if(document.webkitFullscreenEnabled)return"webkitfullscreenchange";
if(document.mozFullScreenEnabled)return"mozfullscreenchange"},isFullScreen:function(){return document.webkitIsFullScreen||document.mozFullScreen}};SSPlayerController.prototype._isNativeFullScreenSupported=function(){return(document.webkitFullscreenEnabled||document.mozFullScreenEnabled)&&(/Chrome/.test(navigator.userAgent)||/Firefox/.test(navigator.userAgent))};
SSPlayerController.prototype.leaveFullScreen=function(){var a=/msie/.test(navigator.userAgent.toLowerCase());this.currentComponentSet.videobar&&(this.disableLeadForFullscreenVideo(!1),this.currentComponentSet.slidedisplayer.adjustSpinnerPosition(!1));this.currentComponentSet.lastscreen&&this.currentComponentSet.lastscreen.hide();if("nativefullscreen"===this.currentViewMode&&this.isNativeFullScreenSupported)this.switchNativeView("normal");else if("video"===this.config.player_type&&!a)this.returnFromFullscreenForVideo();
else if(this.config.inpage_full_screen)this.switchView("normal");else try{window.close()}catch(b){}};
SSPlayerController.prototype.switchView=function(a){this.config.show_image_player?("fullscreen"==a?(this.currentViewMode="nativefullscreen",this.currentComponentSet.container.addClass("non-native-fullscreen")):"normal"==a&&(this.currentViewMode="normal",this.currentComponentSet.container.removeClass("non-native-fullscreen"),this.switchNativeView(this.currentViewMode)),this.configureComponentsForNativeMode(a),this.repaint(),$(window).trigger("resize")):a!==this.currentViewMode&&(this.config.has_video&&
(this._enableVideoReloading(),$("[id*=ytube_player]").remove()),this._deactivateComponentSet(this.currentViewMode),void 0===this.componentSets[a]&&this._createComponentSet(a),this._activateComponentSet(a),this._setModeForSlides(a),this.setDimensions(),this.play(this.currentPosition,!0),this._load(this.currentPosition),this.updateCurrentPosition(this.currentPosition))};
SSPlayerController.prototype._activateComponentSet=function(a){var b=this.componentSets[a],c=b.navigators;this.currentComponentSet=b;this.currentViewMode=a;$.each(c,function(a,b){b.activate()});"fullscreen"===a||this.config.is_fullscreen?($(document).bind("keyup",this.exitFullScreenHandler),$(window).scrollTop(0)):($(document).unbind("keyup",this.exitFullScreenHandler),this.normalModeScrollPosition&&$(window).scrollTop(this.normalModeScrollPosition))};
SSPlayerController.prototype.exitFullScreenHandlerFactory=function(){return function(a){if(27===a.keyCode)try{$.slideshareEventManager.trigger("leavefullscreen")}catch(b){}}};SSPlayerController.prototype._deactivateComponentSet=function(a){$.each(this.componentSets[a].navigators,function(a,c){c.deactivate()});"fullscreen"===a&&this._destroyComponentSet("fullscreen");this.currentViewMode=this.currentComponentSet=null};
SSPlayerController.prototype._setModeForSlides=function(a){"video"!==this.config.player_type&&this.currentComponentSet.slidedisplayer.start({slides:this.slides,mode:a,playerBgColor:this._getPlayerBgColor(a)});this.currentComponentSet.slidedisplayer._bindEvents()};SSPlayerController.prototype.getFullScreenUrl=function(){return this.config.fullscreen_url?this.config.fullscreen_url+"/"+this.currentPosition:document.location};
SSPlayerController.prototype.generateErrorDom=function(a,b){var c=a+"_"+b.width+"_"+b.height,d=this.cachedDomElements[c];if(void 0===d){var d=b.width,e=b.height,f=e/3,f=f>d/4?d/4:f,g=parseInt(f/20,10),h=(e-f)/("document"===this.config.player_type?4:2),j=d/25,k=f-14,d=$(this.config[a]);d.css({height:e-h,padding:h+"px 14px 0"});e=d.children("div");e.css({"-moz-border-radius":g,"-webkit-border-radius":g,"-o-border-radius":g,"-ms-border-radius":g,"border-radius":g,height:f});e.children("img").css({margin:7,
height:k,width:k});e.children("div").css({left:k+14,padding:"14px 0 0 7px","font-size":j});this.cachedDomElements[c]=d}return $(d).clone()};SSPlayerController.prototype.disableLeadForFullscreenVideo=function(a){(this.currentComponentSet.videobar.fullscreen=a)?this.currentComponentSet.leadcta&&this.currentComponentSet.leadcta.hide():!this.leadShownAndDisabled&&this.currentComponentSet.leadcta&&this.currentComponentSet.leadcta.show()};
SSPlayerController.prototype.goHtmlFullscreenForVideo=function(){this.currentComponentSet.slidedisplayer.container.addClass("inPageFullscreen");var a=this.multimediaResource.videoPlayer,b=$(a.getContainer()),c=$(b.parent());this.normalPosition=b.css("position");this.normalZindex=b.css("z-index");this.normalLeft=b.css("left");this.normalTop=b.css("top");this.normalPlayerWidth=c.width();this.normalPlayerHeight=c.height();this.toolbarPaddingLeft=parseInt($(".toolbar").css("padding-left"),10);this.toolbarPadingRight=
parseInt($(".toolbar").css("padding-right"),10);this.fullscreenHeight=$(window).height()-this.TOOLBAR_HEIGHT;this.fullscreenWidth=$(window).width();c.css({position:"fixed",width:"100%",height:"100%",left:0,top:0,"z-index":this.VIDEO_FULLSCREEN_ZINDEX});a.resize(this.fullscreenWidth,this.fullscreenHeight);this.normalPlayerContainer=this.currentComponentSet.container;this.currentComponentSet.container=c;$(this.currentComponentSet.toolbar.container).css({"z-index":this.VIDEO_FULLSCREEN_ZINDEX,width:this.fullscreenWidth-
(this.toolbarPaddingLeft+this.toolbarPadingRight),position:"fixed",left:0,bottom:0});$(this.currentComponentSet.toolbar.volumeControl.container).css({"z-index":this.VIDEO_FULLSCREEN_ZINDEX,position:"fixed",bottom:0});$(this.currentComponentSet.videobar.container).css({"z-index":this.VIDEO_FULLSCREEN_ZINDEX,width:"100%",position:"relative",left:0,bottom:0});this.currentComponentSet.videobar.setDimensions({height:this.fullscreenHeight,width:this.fullscreenWidth,fullscreen:!0});b=this.currentComponentSet.toolbar.getElements();
b.fullScreen.hide();b.leaveFullScreen.show();a.fullscreen=!0;setTimeout(function(){"PLAYING"===a.getState()&&a.play(!0)},this.VIDEO_REINITIALISE_TIME)};
SSPlayerController.prototype.returnFromFullscreenForVideo=function(){this.currentComponentSet.slidedisplayer.container.removeClass("inPageFullscreen");var a=this.multimediaResource.videoPlayer,b=$(a.getContainer());$(b.parent()).css({position:"relative",height:this.normalPlayerHeight,width:this.normalPlayerWidth,"z-index":this.normalZindex,left:this.normalLeft,top:this.normalTop});a.resize(this.normalPlayerWidth,this.normalPlayerHeight);this.currentComponentSet.container=this.normalPlayerContainer;
b=this.currentComponentSet.toolbar.getElements();b.leaveFullScreen.hide();b.fullScreen.show();$(this.currentComponentSet.toolbar.container).css({position:"relative",height:this.TOOLBAR_HEIGHT,width:this.normalPlayerWidth-(this.toolbarPaddingLeft+this.toolbarPadingRight),"z-index":this.normalZindex,left:this.normalLeft,top:this.normalTop,bottom:0});$(this.currentComponentSet.toolbar.volumeControl.container).css({position:"relative","z-index":this.normalZindex});$(this.currentComponentSet.videobar.container).css({position:"relative",
height:this.MULTIMEDIABAR_HEIGHT,width:this.normalPlayerWidth,"z-index":this.normalZindex});this.currentComponentSet.videobar.setDimensions({height:this.normalPlayerHeight,width:this.normalPlayerWidth});a.fullscreen=!1;setTimeout(function(){"PLAYING"===a.getState()&&a.play(!0)},this.VIDEO_REINITIALISE_TIME)};SSPlayerController.prototype.isEmbedAndIE=function(){var a=navigator.userAgent.toLowerCase();return/msie/.test(a)&&!/opera/.test(a)&&"slideview"!==this.config.hosted_in};
SSPlayerController.prototype.deactivateToolbar=function(){this.currentComponentSet.toolbar.deactivate()};SSPlayerController.prototype.activateToolbar=function(){this.currentComponentSet.toolbar.activate()};SSPlayerController.prototype.isToolbarActive=function(){return this.currentComponentSet.toolbar.active};
SSPlayerController.prototype.resizeVideoEmbeds=function(){if(this.currentComponentSet&&this.currentComponentSet.slidedisplayer&&this.currentComponentSet.slidedisplayer.container){var a=this.currentComponentSet.slidedisplayer.container,b=a.find(".ytube-container");0<b.length&&b.height(a.height())}};
window.Modernizr=function(a,b,c){function d(a,b){for(var d in a)if(h[a[d]]!==c)return"pfx"==b?a[d]:!0;return!1}var e={},f=b.documentElement;b.head||b.getElementsByTagName("head");var g=b.createElement("modernizr"),h=g.style,j=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),g={},k=[],n=function(a,c,d,e){var g,h=b.createElement("div");if(parseInt(d,10))for(;d--;)g=b.createElement("div"),g.id=e?e[d]:"modernizr"+(d+1),h.appendChild(g);d=["&shy;<style>",a,"</style>"].join("");h.id="modernizr";h.innerHTML+=
d;f.appendChild(h);a=c(h,a);h.parentNode.removeChild(h);return!!a},p,q={}.hasOwnProperty,t;typeof q!==c&&typeof q.call!==c?t=function(a,b){return q.call(a,b)}:t=function(a,b){return b in a&&typeof a.constructor.prototype[b]===c};var x=[,"touch"],E=[,["@media (",j.join("touch-enabled),("),"modernizr){#touch{top:9px;position:absolute}}"].join("")].join(""),s=x.length;n(E,function(b){for(var b=b.childNodes,c={};s--;)c[b[s].id]=b[s];e.touch="ontouchstart"in a||9===c.touch.offsetTop},s,x);g.touch=function(){return e.touch};
g.csstransforms=function(){return!!d(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};for(var u in g)t(g,u)&&(p=u.toLowerCase(),e[p]=g[u](),k.push((e[p]?"":"no-")+p));h.cssText="";g=null;e._version="2.0.6";e._prefixes=j;e.testProp=function(a){return d([a])};e.testStyles=n;return e}(this,this.document);var isMobile=function(){return navigator.userAgent.match(/iPhone|iPad|iPod|Android|BlackBerry|IEMobile|webOS|Mobile|Windows Phone/i)};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;0<arguments.length&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&(Infinity!=d&&-Infinity!=d)&&(d=(0<d||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;for(d=0<=d?d:Math.max(c-Math.abs(d),0);d<c;d++)if(d in b&&b[d]===a)return d;return-1});function SSPlayer(a){this.config=a;this._init()}
SSPlayer.prototype._init=function(){var a=isMobile();this.config.touch=a&&(Modernizr.touch||"Windows Phone"==a)&&!cookie("nomobile");$.slideshareEventManager.registerPlayer(this);this.controller="undefined"!==typeof new_mobile_player?new MobileNewPlayerController(this.config):new SSPlayerController(this.config);this.$playerContainer=$(this.config.container);var b=this,c=function(){if(b.config.show_image_player){var d=$(".stage"),e=$(".slide_container");if("presentation"===b.config.player_type||"webinar"===
b.config.player_type){var f=b.controller.currentPosition,g="ytube_video"===b.controller.slides[f].config.slideMode;d.css("height","auto");d.css("max-height","none");d.css("line-height","normal");d.removeClass("valign-first-slide");if(g){if("undefined"===typeof b.referenceSlideIndex)for(var h=b.controller.slides,j=1;j<=h.length;j++){var k=h[j];if("ytube_video"!==k.config.slideMode){b.referenceSlideIndex=k.index;break}}b.controller.currentComponentSet.slidedisplayer._scrollTo(b.referenceSlideIndex)}h=
d.height();d.css("height",h);d.css("max-height",h);d.css("line-height",h+"px");b.controller.setDimensions(!1,b.config.touch);g&&b.controller.currentComponentSet.slidedisplayer._scrollTo(f);f=$("#"+b.controller.config.container+" .slide").eq(f-1).children(".slide_image");"undefined"!==typeof f&&"undefined"!==typeof f[0]&&(d=d.width()/d.height(),f=f.naturalWidth()/f.naturalHeight(),d>f?(e.removeClass("wide_img"),e.addClass("tall_img")):(e.removeClass("tall_img"),e.addClass("wide_img")))}}else $.slideshareEventManager.trigger("repaint",
{mobile:b.config.touch});a&&"document"===b.config.player_type&&($(window).unbind("resize",c),setTimeout(function(){$(window).bind("resize",c)},1E3))};"undefined"===typeof new_mobile_player&&$(window).bind("resize",c)};SSPlayer.prototype.play=function(a){this.controller.play(a||1)};SSPlayer.prototype.gotoCurrent=function(){this.controller.play(this.controller.currentPosition,!0)};
