jQuery(function($) { $("li.who_image").fadeTo(500, 0.5); $("li.who_image").hover(function() { $("#who_" + this.id).siblings().removeClass("show"); $("#who_" + this.id).siblings().addClass("hide"); $("#who_" + this.id).removeClass("hide"); $("#who_" + this.id).addClass("show"); $(this).siblings().fadeTo(200, 0.5); $(this).fadeTo(1000, 1) }); $("a.gallery_item").click(function(event) { if ($(this).hasClass("movie_item")) { $("#moviewrapper").siblings().css("display", "none"); $("#moviewrapper").css("display", "block") } else { $("#placeholder").siblings().css("display", "none"); $("#placeholder").css("display", "block"); $("#placeholder").fadeTo(250, 5); $("#placeholder").attr({ src: ($(this).attr("href")) }); $("#placeholder").fadeTo(250, 1) } $("#desc").attr({ innerHTML: ($(this).attr("title")) }); $(this).siblings().removeClass("highlight"); $(this).addClass("highlight"); event.preventDefault() }); $.easing.easeOutBounce = function(x, t, b, c, d) { if ((t /= d) < (1 / 2.75)) { return c * (7.5625 * t * t) + b } else { if (t < (2 / 2.75)) { return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b } else { if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b } } } }; moveitHome(); show_section("who0"); show_section("services0"); show_section("how0"); show_section("why0"); show_folio(0) }); function moveitHome() { var $paneTarget = $("#pane-target"); var myWidth = "" + (750 - myXAdjust) + "px"; var myHeight = "" + (790 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1500, { easing: "linear", speed: 750 }); setMyMenuItemActive("intro") } function moveWhoToJunctionLeft() { var $paneTarget = $("#pane-target"); var myWidth = "" + (3133 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 799, { easing: "linear", speed: 750 }); var e = document.getElementById("map_locator"); e.style.margin = "42px 0px 0px 241px" } function moveJunctionLefttoWho() { var $paneTarget = $("#pane-target"); var myWidth = "" + (4178 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 799, { easing: "linear", speed: 750 }); var e = document.getElementById("map_locator"); e.style.margin = "42px 0px 0px 270px" } function moveWhotoJunctionRight() { var $paneTarget = $("#pane-target"); var myWidth = "" + (4633 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 400, { easing: "linear", speed: 350 }); var e = document.getElementById("map_locator"); e.style.margin = "42px 0px 0px 290px" } function moveJunctionRighttoWho() { var $paneTarget = $("#pane-target"); var myWidth = "" + (4178 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 400, { easing: "linear", speed: 350 }); var e = document.getElementById("map_locator"); e.style.margin = "42px 0px 0px 271px" } function moveIntroToJunction() { var $paneTarget = $("#pane-target"); var myWidth = "" + (1433 - myXAdjust) + "px"; var myHeight = "" + (790 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: "1233px", left: myWidth }, 600, { easing: "linear", speed: 750 }); myWidth = "" + (2133 - myXAdjust) + "px"; myHeight = "" + (2333 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }); myWidth = "" + (3133 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }) } function moveJunctionToIntro() { var $paneTarget = $("#pane-target"); var myWidth = "" + (2133 - myXAdjust) + "px"; var myHeight = "" + (2333 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }); myWidth = "" + (1433 - myXAdjust) + "px"; myHeight = "" + (1233 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }); myWidth = "" + (950 - myXAdjust) + "px"; myHeight = "" + (790 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 2000, { easing: "easeOutBounce", speed: 1200 }); var e = document.getElementById("map_locator"); e.style.margin = "12px 0px 0px 213px" } function moveWhereToJunction() { var $paneTarget = $("#pane-target"); var myWidth = "" + (2053 - myAdjustSize()) + "px"; var myHeight = "" + (2463 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1000, { easing: "linear", speed: 750 }); myWidth = "" + (3133 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1000, { easing: "linear", speed: 750 }) } function moveJunctiontoWhere() { var $paneTarget = $("#pane-target"); var myWidth = "" + (2053 - myAdjustSize()) + "px"; var myHeight = "" + (2463 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 400, { easing: "linear", speed: 350 }); myWidth = "" + (1453 - myAdjustSize()) + "px"; myHeight = "" + (2320 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 400, { easing: "linear", speed: 350 }); myWidth = "" + (1080 - myAdjustSize()) + "px"; myHeight = "" + (2195 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "easeOutBounce", speed: 1000 }); var e = document.getElementById("map_locator"); e.style.margin = "32px 0px 0px 207px" } function moveWhyToJunction() { var $paneTarget = $("#pane-target"); var myWidth = "" + (1442 - myAdjustSize()) + "px"; var myHeight = "" + (3885 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 300, { easing: "linear", speed: 750 }); myWidth = "" + (1570 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "linear", speed: 750 }); myWidth = "" + (3133 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "linear", speed: 750 }) } function moveJunctiontoWhy() { var $paneTarget = $("#pane-target"); var myWidth = "" + (1570 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "linear", speed: 750 }); myWidth = "" + (1442 - myAdjustSize()) + "px"; myHeight = "" + (3885 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 300, { easing: "linear", speed: 750 }); myWidth = "" + (1300 - myAdjustSize()) + "px"; myHeight = "" + (4279 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "easeOutBounce", speed: 1000 }); var e = document.getElementById("map_locator"); e.style.margin = "73px 0px 0px 217px" } function moveFolioToJunction() { var $paneTarget = $("#pane-target"); var myWidth = "" + (6533 - myAdjustSize()) + "px"; var myHeight = "" + (4435 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1000, { easing: "linear", speed: 750 }); myWidth = "" + (5633 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1500, { easing: "linear", speed: 750 }); myWidth = "" + (4633 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }) } function moveJunctiontoFolio() { var $paneTarget = $("#pane-target"); var e = document.getElementById("map_locator"); var myWidth = "" + (5633 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }); e.style.margin = "62px 0px 0px 307px"; myWidth = "" + (6533 - myAdjustSize()) + "px"; myHeight = "" + (4435 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 800, { easing: "linear", speed: 750 }); myWidth = "" + (7433 - myAdjustSize()) + "px"; myHeight = "" + (4435 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 600, { easing: "linear", speed: 750 }); e.style.margin = "73px 0px 0px 316px"; myWidth = "" + (7800 - myAdjustSize()) + "px"; myHeight = "" + (4435 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1000, { easing: "easeOutBounce", speed: 1000 }); e.style.margin = "73px 0px 0px 332px" } function moveHowToJunction() { var $paneTarget = $("#pane-target"); var myWidth = "" + (6790 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1000, { easing: "linear", speed: 750 }); myWidth = "" + (4633 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "linear", speed: 750 }) } function moveJunctiontoHow() { var $paneTarget = $("#pane-target"); var myWidth = "" + (6790 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 500, { easing: "linear", speed: 750 }); myWidth = "" + (7570 - myAdjustSize()) + "px"; myHeight = "" + (3000 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 500, { easing: "linear", speed: 750 }); myWidth = "" + (7780 - myAdjustSize()) + "px"; myHeight = "" + (3270 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "easeOutBounce", speed: 1200 }); var e = document.getElementById("map_locator"); e.style.margin = "53px 0px 0px 334px" } function moveServicesToJunction() { var $paneTarget = $("#pane-target"); var myWidth = "" + (5950 - myAdjustSize()) + "px"; var myHeight = "" + (1340 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "linear", speed: 750 }); myWidth = "" + (4833 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1000, { easing: "linear", speed: 750 }); myWidth = "" + (4633 - myAdjustSize()) + "px"; myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 400, { easing: "linear", speed: 750 }) } function moveJunctiontoServices() { var $paneTarget = $("#pane-target"); var e = document.getElementById("map_locator"); var myWidth = "" + (4833 - myAdjustSize()) + "px"; var myHeight = "" + (2703 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 400, { easing: "linear", speed: 750 }); e.style.margin = "16px 0px 0px 300px"; myWidth = "" + (5950 - myAdjustSize()) + "px"; myHeight = "" + (1340 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 700, { easing: "linear", speed: 750 }); myWidth = "" + (7350 - myAdjustSize()) + "px"; myHeight = "" + (1340 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 300, { easing: "linear", speed: 750 }); myWidth = "" + (7700 - myAdjustSize()) + "px"; myHeight = "" + (1340 - myYAdjust) + "px"; $paneTarget.scrollTo({ top: myHeight, left: myWidth }, 1200, { easing: "easeOutBounce", speed: 1200 }); e.style.margin = "13px 0px 0px 327px" } var active_page = "intro"; var myXAdjust = myAdjustSize(); var myYAdjust = myAdjustHeight(); function setMyMenuItemActive(id) { $("#nav_who").removeClass("active"); $("#nav_services").removeClass("active"); $("#nav_how").removeClass("active"); $("#nav_folio").removeClass("active"); $("#nav_why").removeClass("active"); $("#nav_where").removeClass("active"); $("#nav_intro").removeClass("active"); $("#nav_what").removeClass("active"); var $myID = $("#nav_" + id); $myID.addClass("active") } function moveTo(new_page) { if (active_page == new_page) { return } myXAdjust = myAdjustSize(); myYAdjust = myAdjustHeight(); if (active_page == "who") { if (new_page == "intro") { moveWhoToJunctionLeft(); moveJunctionToIntro() } else { if (new_page == "where") { moveWhoToJunctionLeft(); moveJunctiontoWhere() } else { if ((new_page == "why") || (new_page == "what")) { moveWhoToJunctionLeft(); moveJunctiontoWhy() } else { if (new_page == "folio") { moveWhotoJunctionRight(); moveJunctiontoFolio() } else { if (new_page == "how") { moveWhotoJunctionRight(); moveJunctiontoHow() } else { if (new_page == "services") { moveWhotoJunctionRight(); moveJunctiontoServices() } } } } } } } if (active_page == "intro") { if (new_page == "who") { moveIntroToJunction(); moveJunctionLefttoWho() } else { if (new_page == "where") { moveIntroToJunction(); moveJunctiontoWhere() } else { if ((new_page == "why") || (new_page == "what")) { moveIntroToJunction(); moveJunctiontoWhy() } else { if (new_page == "folio") { moveIntroToJunction(); moveWhotoJunctionRight(); moveJunctiontoFolio() } else { if (new_page == "how") { moveIntroToJunction(); moveWhotoJunctionRight(); moveJunctiontoHow() } else { if (new_page == "services") { moveIntroToJunction(); moveWhotoJunctionRight(); moveJunctiontoServices() } } } } } } } if (active_page == "where") { if (new_page == "who") { moveWhereToJunction(); moveJunctionLefttoWho() } else { if (new_page == "intro") { moveWhereToJunction(); moveJunctionToIntro() } else { if ((new_page == "why") || (new_page == "what")) { moveWhereToJunction(); moveJunctiontoWhy() } else { if (new_page == "folio") { moveWhereToJunction(); moveWhotoJunctionRight(); moveJunctiontoFolio() } else { if (new_page == "how") { moveWhereToJunction(); moveWhotoJunctionRight(); moveJunctiontoHow() } else { if (new_page == "services") { moveWhereToJunction(); moveWhotoJunctionRight(); moveJunctiontoServices() } } } } } } } if ((active_page == "why") || (active_page == "what")) { if (new_page == "who") { moveWhyToJunction(); moveJunctionLefttoWho() } else { if (new_page == "intro") { moveWhyToJunction(); moveJunctionToIntro() } else { if (new_page == "where") { moveWhyToJunction(); moveJunctiontoWhere() } else { if (new_page == "folio") { moveWhyToJunction(); moveWhotoJunctionRight(); moveJunctiontoFolio() } else { if (new_page == "how") { moveWhyToJunction(); moveWhotoJunctionRight(); moveJunctiontoHow() } else { if (new_page == "services") { moveWhyToJunction(); moveWhotoJunctionRight(); moveJunctiontoServices() } } } } } } } if (active_page == "folio") { if (new_page == "who") { moveFolioToJunction(); moveJunctionRighttoWho() } else { if (new_page == "intro") { moveFolioToJunction(); moveWhoToJunctionLeft(); moveJunctionToIntro() } else { if (new_page == "where") { moveFolioToJunction(); moveWhoToJunctionLeft(); moveJunctiontoWhere() } else { if ((new_page == "why") || (new_page == "what")) { moveFolioToJunction(); moveWhoToJunctionLeft(); moveJunctiontoWhy() } else { if (new_page == "how") { moveFolioToJunction(); moveJunctiontoHow() } else { if (new_page == "services") { moveFolioToJunction(); moveJunctiontoServices() } } } } } } } if (active_page == "how") { if (new_page == "who") { moveHowToJunction(); moveJunctionRighttoWho() } else { if (new_page == "intro") { moveHowToJunction(); moveWhoToJunctionLeft(); moveJunctionToIntro() } else { if (new_page == "where") { moveHowToJunction(); moveWhoToJunctionLeft(); moveJunctiontoWhere() } else { if ((new_page == "why") || (new_page == "what")) { moveHowToJunction(); moveWhoToJunctionLeft(); moveJunctiontoWhy() } else { if (new_page == "folio") { moveHowToJunction(); moveJunctiontoFolio() } else { if (new_page == "services") { moveHowToJunction(); moveJunctiontoServices() } } } } } } } if (active_page == "services") { if (new_page == "who") { moveServicesToJunction(); moveJunctionRighttoWho() } else { if (new_page == "intro") { moveServicesToJunction(); moveWhoToJunctionLeft(); moveJunctionToIntro() } else { if (new_page == "where") { moveServicesToJunction(); moveWhoToJunctionLeft(); moveJunctiontoWhere() } else { if ((new_page == "why") || (new_page == "what")) { moveServicesToJunction(); moveWhoToJunctionLeft(); moveJunctiontoWhy() } else { if (new_page == "folio") { moveServicesToJunction(); moveJunctiontoFolio() } else { if (new_page == "how") { moveServicesToJunction(); moveJunctiontoHow() } } } } } } } setMyMenuItemActive(new_page); active_page = new_page } function myAdjustSize() { var myPageWidth = 500; var opt = { forceAbsolute: false, container: window, completeHandler: null }; var jWin = $(opt.container); var isWin = opt.container == window; return ((isWin ? jWin.width() : jWin.outerWidth()) / 2) - myPageWidth } function myAdjustHeight() { var myPageHeight = 420; var opt = { forceAbsolute: false, container: window, completeHandler: null }; var jWin = $(opt.container); var isWin = opt.container == window; var heightFudge = isWin ? 2 : 1.8; return ((isWin ? jWin.height() : jWin.outerHeight()) / heightFudge) - myPageHeight } function show_section(id) { $("#" + id).siblings().css("display", "none"); $("#" + id).css("display", "block"); $("#nav_" + id).siblings().children("a").removeClass("active"); $("#nav_" + id).children("a").addClass("active") } function show_folio(num) { $("#folio" + num).siblings().css("display", "none"); $("#folio" + num).css("display", "block"); $("#gallery_nav" + num).siblings().css("display", "none"); $("#gallery_nav" + num).css("display", "block"); $("#nav_" + num).siblings().children("a").removeClass("active"); $("#nav_" + num).children("a").addClass("active"); $("#project" + num).siblings().css("display", "none"); $("#project" + num).css("display", "block"); $("#desc").attr({ innerHTML: ($("#project" + num + " .highlight").attr("title")) }); if ($("#project" + num + " .highlight").hasClass("movie_item")) { $("#moviewrapper").siblings().css("display", "none"); $("#moviewrapper").css("display", "block") } else { $("#moviewrapper").css("display", "none"); $("#placeholder").siblings().css("display", "none"); $("#placeholder").css("display", "block"); $("#placeholder").attr({ src: ($("#project" + num + " .highlight").attr("href")) }); $("#placeholder").attr({ title: ($("#project" + num + " .highlight").attr("title")) }) } };