window.app=function(){function u(){return(typeof t=="undefined"||t==="")&&$.get(constant.appRoot+"templates/commentlisttemplate.mustache",function(n){t=n}),t}function r(t){switch(t){case constant.postListTemplateType.a:return(typeof n.a=="undefined"||n.a==="")&&$.get(constant.appRoot+"templates/postlistatemplate.mustache",function(t){n.a=t}),n.a;case constant.postListTemplateType.c:return(typeof n.c=="undefined"||n.c==="")&&$.get(constant.appRoot+"templates/postlistctemplate.mustache",function(t){n.c=t}),n.c;case constant.postListTemplateType.d:return(typeof n.d=="undefined"||n.d==="")&&$.get(constant.appRoot+"templates/postlistdtemplate.mustache",function(t){n.d=t}),n.d;case constant.postListTemplateType.e:return(typeof n.e=="undefined"||n.e==="")&&$.get(constant.appRoot+"templates/postlistetemplate.mustache",function(t){n.e=t}),n.e;case constant.postListTemplateType.f:return(typeof n.f=="undefined"||n.f==="")&&$.get(constant.appRoot+"templates/postlistftemplate.mustache",function(t){n.f=t}),n.f;case constant.postListTemplateType.g:return(typeof n.g=="undefined"||n.g==="")&&$.get(constant.appRoot+"templates/postlistgtemplate.mustache",function(t){n.g=t}),n.g;case constant.postListTemplateType.h:return(typeof n.h=="undefined"||n.h==="")&&$.get(constant.appRoot+"templates/postlisthtemplate.mustache",function(t){n.h=t}),n.h;case constant.postListTemplateType.search:return(typeof n.search=="undefined"||n.search==="")&&$.get(constant.appRoot+"templates/searchlisttemplate.mustache",function(t){n.search=t}),n.search;case constant.postListTemplateType.b:default:return(typeof n.b=="undefined"||n.b==="")&&$.get(constant.appRoot+"templates/postlistbtemplate.mustache",function(t){n.b=t}),n.b}}function f(n,t){var i=r(n);return Mustache.to_html(i,t)}function o(n){var t=u();return Mustache.to_html(t,n)}function h(n){return'<p class="font-resize"><strong style="font-size:11px;">Font Size<\/strong><br/><a style="font-size:14px;margin-left:10px;" href="javascript:window.app.makeFontSmall(\''+n+'\');">A<\/a><a style="font-size:18px;margin-left:10px;" href="javascript:window.app.makeFontMedium(\''+n+'\');">A<\/a><a style="font-size:22px;margin-left:10px;" href="javascript:window.app.makeFontLarge(\''+n+"');\">A<\/a><\/p>"}function a(n,t){return n.toLowerCase()=="united states"||n.toLowerCase()=="canada"?n.toLowerCase()=="united states"?w(t):n.toLowerCase()=="canada"?b(t):!0:!0}function v(n,t){return n.toLowerCase()=="united states"||n.toLowerCase()=="canada"||n==""?(t=t.replace("-",""),d(t)):!0}function y(n,t){return n.toLowerCase()=="united states"||n.toLowerCase()=="canada"?n.toLowerCase()=="united states"?g(t):n.toLowerCase()=="canada"?nt(t):!0:!0}function p(n,t){return n.toLowerCase()=="united states"||n.toLowerCase()=="canada"?k(t,n):t?!1:!0}function s(n){if(n){var t=n.match(/^[A-Za-z\s]+$/);return t?!0:!1}return!1}function w(n){if(n){var t=n.match(/^(\d{5}|\d{9})$/);return t?!0:!1}return!1}function b(n){if(n){var t=n.match(/^[ABCEGHJ-NPRSTVXY]{1}[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}\s+[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}[0-9]{1}$/);return t?!0:!1}return!1}function k(n,t){return t.toLowerCase()=="united states"?n?jQuery.inArray(n,c)!==-1?!0:!1:!1:t.toLowerCase()=="canada"?n?jQuery.inArray(n,l)!==-1?!0:!1:!1:!0}function d(n){if(n){var t=n.match(/^\d{10}$/);return t?!0:!1}return!1}function g(n){if(n){var t=n.match(/^[A-Za-z]{2}$/);return t?!0:!1}return!1}function nt(n){if(n){var t=n.match(/^[A-Za-z]{2}$/);return t?!0:!1}return!1}function tt(n){if(n){var t=n.match(/^\d+$/);return t?!0:!1}return!1}function it(n,t){n.addClass("on"),t.addClass("on")}function e(n,t){n.removeClass("on"),t.removeClass("on")}var n={a:"",b:"",c:"",d:"",e:"",f:"",g:"",h:"",search:""},t="",c=["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","AS","AA","AE","AP","CZ","CM","FM","GU","MH","MP","PW","PI","PR","TT","VI"],l=["AB","BC","MB","NB","NL","NT","NS","NU","ON","PE","QC","SK","YT"];return{getGaqAccount:function(){return constant.gaqAccount},getGaqDomainName:function(){return constant.gaqDomainName},logError:function(n,t,i){if(n.length&&i>0){var r={Message:n||"",LineNumber:i,Url:t||window.location,Referrer:document.referrer||"",UserAgent:navigator.userAgent};$.ajax({type:"POST",url:constant.appRoot+"error/log",data:r,dataType:"json"})}},downloadWhitepaper:function(){var n=$(this),r=n.parents(".detail[data-role=page]"),u=n.parents(".ui-btn").find(".ui-btn-text"),f=n.parents(".post-leadfield"),t=$.cookie("WhitepaperFormLeadID"),i;if(t==null||t==""||t=="undefined"){window.location.href="https://m."+constant.gaqDomainName+"/whitepaper/"+r.data("postId");return}i={whitepaperID:r.data("postId"),leadID:t},$.ajax({url:constant.apiUrl+"whitepaper/file/"+i.whitepaperID+"/"+i.leadID+"?apiKey="+constant.apiKey,crossDomain:!0,beforeSend:function(){n.attr("disabled","disabled"),u.text("Submitting...")},success:function(n){var t="."+constant.gaqDomainName;document.cookie="WhitepaperFormLeadID=; domain="+t+"; expires="+new Date(0).toUTCString()+"; path=/",$.cookie("WhitepaperFormLeadID",n.LeadID,{expires:constant.cookieWhitepaperExpireDays,domain:t,path:"/"}),window.location.href="https://m."+constant.gaqDomainName+"/whitepaper/file/"+n.ID+"/"+n.WhitepaperFiles[0].ID+"/"+n.WhitepaperFiles[0].FileName},error:function(){alert("There was an error. File could not be downloaded.")},complete:function(){n.removeAttr("disabled"),u.text(n.text())}})},postLead:function(){var r=$(this),o=r.parents(".detail[data-role=page]"),u=r.parents(".ui-btn").find(".ui-btn-text"),i=r.parents(".post-leadfield"),h=i.parents(".post-leadfield-box").find(".download-whitepaper"),c=i.find(".post-leadfield-email"),l=i.find(".post-leadfield-firstName"),w=i.find(".post-leadfield-lastName"),b=i.find(".post-leadfield-jobTitle"),k=i.find(".post-leadfield-company"),d=i.find(".post-leadfield-address"),g=i.find(".post-leadfield-address2"),nt=i.find(".post-leadfield-city"),it=i.find(".post-leadfield-zip"),rt=i.find(".post-leadfield-phone"),ut=i.find(".post-leadfield-numVehicles"),ft=i.find("#state option:selected"),et=i.find("#country option:selected"),f=i.find("#businessTypeSelect option:selected"),e=i.find("#jobTitleSelect option:selected"),ot=i.find(".post-leadfield-advertiser"),st=i.find(".post-leadfield-tags"),ht=i.find(".post-leadfield-ipaddress"),ct=i.find(".post-leadfield-whitepapertitle"),lt=i.find(".post-leadfield-channelname"),n={postid:o.data("postId"),firstName:l.val(),lastName:w.val(),email:c.val(),state:ft.val(),country:et.val(),businessTypeSelect:f.val(),businessTypeSelectText:f.text(),jobTitleSelect:e.val(),jobTitleSelectText:e.text(),title:b.val(),company:k.val(),address:d.val(),city:nt.val(),zip:it.val(),phone:rt.val(),numVehicles:ut.val(),address2:g.val()},t;if(!n.postid||!n.firstName||!n.lastName||!n.country||!n.businessTypeSelect||!n.jobTitleSelect||!n.title||!n.company||!n.address||!n.city||!n.zip||!n.phone||!cmtNumVehicles){alert("Please enter all required fields.");return}if(!n.email.match(constant.regexEmail)){alert("Please enter a valid email address.");return}if(!s(n.firstName)){alert("First Name should contain alphabetic characters only.");return}if(!s(n.lastName)){alert("Last Name should contain alphabetic characters only.");return}if(!tt(n.numVehicles)){alert("Number of Vehicles in Fleet accepts numbers only.");return}if(n.country){if(n.state){if(!p(n.country,n.state)){alert("State/Province does not match selected country.");return}if(!y(n.country,n.state)){alert("State/Province field should be two letter abbreviation.");return}}if((n.country.toLowerCase()=="united states"||n.country.toLowerCase()=="canada")&&!n.state){alert("Please select a state/province.");return}if(n.zip&&!a(n.country,n.zip)){if(n.country.toLowerCase()=="united states"){alert("Domestic zip codes should be 5 numeric characters (ex: 01302). If zip codes include +4, it should be 9 numeric characters with no space and no dash (ex: 013021023).");return}if(n.country.toLowerCase()=="canada"){alert("Canadian zip codes should have a space between 3rd and 4th position. (ex: A1A 2B2)<\/li>");return}}if(n.phone&&!v(n.country,n.phone)){alert("Domestic and Canadian phone numbers should be 10-digit numeric only.<\/li>");return}}t={},t["[0].Key"]="firstName",t["[0].Value"]=n.firstName,t["[1].Key"]="lastName",t["[1].Value"]=n.lastName,t["[2].Key"]="email",t["[2].Value"]=n.email,t["[3].Key"]="state",t["[3].Value"]=n.state,t["[4].Key"]="country",t["[4].Value"]=n.country,t["[5].Key"]="businessTypeSelect",t["[5].Value"]=n.businessTypeSelect,t["[6].Key"]="businessTypeSelectText",t["[6].Value"]=n.businessTypeSelectText,t["[7].Key"]="jobTitleSelect",t["[7].Value"]=n.jobTitleSelect,t["[8].Key"]="jobTitleSelectText",t["[8].Value"]=n.jobTitleSelectText,t["[9].Key"]="title",t["[9].Value"]=n.title,t["[10].Key"]="company",t["[10].Value"]=n.company,t["[11].Key"]="address",t["[11].Value"]=n.address,t["[12].Key"]="address2",t["[12].Value"]=n.address2,t["[13].Key"]="city",t["[13].Value"]=n.city,t["[14].Key"]="zip",t["[14].Value"]=n.zip,t["[15].Key"]="phone",t["[15].Value"]=n.phone,t["[16].Key"]="numVehicles",t["[16].Value"]=n.numVehicles,t["[17].Key"]="advertiser",t["[17].Value"]=ot.val(),t["[18].Key"]="tags",t["[18].Value"]=st.val(),t["[19].Key"]="ipaddress",t["[19].Value"]=ht.val(),t["[20].Key"]="whitepapertitle",t["[20].Value"]=ct.val(),t["[21].Key"]="channelname",t["[21].Value"]=lt.val(),$.ajax({url:constant.apiUrl+"whitepaper/lead/"+n.postid+"?apiKey="+constant.apiKey,type:"POST",dataType:"json",data:t,crossDomain:!0,beforeSend:function(){r.attr("disabled","disabled"),u.text("Submitting...")},success:function(n){var t="."+constant.gaqDomainName;document.cookie="WhitepaperFormLeadID=; domain="+t+"; expires="+new Date(0).toUTCString()+"; path=/",$.cookie("WhitepaperFormLeadID",n.LeadID,{expires:constant.cookieWhitepaperExpireDays,domain:t,path:"/"}),i.hide(),h.css("display","block"),$(".post-leadfield-box .download-whitepaper .btn-download-whitepaper").trigger("click")},error:function(){alert("There was an error. Data could not be posted.")},complete:function(){r.removeAttr("disabled"),u.text(r.text())}})},loadMoreWhitepapers:function(n){n.stopImmediatePropagation(),n.preventDefault;var t=$(this),e=t.find(".ui-btn-inner .ui-icon"),h=t.parents(".posts-section"),c=h.find("ul.posts"),v=t.data("channel")?"&f_channel="+t.data("channel"):"",o=t.data("templateType"),i=t.data("pageNumber"),l=t.data("pageSize"),s=t.attr("href"),u=t.data("trackUrl"),a=constant.apiUrl+"whitepaper?apiKey="+constant.apiKey+"&pagenumber="+i+"&pagesize="+l;return $.ajax({url:a,crossDomain:!0,beforeSend:function(){r(o),t.attr("disabled","disabled"),e.addClass("spinning")},success:function(n){var e=f(o,n),r,h,l;e?(c.append(e).listview("refresh"),$.support.pushState&&window.history.pushState({page:i},document.title,s),r=i+1,t.data("pageNumber",r),h=s.replace("/page/"+i,"/page/"+r),t.attr("href",h),l=u.replace("/page/"+i,"/page/"+r),t.data("trackUrl",l),window.app.reloadGoogleAnalytics(u),window.app.reloadPiwik(u)):t.hide()},error:function(){alert("There was an error loading more.")},complete:function(){t.removeAttr("disabled"),e.removeClass("spinning")}}),!1},postComment:function(){var t=$(this),r=t.parents(".detail[data-role=page]"),f=t.parents(".ui-btn").find(".ui-btn-text"),e=t.parents(".comments-section").find(".comments.ui-listview"),i=t.parents(".post-comment"),h=i.find(".post-comment-name"),c=i.find(".post-comment-email"),s=i.find(".post-comment-comment"),n={contenttype:r.data("contentType"),postid:r.data("postId"),author:h.val(),authoremail:c.val(),text:s.val()},l=grecaptcha.getResponse();if(l.length==0){alert("Please validate that you are human.");return}if(!n.contenttype||!n.postid||!n.author||!n.authoremail||!n.text){alert("Please enter name, email and comment.");return}if(!n.authoremail.match(constant.regexEmail)){alert("Please enter valid email address.");return}$.cookie(constant.cookieCommentKeyUserName,n.author,{expires:constant.cookieCommentExpireDays}),$.cookie(constant.cookieCommentKeyUserEmail,n.authoremail,{expires:constant.cookieCommentExpireDays}),$.ajax({url:constant.apiUrl+"comment?apiKey="+constant.apiKey,type:"POST",dataType:"json",data:n,crossDomain:!0,beforeSend:function(){u(),t.attr("disabled","disabled"),f.text("Submitting...")},success:function(){var t={Items:[{Author:n.author,PostDate:"Just now",Text:n.text}]},i=o(t);e.append(i).listview("refresh"),s.val(""),$.scrollTo(e.find("li:last"),200)},error:function(){alert("There was an error. Comment could not be posted.")},complete:function(){t.removeAttr("disabled"),f.text(t.text())}})},loadAllComments:function(){var n=$(this),i=n.parents(".ui-btn").find(".ui-btn-text"),f=n.parents("li.ui-li"),t=n.parents("ul.comments"),r=n.parents(".detail[data-role=page]"),e=r.data("contentType"),s=r.data("postId"),h=constant.apiUrl+"comment?apiKey="+constant.apiKey+"&contenttype="+e+"&id="+s;$.ajax({url:h,crossDomain:!0,beforeSend:function(){u(),n.attr("disabled","disabled"),i.text("Loading...")},success:function(n){var i=o(n);t.html(i),t.find("span.date").each(function(n,t){$(t).text($.format.date($(t).text()+"-08:00","M/d/yyyy h:mm:ss a"))}),t.listview("refresh"),f.remove()},error:function(){alert("There was an error loading comments.")},complete:function(){n.removeAttr("disabled"),i.text(n.text())}})},loadMorePosts:function(n){n.stopImmediatePropagation(),n.preventDefault;var t=$(this),e=t.find(".ui-btn-inner .ui-icon"),h=t.parents(".posts-section"),c=h.find("ul.posts"),l=t.data("channel")?"&f_channel="+t.data("channel"):"",a=t.data("contentType")?"&f_contenttype="+t.data("contentType"):"",v=t.data("excludeType")?"&fe_type="+t.data("excludeType"):"",y=t.data("excludeId")?"&fe_posts="+t.data("excludeId"):"",o=t.data("templateType"),i=t.data("pageNumber"),p=t.data("pageSize"),s=t.attr("href"),u=t.data("trackUrl"),w=constant.apiUrl+"post?apiKey="+constant.apiKey+l+a+v+y+"&pagenumber="+i+"&pagesize="+p;return $.ajax({url:w,crossDomain:!0,beforeSend:function(){r(o),t.attr("disabled","disabled"),e.addClass("spinning")},success:function(n){var e=f(o,n),r,h,l;e?(c.append(e).listview("refresh"),$.support.pushState&&window.history.pushState({page:i},document.title,s),r=i+1,t.data("pageNumber",r),h=s.replace("/page/"+i,"/page/"+r),t.attr("href",h),l=u.replace("/page/"+i,"/page/"+r),t.data("trackUrl",l),window.app.reloadGoogleAnalytics(u),window.app.reloadPiwik(u)):t.hide()},error:function(){alert("There was an error loading more.")},complete:function(){t.removeAttr("disabled"),e.removeClass("spinning")}}),!1},loadMoreSearchPosts:function(n){n.stopImmediatePropagation(),n.preventDefault;var t=$(this),e=t.find(".ui-btn-inner .ui-icon"),h=t.parents(".search-posts-section"),c=h.find("ul.search-posts"),l=t.data("excludeType")?"&fe_type="+t.data("excludeType"):"",a=t.data("searchKeyword"),o=t.data("templateType"),i=t.data("pageNumber"),v=t.data("pageSize"),s=t.attr("href"),u=t.data("trackUrl"),y=constant.apiUrl+"search?apiKey="+constant.apiKey+l+"&q="+a+"&pagenumber="+i+"&pagesize="+v;return $.ajax({url:y,crossDomain:!0,beforeSend:function(){r(o),t.attr("disabled","disabled"),e.addClass("spinning")},success:function(n){var e=f(o,n),r,h,l;e?(c.append(e).listview("refresh"),$.support.pushState&&window.history.pushState({page:i},document.title,s),r=i+1,t.data("pageNumber",r),h=s.replace("&page="+i,"&page="+r),t.attr("href",h),l=u.replace("&page="+i,"&page="+r),t.data("trackUrl",l),window.app.reloadGoogleAnalytics(u),window.app.reloadPiwik(u)):t.hide()},error:function(){alert("There was an error loading more.")},complete:function(){t.removeAttr("disabled"),e.removeClass("spinning")}}),!1},enewsSignup:function(){var i=$(this),n=i.parents(".enews-signup").find(".enews-signup-email").val(),t=constant.emailPreferenceUrl_Textbox.replace(/&amp;+/g,"&");n&&($.cookie(constant.cookieCommentKeyUserEmail,n,{expires:constant.cookieCommentExpireDays}),t+="&em="+n),window.open(t,"_blank")},initSlider:function(n,t){var u,f,i,r,e;if(t.length&&(t.empty(),u=n.find(".swipe-wrap").children().length,u>0)){for(f=$("<em/>"),i=$("<div/>"),r=0;r<u;r++)e=f.clone(),r===0&&e.addClass("on"),i.append(e);return t.append(i.html()),f.remove(),i.remove(),new Swipe(n.get(0),{callback:function(n){t.find("em").removeClass(),t.find("em:nth-child("+(n+1)+")").addClass("on")}})}return null},initPhotoSwipe:function(){var n=$(this),t={getImageCaption:function(n){var i="",t,r,u;for(n.nodeName==="IMG"&&(i=n.getAttribute("alt")),t=0,r=n.childNodes.length;t<r;t++)u=n.childNodes[t],n.childNodes[t].nodeName==="IMG"&&(i=u.getAttribute("alt"));return $("<div/>").html($("<div/>").html(i).text())},enableMouseWheel:!1,enableKeyboard:!1},i=n.find(".gallery a").photoSwipe(t)},initPhotoOverlay:function(){var n=$(this),t;$(".story img").each(function(){var n=$(this),t,i;n.parent().is("a")||(t=n.attr("src"),n.addClass("image"),i=$("<a/>").attr("href",t).addClass("imgwrap"),n.wrap(i))}),t={getImageCaption:function(n){var i="",t,r,u;for(n.nodeName==="IMG"&&(i=n.getAttribute("alt")),t=0,r=n.childNodes.length;t<r;t++)u=n.childNodes[t],n.childNodes[t].nodeName==="IMG"&&(i=u.getAttribute("alt"));return $("<div/>").html($("<div/>").html(i).text())},enableMouseWheel:!1,enableKeyboard:!1},n.find(".story a.imgwrap").length>0&&n.find(".story a.imgwrap").photoSwipe(t)},reloadGoogleAnalytics:function(n,t,r,u,f,e,o,s){if(ga("create",constant.gaqAccount,"auto"),t&&ga("set","dimension1",t+""),r&&ga("set","dimension2",r.toLowerCase()),f&&ga("set","dimension3",("MET_"+f).toLowerCase()),s&&ga("set","dimension4",s.toLowerCase()),o&&ga("set","dimension5",o.toLowerCase()),u&&ga("set","dimension6",u.toLowerCase()),typeof e!="undefined"){var h=e.split(",");for(i=0;i<h.length;i++)ga("send","event","tagview","tag",h[i].toLowerCase(),{nonInteraction:!0})}ga("send","pageview")},reloadPiwik:function(n){n?_paq.push(["trackPageView",n]):_paq.push(["trackPageView"]),_paq.push(["enableLinkTracking"]),_paq.push(["setCookieDomain",constant.paqCookieDomain])},reloadAddThis:function(n){var t=n.find(".social-tools"),i;t.length&&(window.addthis&&(window.addthis=null),i={data_ga_property:constant.gaqAccount,data_ga_social:!0},$.getScript("http://s7.addthis.com/js/300/addthis_widget.js#pubid="+constant.addThisPubId))},makeFontSmall:function(n){$("#"+n+" section.content").removeClass("medium").removeClass("large")},makeFontMedium:function(n){$("#"+n+" section.content").removeClass("large").addClass("medium")},makeFontLarge:function(n){$("#"+n+" section.content").removeClass("medium").addClass("large")},reloadFontTools:function(n){var r=n.attr("id"),t=n.find("section.content .story"),i;t.length&&t.find(".font-resize").length===0&&(i=h(r),t.children("p img").first().length>0?t.children("p img").first().parents("p:first").after(i):t.children("p").first().before(i))},reloadNavMore:function(n){var t=n.find(".navbar-more"),i=n.find(".navbar-more-box");e(t,i),t.unbind("click").click(function(){t.hasClass("on")?e(t,i):it(t,i)}),$(document).mouseup(function(n){t.has(n.target).length===0&&e(t,i)})},prefillNameAndEmail:function(n){n.find(".post-comment-name").val($.cookie(constant.cookieCommentKeyUserName)),n.find(".post-comment-email").val($.cookie(constant.cookieCommentKeyUserEmail)),n.find(".enews-signup-email").val($.cookie(constant.cookieCommentKeyUserEmail))},showAdIframe:function(n,t){$(".ad-"+n).height(t).parent().show()},updateAdIframeHeight:function(n,t){$(".ad-"+n).height(t)},trackEventGA:function(n,t,i){_gaq.push(["_trackEvent",n,t,i])}}}(),window.slider={};var pymMobile=new pym.BBMMobile;window.onerror=function(n,t,i){window.app.logError(n,t,i)},$(document).bind("ready",function(){$.mobile.ajaxEnabled=!1,$.mobile.pushStateEnabled=!1,$.mobile.defaultPageTransition="none";$(document).on("click",".post-comment-submit",window.app.postComment);$(document).on("click",".comments-load-all",window.app.loadAllComments);$(document).on("click",".posts-load-more",window.app.loadMorePosts);$(document).on("click",".search-posts-load-more",window.app.loadMoreSearchPosts);$(document).on("click",".enews-signup-submit",window.app.enewsSignup);$(document).on("click",".post-leadfield-submit",window.app.postLead);$(document).on("click",".btn-download-whitepaper",window.app.downloadWhitepaper);$(document).on("click",".whitepapers-load-more",window.app.loadMoreWhitepapers)});$(document).on("pageshow","[data-role=page]",function(n,t){var i=$(this);t.prevPage.attr("id")&&i.find("script").each(function(){eval($(this).html())}),pymMobile._init();var u=window.location.hash.replace("#",""),f=i.data("trackPageView"),r=f?f:u?u:window.location.pathname+window.location.search;i.hasClass("detail")&&r!="/"?window.app.reloadGoogleAnalytics(r,i.data("pubDate"),i.data("author"),i.data("contentType"),i.data("postId"),i.data("tags"),i.data("advertiser"),i.data("channel")):window.app.reloadGoogleAnalytics(r),window.app.reloadPiwik(r),window.app.reloadFontTools(i),window.app.reloadNavMore(i),window.app.prefillNameAndEmail(i)});$(document).on("click","#tag-list a",function(){window.app.trackEventGA("button","story-tag",$(this).data("tag"))});$(document).on("pageshow","#page-home",function(){var n=$(this);window.slider.homeTop=window.app.initSlider(n.find(".sliderHomeTop"),n.find(".sliderHomeTopPosition")),window.slider.homePhotos=window.app.initSlider(n.find(".sliderHomePhotos"),n.find(".sliderHomePhotosPosition")),window.slider.homeProducts=window.app.initSlider(n.find(".sliderHomeProducts"),n.find(".sliderHomeProductsPosition")),addToHomescreen()});$(document).on("pageshow","#page-photo-detail",window.app.initPhotoSwipe);$(document).on("pageshow","#page-article-detail, #page-news-detail, #page-blogpost-detail, #page-product-detail",window.app.initPhotoOverlay);$(document).on("pageshow","#page-channel-bus, #page-channel-rail, #page-channel-motorcoach, #page-channel-accessibility, #page-channel-government-issues, #page-channel-management-operations, #page-channel-security-and-safety, #page-channel-sustainability, #page-channel-university",function(){var n=$(this);window.slider.channelTop=window.app.initSlider(n.find(".sliderChannelTop"),n.find(".sliderChannelTopPosition"))})