﻿function BannerSlider() { function c(c) { b.eq(a).stop(true, false).animate({ left: 0 }, { queue: false, duration: 1e3, specialEasing: { easing: "easeOutExpo" }, complete: function () { $(this).children(".l1").delay(100).animate({ right: -800 }, { duration: 500, easing: "easeOutExpo" }); $(this).children(".l2").delay(200).animate({ right: -800 }, { duration: 600, easing: "easeOutExpo" }); $(this).children(".l3").delay(300).animate({ right: -800 }, { duration: 700, easing: "easeOutExpo" }); $(this).children(".l4").delay(400).animate({ right: -800 }, { duration: 800, easing: "easeOutExpo" }); $(this).children(".logo").delay(500).animate({ right: -800 }, { duration: 900, easing: "easeOutExpo" }) } }); a = c; if (a < 0) a = b.length - 1; else if (a >= b.length) a = 0; b.eq(a).stop(true, false).animate({ left: 0 }, { queue: false, duration: 1e3, specialEasing: { easing: "easeOutExpo" }, complete: function () { $(this).children(".l1").delay(100).animate({ right: 1e3 }, { duration: 500, easing: "easeOutExpo" }); $(this).children(".l2").delay(200).animate({ right: 1e3 }, { duration: 600, easing: "easeOutExpo" }); $(this).children(".l3").delay(300).animate({ right: 1e3 }, { duration: 700, easing: "easeOutExpo" }); $(this).children(".l4").delay(400).animate({ right: 1e3 }, { duration: 800, easing: "easeOutExpo" }); $(this).children(".logo").delay(500).animate({ right: 1e3 }, { duration: 900, easing: "easeOutExpo" }) } }) } var a = 0; var b = $(".message"); c(0); setInterval(function () { c(a + 1) }, 7e3) } function HomepageSlider() { function c(c) { b.eq(a).stop(true, false).animate({ left: -960 }, { queue: false, duration: 1e3, specialEasing: { easing: "easeOutExpo" }, complete: function () { $(this).children(".sTitle").animate({ left: 980 }, { duration: 1e3, easing: "easeOutExpo" }); $(this).children().find("h2").animate({ left: 980 }, { duration: 800, easing: "easeOutExpo" }); $(this).children().find("p").animate({ left: 980 }, { duration: 800, easing: "easeOutExpo" }); $(this).children().find(".findOut").animate({ left: 980 }, { duration: 800, easing: "easeOutExpo" }); $(this).children(".img").animate({ right: -500 }, { duration: 800, easing: "easeOutExpo" }) } }); a = c; if (a < 0) a = b.length - 1; else if (a >= b.length) a = 0; b.eq(a).stop(true, false).animate({ left: 0 }, { queue: false, duration: 200, specialEasing: { easing: "easeOutExpo" }, complete: function () { $(this).children(".sTitle").delay(100).animate({ left: 0 }, { duration: 500, easing: "easeOutExpo" }); $(this).children().find("h2").delay(200).animate({ left: 0 }, { duration: 600, easing: "easeOutExpo" }); $(this).children().find("p").delay(300).animate({ left: 0 }, { duration: 700, easing: "easeOutExpo" }); $(this).children().find(".findOut").delay(400).animate({ left: 0 }, { duration: 800, easing: "easeOutExpo" }); $(this).children(".img").delay(500).animate({ right: -5 }, { duration: 900, easing: "easeOutExpo" }) } }); $("#servicesHome .sliderWrap ul li").removeClass("cr").eq(a).addClass("cr") } $(".slide:not(:first)").css("left", 960); $(".sTitle:not(:first)").css("left", 980); $(".slide h2:not(:first)").css("left", 980); $(".slide p:not(:first)").css("left", 980); $(".findOut:not(:first)").css("left", 980); $(".slide .img:not(:first)").css("right", -500); var a = 0; var b = $(".slide"); $("#servicesHome .sliderWrap ul li").click(function () { c($(this).index()) }); $("#servicesHome .sliderWrap .prev").click(function () { c(a - 1) }); $("#servicesHome .sliderWrap .next").click(function () { c(a + 1) }); var d = $(".clk"); d.each(function () { d.hover(function () { $(this).parent().children().first().stop().animate({ opacity: 1 }, 300); $(this).parent().children().find("sTitle").css("color", "#000000"); $(this).parent().children().find("h2").css("color", "#000000"); $(this).parent().children().find("p").css("color", "#000000"); $(this).parent().children().find(".findOut").css("background", "#000000") }, function () { $(this).parent().children().first().stop().animate({ opacity: 0 }, 500); $(this).parent().children().find("sTitle").css("color", "#333333"); $(this).parent().children().find("h2").css("color", "#333333"); $(this).parent().children().find("p").css("color", "#333333"); $(this).parent().children().find(".findOut").css("background", "#333333") }) }); var e = $(".prev, .next"); e.hover(function () { $(this).children().first().stop().animate({ opacity: 1 }, 300); $(this).children().last().stop().animate({ opacity: 1 }, 300) }, function () { $(this).children().first().stop().animate({ opacity: 0 }, 500); $(this).children().last().stop().animate({ opacity: 0 }, 500) }); c(2) } function HighlightBlogTabOnFooter() { $("#footerNav a").parent().removeClass("currentTab"); $("#footerNav #bloggedDownTab").addClass("currentTab"); $("#footerContentSlider").delay(300).animate({ marginTop: -1020 }, { duration: 500, easing: "easeInOutQuint" }) } function PlayVideoActions() { $("#indexVideo").css("display", "block"); $("#indexBannerWrapper").animate({ "margin-bottom": "77px" }, { duration: 600 }); $("#indexBannerBackground, #indexVideoWrap").animate({ height: "570px" }, { duration: 800 }); $("#messagesWrap").animate({ top: "-500px" }, { duration: 800 }); $("#indexVideoWrap").css("z-index", "3"); $("#videoWrapper").fadeIn(300); $("#wideBannerWrapper").fadeOut(100); $("#callBack").animate({ top: "-400px" }, { duration: 800, easing: "easeInExpo" }); if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) { } else { callToActionscript("indexVideo") } } function AutoPlayVideo() { if (location.href.indexOf("#play") != -1) { PlayVideoActions() } } function AlightContactDropDown() { $("#callBack").animate({ top: "85px" }, { duration: 800, easing: "easeOutExpo" }) } function AlightContactDropUp() { $("#callBack").animate({ top: "-400px" }, { duration: 800, easing: "easeInExpo" }) } function SwitchPrePostScreens() { $("#postScreen").animate({ top: "10px" }, { duration: 800 }); $("#playVideo").animate({ top: "-440px" }, { duration: 800 }); $("#showreelText").animate({ top: "-440px" }, { duration: 800 }) } function ExpandBanner() { $("#indexBannerWrapper").animate({ "margin-bottom": "77px" }, { duration: 600 }); $("#indexBannerBackground, #indexVideoWrap").animate({ height: "540px" }, { duration: 800 }); $("#indexVideoWrap").css("z-index", "3"); $("#videoWrapper").fadeIn(300); $("#wideBannerWrapper").fadeOut(100); $("#callBack").animate({ top: "-400px" }, { duration: 800 }) } function BacktoNormal() { $("#videoWrapper").animate({ visibility: "hidden" }, { duration: 500 }); $("#wideBannerWrapper").fadeIn(100); $("#indexBannerWrapper").animate({ "margin-bottom": "0px" }, { duration: 600 }); $("#indexBannerBackground, #indexVideoWrap").animate({ height: "493px" }, { duration: 500 }); $("#indexVideoWrap").css("z-index", "0"); $("#callBack").animate({ top: "85px" }, { duration: 800 }); $("#indexPostScreen").animate({ top: "0px" }, { duration: 500 }); $("html, body").animate({ scrollTop: 0 }, "slow", "easeOutExpo") } function PauseAlightMovie(a) { var b = getFlashMovie(a); b.PauseMovie() } function MovieAction(a) { var b = getFlashMovie(a); b.MovieAction() } function callToActionscript(a) { var b = getFlashMovie(a); b.sendToActionscript("Showreel.f4v") } function getFlashMovie(a) { var b = navigator.appName.indexOf("&#8221;Microsoft") != -1; return b ? window[a] : document[a] } (function (a) { function c(b) { var c; if (b && b.constructor == Array && b.length == 3) return b; if (c = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b)) return [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])]; if (c = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b)) return [parseFloat(c[1]) * 2.55, parseFloat(c[2]) * 2.55, parseFloat(c[3]) * 2.55]; if (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b)) return [parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16)]; if (c = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b)) return [parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16)]; return d[a.trim(b).toLowerCase()] } function b(b, d) { var e; do { e = a.curCSS(b, d); if (e != "" && e != "transparent" || a.nodeName(b, "body")) break; d = "backgroundColor" } while (b = b.parentNode); return c(e) } a.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function (d, e) { a.fx.step[e] = function (a) { if (a.state == 0) { a.start = b(a.elem, e); a.end = c(a.end) } a.elem.style[e] = "rgb(" + [Math.max(Math.min(parseInt(a.pos * (a.end[0] - a.start[0]) + a.start[0]), 255), 0), Math.max(Math.min(parseInt(a.pos * (a.end[1] - a.start[1]) + a.start[1]), 255), 0), Math.max(Math.min(parseInt(a.pos * (a.end[2] - a.start[2]) + a.start[2]), 255), 0)].join(",") + ")" } }); var d = { aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0]} })(jQuery); var effect = "easeOutExpo"; var fullyloaded = false; $(document).ready(function () { function b() { $(this).find(".subUl").animate({ height: 0 }, { duration: 800, easing: "easeOutExpo" }) } function a() { $(this).find(".subUl").animate({ height: 120 }, { duration: 800, easing: "easeOutExpo" }) } BannerSlider(); if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) { $(".indexBanner .overlay").css("display", "none"); $("#indexContents #servicesHome .sliderWrap").css("background", "none") } $(".subServ").hoverIntent({ sensitivity: 1, interval: 100, over: a, timeout: 400, out: b }); $(function () { $(window).bind("load", function () { $(".swi").each(function () { var a = $(this).attr("title"); var b = "/resources/userContent/images/"; $(this).attr({ src: b + a + ".png" }) }) }); HomepageSlider() }); HighlightBlogTabOnFooter(); $("#playVideo").children().first().fadeOut(100); $("#replayVideo").children().first().fadeOut(100); if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) { $("#playVideo").css("display", "block") } else { $("#playVideo,#replayVideo").hover(function () { if ($.browser.msie && jQuery.browser.version < "9.0") { $(this).children().first().stop(true, true).show(); $(this).children().last().stop(true, true).hide() } else { $(this).children().first().stop(true, true).fadeIn(500); $(this).children().last().stop(true, true).fadeOut(500) } }, function () { if ($.browser.msie && jQuery.browser.version < "9.0") { $(this).children().first().stop(true, true).hide(); $(this).children().last().stop(true, true).show() } else { $(this).children().first().stop(true, true).fadeOut(500); $(this).children().last().stop(true, true).fadeIn(500) } }) } $("#topShadow").css("display", "none"); setTimeout(function () { AutoPlayVideo() }, 1500); var c = '<object width="960" height="540"><param name="movie"value="http://www.youtube.com/v/Whk5PDwmzWE?version=3&hl=en_GB&autoplay=1">' + '</param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"><param name="wmode" value="opaque">' + '</param><embed src="http://www.youtube.com/v/Whk5PDwmzWE?version=3&hl=en_GB&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always"' + ' allowfullscreen="true" width="960" height="595" wmode="opaque"></embed></object>'; if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) { $("#indexVideo").html(c); $("#indexVideo").css("display", "none"); $("#alternateContents").fadeOut(100); $("#autoMessages").css({ height: "93", bottom: "10px" }); $("#playVideo").fadeIn(100) } else { var d = { wmode: "transparent", allowfullscreen: "true" }; var e = { name: "skuuudleVideo", allowscriptaccess: "always", allowfullscreen: "true" }; var f = false; swfobject.embedSWF("/Resources/video/ShowReel.swf", "indexVideo", "960", "570", "9.0.0", "/Resources/js/swfobject/expressInstall.swf", f, d, e) } $("#playVideo,#replayVideo").click(function () { _gaq.push(["_trackEvent", "ShowReelHomePage", "PlayClicked"]); PlayVideoActions(); $("#replayVideo").html('<img src="/Resources/images/replayVideoHover.png" alt="replay showreel video" /><img src="/Resources/images/replayVideo.png" alt="replay showreel" />'); $("#replayVideo").children().first().fadeOut(100) }); $(window).bind("load", function () { setTimeout(function () { $(".widgetImageLarge img").animate({ width: "190px", height: "200px", left: "45px", top: "85px" }, { queue: false, duration: 10, easing: effect }) }, 500) }) })
