$(document).ready(function(){if(!$.browser.msie){$("#page a.rolloverImage").each(function(){var a=new Image();var b=$(this).text();a.src="/text.axd?text="+b+"&font=Berthold%20Akzidenz%20Grotesk%20BE&style=Bold&size=14&alpha=255&red=255&green=255&blue=255";a.alt=b;a.title=b;$(this).html(a)});$("#page a.selectedImage").each(function(){var a=new Image();var b=$(this).text();a.src="/text.axd?text="+b+"&font=Berthold%20Akzidenz%20Grotesk%20BE&style=Bold&size=14&alpha=255&red=238&green=37&blue=66";a.alt=b;a.title=b;$(this).html(a)});$("#page a.rolloverImage img").mouseover(function(){imgSrc=$(this).attr("src");matches=imgSrc.match(/-over/);if(!matches){imgSrcOver=imgSrc.replace(/red=255&green=255&blue=255/ig,"red=238&green=37&blue=66");$(this).attr("src",imgSrcOver)}});$("#page a.rolloverImage img").mouseout(function(){$(this).attr("src",imgSrc)})}else{$(document).pngFix();$("ul#submenu li:first, ul#subsubmenu li:first").css("background","none").css("padding-left",0)}$("a[href*=://]").each(function(){var a=$(this).attr("href");if(a.indexOf(document.location.host)==-1){$(this).attr("target","_blank")}})});function skiveTrack(b,a){if(window.location.hostname.toLowerCase()=="skive.co.uk"){var c=new SkiveTrack("1003");c.TrackEvent(b,a)}}function googleTrack(b){var a=_gat._getTracker("UA-5946308-1");a._trackPageview(b)}function carouselButtonNextCallback(c,a,b){$(".jcarousel-next-horizontal").css("z-index",b?100:-100)}function carouselButtonPrevCallback(c,a,b){$(".jcarousel-prev-horizontal").css("z-index",b?100:-100)}function carouselAddEvents(a){a.nextTimer=null;a.prevTimer=null;a.add(0,"&nbsp;");jQuery(".jcarousel-next-horizontal").bind("mouseenter",function(){a.next();if(a.nextTimer===null){a.nextTimer=setInterval(function(){a.next()},10)}return false});jQuery(".jcarousel-prev-horizontal").bind("mouseenter",function(){a.prev();if(a.prevTimer===null){a.prevTimer=setInterval(function(){a.prev()},10)}return false});jQuery(".jcarousel-prev-horizontal").bind("mouseleave",function(){clearInterval(a.prevTimer);a.prevTimer=null;return false});jQuery(".jcarousel-next-horizontal").bind("mouseleave",function(){clearInterval(a.nextTimer);a.nextTimer=null;return false});$(window).resize(function(){$(".jcarousel-prev-horizontal, .jcarousel-next-horizontal").css("height",$(window).height())});$(".jcarousel-prev-horizontal, .jcarousel-next-horizontal").css("height",$(window).height())}function addJCarousel(b,a){$("#main").removeClass("narrowBody");a|=0;jQuery("#mainContent").jcarousel({scroll:1,start:Math.floor(b/2)+a,easing:"linear",size:b+2,initCallback:carouselAddEvents,buttonNextCallback:carouselButtonNextCallback,buttonPrevCallback:carouselButtonPrevCallback});var c=$("#leftContentPanel").html();$("#leftContentPanel").remove();$("#main").prepend('<div class="narrowBody introText">'+c+"</div>");$("#mainContent").css("width","100%")}function addWorkCarousel(){var a=$("#mainContent ul").length-1;addJCarousel(a,-1)}function addFeaturedCarousel(){var a=$("#mainContent li").length;addJCarousel(a)}var tickerSpeed;var tickerPause;var tickerInterval;var showingNewsletter;function addTicker(){tickerSpeed=500;tickerPause=5000;showingNewsletter=false;tickerInterval=setInterval(tick,tickerPause);$("#ticker li[id!=form]").css({height:"15px",overflow:"hidden"});$("#ticker li[id=form]").css({opacity:0});$("#tickerContent").css({height:"79px",overflow:"hidden"});$("#name_data").DefaultValue("Enter Name");$("#email_data").DefaultValue("Enter Email");$("#form").css({display:"none"});$("#newsLetter").click(function(a,b){if(!showingNewsletter){clearInterval(tickerInterval);$("#ticker li[id!=form],#newsLetter").animate({opacity:0},tickerSpeed,null,function(){$(this).css({display:"none"});$("li#form").css({display:"block"}).animate({opacity:1},tickerSpeed,function(){showingNewsletter=true})})}});$("#tickerContent h3").click(function(a,b){if(showingNewsletter){$("li#form").animate({opacity:0},tickerSpeed,null,function(){$(this).css({display:"none"});$("#ticker li[id!=form],#newsLetter").css({display:"block"}).animate({opacity:1},tickerSpeed,null,function(){tickerInterval=setInterval(tick,tickerPause);showingNewsletter=false})})}})}function popItem(a){var b=$(a).html();$(a).animate({opacity:0},tickerSpeed).slideUp(tickerSpeed,function(){$(this).remove();var c=$('<li onclick="toggleItem(this)">'+b+"</li>").css({height:"15px",overflow:"hidden"});$("ul#ticker").append(c);c.animate({opacity:1},tickerSpeed).slideDown(tickerSpeed)})}function tick(){$("ul#ticker li[id!=form]:lt(4)").each(function(b,a){popItem($(this))})}function toggleItem(b){b=$(b);if(b.height()==80){$(b).animate({height:"15px"},tickerSpeed);tickerInterval=setInterval(tick,tickerPause)}else{if(b.height()==15){clearInterval(tickerInterval);var a=false;$("ul#ticker li[id!=form]:lt(4)").each(function(c,d){if(!a){if($(d).html()==b.html()){a=true}else{popItem($(d))}}});$(b).animate({height:"80px"},tickerSpeed)}}}function addReadMore(){var a=$('<p class="clickable">Read More</p>').click(function(){var b=0;$(".workDetailsSection div").each(function(c,d){if(b<$(this).height()){b=$(this).height()}});$(".workDetailsSection div").parent().animate({height:(b+25)+"px"},1000);$(this).remove()});$("#workDetailsSections").append(a);$(".workDetailsSection").css("overflow","hidden").css("height","100px")}var solutionSpeed;function addSolutionAccordion(){solutionSpeed=1000;$("#solutions li h3").css({color:"#FFFFFF",cursor:"pointer"});$("#solutions > li").each(function(){this.originalHeight=$(this).height();$(this).css({height:"14px",overflow:"hidden"}).click(function(a,b){toggleSolution(this)})})}function toggleSolution(a){if($(a).height()==14){$("#solutions > li").each(function(){if($(this).height()!=14){$(this).stop().animate({height:14},solutionSpeed).children("h3").animate({color:"#FFFFFF"},solutionSpeed)}});$(a).stop().animate({height:a.originalHeight},solutionSpeed).children("h3").animate({color:"#ff143c"},solutionSpeed)}else{$(a).stop().animate({height:14},solutionSpeed).children("h3").animate({color:"#FFFFFF"},solutionSpeed)}};