$(function(){function a(){$(".before").toggleClass("active");$(".after").toggleClass("active");$("#caseStudy .carousel li").toggleClass("dN");$(".after").click(c);$(".before").unbind("click")}function c(){$(".before").toggleClass("active");$(".after").toggleClass("active");$("#caseStudy .carousel li").toggleClass("dN");$(".before").click(a);$(".after").unbind("click")}$("html").addClass("JS");$("#header .nav ul").each(function(){var b=$(this),d=0;b.children().each(function(){if(++d>3){b=$("<ul></ul>").insertAfter(b);
d=1}b.append(this)})});$("#header .nav ul:nth-child(2)").addClass("left");$("#header .nav ul:nth-child(3)").addClass("right");$("#home .items li:nth-child(2n)").addClass("nth-child-2n");$("#ourWork .items li:nth-child(4n)").addClass("nth-child-4n");$("#caseStudy .items li:nth-child(2n)").addClass("nth-child-2n");$("#ourCompany .items li:nth-child(2n)").addClass("nth-child-2n");$(".column:nth-child(3n)").addClass("nth-child-3n");$(".column:nth-child(3n+1)").addClass("nth-child-3nplus1");$(".column:last-child").addClass("last-child");
$(".items").each(function(){var b=$(this);if(b.children("li").length%2!==0)b.find("li:last-child").addClass("nth-last-of-type-1");else{b.find("li:last-child").addClass("nth-last-of-type-1");b.find("li:last-child").prev("li").addClass("nth-last-of-type-2")}});$("#caseStudy #promo .action li:first-child").addClass("first-child");$("#caseStudy .subsection .content span").each(function(){$(this).css("font-style")==="italic"&&$(this).css("color","#ffffff")});$(".before").click(a);$(".profiles li:nth-child(3n)").addClass("nth-child-3n");
$(".subnav li:first").addClass("first-of-type");$(".subsection .content:last-child").addClass("last-child");$(".subsection .content p:last-child").addClass("last-child");$("#googleMaps").each(function(){var b=$(this).attr("value");$(this).bind("focus",{defaultValue:b},function(){$(this).attr("value")===b&&$(this).attr("value","")});$(this).bind("blur",{defaultValue:b},function(){$(this).attr("value")===""&&$(this).attr("value",b)})});$("a[rel='image']").colorbox({rel:"nofollow"});$("a[rel='services']").colorbox({innerWidth:978,
innerHeight:605,width:978,height:605,initialWidth:978,initialHeight:605,scrolling:false});$("a[rel='services-thumbs']").colorbox({innerWidth:978,innerHeight:705,width:978,height:705,initialWidth:978,initialHeight:705,scrolling:false});$("a[rel='timeline']").colorbox({photo:true,scrolling:false,scalePhotos:false,innerWidth:978,innerHeight:605,width:978,height:605,initialWidth:978,initialHeight:605,onComplete:function(){$("#cboxLoadedContent").css("overflow-x","scroll")}});$("a[rel='film']").colorbox({iframe:true,
innerWidth:802,innerHeight:473});$("a[rel='casestudy-film']").colorbox({onOpen:function(){$("body").addClass("videoOverlay")},onClosed:function(){$("body").removeClass("videoOverlay")}})});var slideSet=0;function pagerFactoryNumbers(a){return'<li><a href="#">'+(a+1)+"</a></li>"}function pagerFactoryThumbs(a){return'<li><a href="#"><img src="'+thumbs["thumb"+a+""]+'" alt="'+thumbs["thumb"+a+"name"]+'" /></a></li>'}
function loadImage(a){if($("#"+a+"").find("img").attr("src")===undefined){var c=new Image;$(c).load(function(){$(this).hide();$("#"+a+"").find("h3").after(c);$(this).fadeIn()}).error(function(){}).attr("src",slides[slideSet][a])}}function loadNext(a,c,b,d){a=$(c).attr("id").match(/[0-9]+/);var e="";$(c).find("img").attr("src")===undefined&&loadImage("slide"+a);if(d){e=a+1;if(e>b.slideCount)return}else e=a===1?b.slideCount:a-1;loadImage("slide"+e)}
function loadNextCasestudy(a,c,b,d){var e=$(c).attr("id").match(/[0-9]+/);$.cookies.set("caseStudy",""+e+"");loadNext(a,c,b,d)}function scrollUp(){$("html, body").animate({scrollTop:0},"slow")}var paralucentLight={src:"/wp-content/themes/jkr-theme/swf/sIFR-paralucentLight.swf"};sIFR.activate(paralucentLight);
sIFR.replace(paralucentLight,{selector:"#designGazette h2",css:["a { background-color: #000000; color: #ffffff; text-decoration: none;}","a:link { background-color: #000000; color: #ffffff; text-decoration: none; }","a:hover { background-color: #000000; color: #ffffff; text-decoration: none; }",".sIFR-root { background-color: #000000; color: #ffffff; }"]});
sIFR.replace(paralucentLight,{selector:"#theLatest h2",css:["a { background-color: #ffffff; color: #000000; text-decoration: none;}","a:link { background-color: #ffffff; color: #000000; text-decoration: none; }","a:hover { background-color: #ffffff; color: #000000; text-decoration: none; }",".sIFR-root { background-color: #ffffff; color: #000000; }"]});sIFR.replace(paralucentLight,{selector:"#designGazette .date",css:[".sIFR-root { background-color: #000000; color: #ffffff; text-align: right; }"]});
sIFR.replace(paralucentLight,{selector:"#theLatest .date",css:[".sIFR-root { background-color: #ffffff; color: #000000; text-align: right; }"]});
