$("html").attr("class", "js"); function errorsuppressor() { return true } if (location.href.indexOf("localhost") == -1) { window.onerror = errorsuppressor } function addLoadEvent(a) { var b = window.onload; if (typeof window.onload != "function") { window.onload = a } else { window.onload = function() { b(); a() } } } function insertAfter(c, a) { var b = a.parentNode; if (b.lastChild == a) { b.appendChild(c) } else { b.insertBefore(c, a.nextSibling) } } function populateElement(a, b) { $(a).each(function() { if ($.trim(this.value) == "") { this.value = b } }); $(a).focus(function() { if (this.value == b) { this.value = "" } }); $(a).blur(function() { if ($.trim(this.value) == "") { this.value = b } }) } if (!$("body.override").length) { $(".article.single").css("left", function() { return $(this).offset().left }).animate({ left: "0" }, 1200) } if ($("body.articles").length || $("body.event-detail").length) { $("body").prepend('<div id="fb-root"></div>'); var likeBtn = '<fb:like id="facebook-like" send="true" show_faces="false"></fb:like>'; var shortTitle = $("#ctl00_fbtitle").attr("content").substring(0, 100); var tweetBtn = '<a href="http://twitter.com/share" class="twitter-share-button" data-text="' + shortTitle + '" data-count="horizontal" data-via="tmpww" data-lang="en">Tweet</a>'; $(".content").append(likeBtn); $("#facebook-like").after(tweetBtn); $(".twitter-share-button").after('<fb:comments id="facebook-comments" migrated="1"></fb:comments>'); window.fbAsyncInit = function() { FB.init({ appId: "150531684982543", status: true, cookie: true, xfbml: true }) }; (function() { var a = document.createElement("script"); a.async = true; a.src = document.location.protocol + "//connect.facebook.net/en_US/all.js"; document.getElementById("fb-root").appendChild(a) } ()) } $("a.external, body.our-expertise-detail.override .article a").click(function() { this.target = "_blank" }); var searchLabel = $("#ctl00_header_lblSearchWebsite").text(); var searchQuestion = $("#header fieldset .text"); searchQuestion.val(searchLabel); populateElement(searchQuestion, searchLabel); var items = $("#highlights-content ul > li").length; if (items > 4) { $("#highlights-content").wrap('<div id="highlights-wrap" />'); $("#highlights-wrap").append('<a id="scroll-back" href="#" class="scroll-button prev disabled" role="button">Go Back</a>'); $("#scroll-back").addClass("scroll-back-off"); $("#highlights-wrap").append('<a id="scroll-forward" href="#" class="scroll-button next" role="button">View More</a>') } $("#scroll-back, #scroll-forward").click(function() { return false }); function resizeHighlights() { viewPort = $(window).width(); if (viewPort >= 1004) { itemAmount = 4; $(".wrapper").css("min-width", "1263px"); $("#highlights-content").addClass("expand"); $("#highlights-wrap").addClass("expand") } else { itemAmount = 3; $("#highlights-content").removeClass("expand"); $("#highlights-wrap").removeClass("expand") } } function viewPortSize() { resizeHighlights(); $("#highlights-content").jCarouselLite({ btnNext: "#scroll-forward", btnPrev: "#scroll-back", visible: itemAmount, scroll: 1, speed: 500, circular: false }) } viewPortSize(); $("#footer").append('<a id="footer-control" href="#">Expand</a>'); $("#footer-control").toggle(function() { $(this).text("Hide").attr("title", "Hide view").addClass("expand"); $("#highlights").animate({ bottom: "35px" }, "medium"); return false }, function() { $(this).text("Expand").attr("title", "Expand view").removeClass("expand"); $("#highlights").animate({ bottom: "-105px" }, "fast"); return false }); var modalWindow = { parent: "body", windowId: null, content: null, width: null, height: null, close: function() { $(".modal-window").remove(); $(".modal-overlay").remove() }, open: function() { var a = ""; a += '<div class="modal-overlay"></div>'; a += '<div id="' + this.windowId + '" class="modal-window" style="width:' + this.width + "px; height:" + this.height + "px; margin-top:-" + (this.height / 2) + "px; margin-left:-" + (this.width / 2) + 'px;">'; a += this.content; a += "</div>"; $(this.parent).append(a); $(".modal-window").append('<a class="close-window">Close Window</a>'); $(".close-window").click(function() { modalWindow.close() }); $(".modal-overlay").click(function() { modalWindow.close() }) } }; var openModal = function(a) { modalWindow.windowId = "generic-modal"; modalWindow.width = 980; modalWindow.height = 575; modalWindow.content = '<iframe width="980" height="575" frameborder="0" scrolling="no" allowtransparency="false" src="' + a + '?layout=1">&lt/iframe>'; modalWindow.open(); return false }; $(".modal").click(function() { openModal(this.href); return false }); if ($("body.default").length) { function stopSlide() { $("#our-vision").cycle("stop") } function pauseSlide() { $("#our-vision").cycle("pause") } function resumeSlide() { $("#our-vision").cycle("resume") } function innerSlide() { if ($(".inner-slide").is(":visible")) { pauseSlide(); $(".inner-slide").cycle({ fx: "fade", cleartype: true, cleartypeNoBg: true, autostop: 1, timeout: 3000, end: resumeSlide }) } } $("#our-vision div").hide(); $("#our-vision div:first").show(); $("#our-vision").after('<div id="nav-indicator" role="navigation">').cycle({ fx: "fade", speed: "fast", cleartype: true, cleartypeNoBg: true, delay: 1000, autostop: 0, timeout: 11000, pager: "#nav-indicator", activePagerClass: "active", onPagerEvent: function() { pauseSlide() }, after: innerSlide }) } if ($("body#connect").length) { $("#aside a.button").click(function() { $("#aside li").removeClass("default"); $("#aside .widget").hide(); $(this).parent().addClass("default"); $(this).next().show(); $(".playing_gsvb").removeAttr("style").removeClass("playing_gsvb").addClass("idle_gsvb"); $(".player_gsvb").remove(); $(".resultDiv_gsvb").removeAttr("title"); return false }); $("li#facebook .widget").append("<iframe src='http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Ftmpworldwide&amp;width=221&amp;colorscheme=light&amp;show_faces=true&amp;stream=true&amp;header=false&amp;height=343' scrolling='no' frameborder='0' style='border:none; background: #fff; overflow:hidden; width:221px; height:343px;'></iframe>"); $("li#linkedin .widget").append('<div id="pg-linkedin"></div>'); new LinkedIn.CompanyInsiderBox("pg-linkedin", "People in Business"); $("li#youtube .widget").append('<div id="videobar"></div>'); window._uds_vbw_donotrepair = true; function LoadVideoBar() { var a; var b = { largeResultSet: true, horizontal: false, autoExecuteList: { executeList: ["ytchannel:TMPWorldwideNA"]} }; a = new GSvideoBar(document.getElementById("videobar"), GSvideoBar.PLAYER_ROOT_FLOATING, b) } GSearch.setOnLoadCallback(LoadVideoBar) } if ($("body.our-work-client").length) { $("body.override .share").appendTo("#section"); $(".panel").hide(); $(".panel:first").show(); $("#client-uri").after("<div id='campaign-details'/>"); $("body.override .panel:first h2").clone().appendTo("#campaign-details"); $("body.override .panel:first p.details").clone().appendTo("#campaign-details"); var panelItems = $(".panel").length; if (panelItems > 1) { $("#client-uri").after("<ul id='page'/>"); $("#page").append("<li id='p-previous'><a href='#previous'>Previous</a></li>"); $("#page").append("<li id='p-next'><a href='#next'>Next</a></li>"); $("#p-previous a, #p-next a").click(function() { var a = $(".panel:visible"); var c = $(".panel").length; var b = a.prevAll().length; $(this).attr("hash") == "#next" ? b++ : b--; if (b == -1) { b = c - 1 } if (b == c) { b = 0 } a.hide(); $("#campaign-details").empty(); $("body.override .panel:eq(" + b + ") h2").clone().appendTo("#campaign-details"); $("body.override .panel:eq(" + b + ") p.details").clone().appendTo("#campaign-details"); $(".panel:eq(" + b + ")").fadeIn(500); return false }) } } if ($("body.our-expertise-detail").length) { $(".sample, .tb-overview").hide(); $("#tb-container h1").text($(".tb-overview:first h2.heading").text()); $(".sample:first, .tb-overview:first").show(); $("#services-nav a, #tb-nav a, #tb-sub-nav a").click(function() { $(".sample, .tb-overview").hide(); $("#tb-sub-nav a").addClass("selected").not(this).removeClass("selected"); $("#tb-container h1").text($($(this).attr("href") + " h2.heading").text()); $($(this).attr("href")).fadeIn("fast"); return false }); var sNavItems = $("#services-nav li").length; if (sNavItems < 2) { $("#services-home").hide() } $("body.override #tb-sub-nav-container").insertAfter(".content"); $("#tb-sub-nav-container h2").click(function() { if ($("#tb-sub-nav").is(":visible")) { $(this).parent().animate({ bottom: "-173px" }, "fast"); $(".tb-overview:visible").removeClass("boxy-mc-box-box"); $("#tb-sub-nav").hide() } else { $(".tb-overview:visible").addClass("boxy-mc-box-box"); $(this).parent().animate({ bottom: "0" }, "slow"); $("#tb-sub-nav").show() } }); $("#tb-sub-nav a").click(function() { $("#tb-nav").hide(); $("#tb-sub-nav-container").animate({ bottom: "-173px" }, "fast"); $(".tb-overview").removeClass("boxy-mc-box-box"); $("#tb-sub-nav").hide() }) } function initOurWork() { $("#panel-detail .content").append('<ul id="filter-nav"><li><a href="#" id="client" class="selected" role="navigation">Client</a></li><li><a href="#" id="sector" role="navigation">Sector</a></li></ul>'); $("#client").click(function(a) { a.preventDefault(); $("#listing").hide(); $(".gallery").fadeIn("fast"); $("#filter-nav a").addClass("selected").not(this).removeClass("selected") }); $("#sector").click(function(a) { $("#listing").remove(); a.preventDefault(); $(".gallery").hide(); $("#filter-nav a").addClass("selected").not(this).removeClass("selected"); var b = []; $(".gallery li span").each(function(c) { if ($.inArray($(this).text(), b) == -1) { b.push($(this).text()) } }); b.sort(); vCategory = ""; $("#aside").append("<div id='listing'></div>"); for (cat in b) { vCategory = b[cat]; vCatID = vCategory.replace(/ /g, "-"); $("#listing").append("<h2 id='" + vCatID + "'>" + vCategory.replace(/-/g, "/") + "</h2>"); $("#listing").append("<div class='category' style='display:none' id='div-" + vCatID + "'></div>"); $(".gallery li span:contains('" + vCategory + "')").each(function(c) { $("#div-" + vCatID).append($(this).parent().html()) }); if (cat == 0) { vIcons = "div-" + vCatID; $("#" + vIcons).toggle("fast") } $(".modal").unbind("click"); $(".modal").click(function(c) { c.preventDefault(); openModal(this.href) }) } $("#listing h2").click(function(c) { vIcons = "div-" + this.id; $("#" + vIcons).toggle("fast") }) }) } var addthis_brand = "People in Business"; var addthis_share = { url_transforms: { remove: ["layout"]} }; $(".addthis_button").mouseover(function() { addthis.update("share", "url", location.href.replace("/#/", "/")) });
