$(function(){new com.infrared5.Site()});var com={};com.infrared5={};com.infrared5.Site=function(){if(Modernizr.canvas){this.backgroundAnim=new com.infrared5.BackgroundAnim()}this.navigationController=new com.infrared5.NavigationController();this.contentController=new com.infrared5.ContentController();$.address.change($.proxy(this.onAddressChange,this))};com.infrared5.Site.prototype.onAddressChange=function(c){var d=c.value.split("/");var a=d[1];var b=d[2];if(a===""){a="home"}this.navigationController.selectItem(a);this.contentController.selectContent(a,b)};com.infrared5.NavigationController=function(){$(".nav_item").click($.proxy(this.onClick,this))};com.infrared5.NavigationController.prototype.onClick=function(a){if(a.target.id==="blog"){window.location="http://blog.infrared5.com"}else{$.address.value(a.target.id)}};com.infrared5.NavigationController.prototype.selectItem=function(a){var c=$(".selected_nav_item");var b=$(".nav_item[id="+a+"]");if(c.get(0)!==b.get(0)){c.animate({"margin-left":-15}).removeClass("selected_nav_item");b.animate({"margin-left":-35}).addClass("selected_nav_item")}};com.infrared5.ContentController=function(){$(".content").hide()};com.infrared5.ContentController.prototype.selectContent=function(a,b){this.pageId=a;this.subSection=b;if(this.currentPage){this.currentPage.hide($.proxy(this.onHidden,this))}else{this.onHidden()}};com.infrared5.ContentController.prototype.onHidden=function(){switch(this.pageId){case"home":this.currentPage=new com.infrared5.Home();break;case"about":this.currentPage=new com.infrared5.About(this.subSection);break;case"whoswho":this.currentPage=new com.infrared5.WhosWho();break;case"services":this.currentPage=new com.infrared5.Services();break;case"work":this.currentPage=new com.infrared5.Work();break;case"contact":this.currentPage=new com.infrared5.Contact();break;default:break}};com.infrared5.BackgroundAnim=function(){this.canvas=$("#canvas").get(0);$(this.canvas).bind("click",$.proxy(this.clickDraw,this));$(window).resize($.proxy(this.onResize,this));this.context=this.canvas.getContext("2d");this.maxLines=200;this.fps=15;this.running=true;this.point={};this.onResize();this.run()};com.infrared5.BackgroundAnim.prototype.clickDraw=function(c){var a=Math.random()*40+10;for(var b=0;b<a;b++){this.initPoint();this.point.x=c.pageX+Math.random()*20-10;this.point.y=c.pageY+Math.random()*20-10;this.drawOneLine()}};com.infrared5.BackgroundAnim.prototype.run=function(){this.running=true;this.numLines=0;this.interval=setInterval($.proxy(this.draw,this),1000/this.fps)};com.infrared5.BackgroundAnim.prototype.onResize=function(){this.canvas.width=$(".background_anim").width();this.canvas.height=$(".background_anim").height();if(!this.running){this.run()}};com.infrared5.BackgroundAnim.prototype.initPoint=function(){this.point.x=Math.random()*this.canvas.width;this.point.y=Math.random()*this.canvas.height;var a=Math.random();if(a<0.6){this.point.vx=(Math.random()<0.5)?-2:2;this.point.vy=(Math.random()<0.5)?-1:1}else{this.point.vx=0;this.point.vy=Math.random()<0.5?-1:1}};com.infrared5.BackgroundAnim.prototype.draw=function(){this.initPoint();this.drawOneLine();this.numLines+=1;if(this.numLines>=this.maxLines){clearInterval(this.interval);this.running=false;this.drawRects()}};com.infrared5.BackgroundAnim.prototype.drawOneLine=function(){var a=this.context.getImageData(0,0,this.canvas.width,this.canvas.height);this.context.strokeStyle="#e0e0e0";this.context.beginPath();this.context.moveTo(this.point.x,this.point.y);while(this.point.x>=0&&this.point.x<this.canvas.width&&this.point.y>=0&&this.point.y<this.canvas.height&&!this.hitLine(a)){this.point.x+=this.point.vx;this.point.y+=this.point.vy}this.context.lineTo(this.point.x,this.point.y);this.context.closePath;this.context.stroke()};com.infrared5.BackgroundAnim.prototype.drawRects=function(){for(var d=0;d<20;d++){var c=Math.random()<0.5?-2:2;var a=Math.random()*this.canvas.width;var f=Math.random()*this.canvas.height;var b=Math.random()*15+10;var e=Math.random()*15+10;this.context.fillStyle="#eeeeee";this.context.beginPath();this.context.moveTo(a,f);this.context.lineTo(a+b,f+b/c);this.context.lineTo(a+b,f+b/c+e);this.context.lineTo(a,f+e);this.context.lineTo(a,f);this.context.fill()}};com.infrared5.BackgroundAnim.prototype.hitLine=function(b){var a=(Math.floor(this.point.y)*b.width+Math.floor(this.point.x))*4+3;if(b.data[a]===0){return false}return true};com.infrared5.About=function(a){this.subSection=a;$(".content").load("./content/about.html",$.proxy(this.onLoaded,this))};com.infrared5.About.prototype.onLoaded=function(){$(".content").fadeIn(400);$(".about_menu li:eq(0)").click(this.onCompanyClick);$(".about_menu li:eq(1)").click(this.onLibraryClick);$(".about_menu li:eq(0)").css("color","red");$(".about_menu li:eq(1)").css("color","black");if(Modernizr.canvas){var a=$(".about_lines").get(0);a.width=950;a.height=700;this.linesContext=a.getContext("2d");this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;this.drawLines()}else{this.onLinesComplete()}this.setSubSection()};com.infrared5.About.prototype.hide=function(a){$(".content").fadeOut(400,a)};com.infrared5.About.prototype.setSubSection=function(){this.updateMenu();$(".about_content_area").fadeOut(400,$.proxy(this.onFadeOutComplete,this))};com.infrared5.About.prototype.updateMenu=function(){if(this.subSection==="library"){$(".about_menu li:eq(0)").removeClass("about_nav_item_selected");$(".about_menu li:eq(1)").addClass("about_nav_item_selected")}else{$(".about_menu li:eq(0)").addClass("about_nav_item_selected");$(".about_menu li:eq(1)").removeClass("about_nav_item_selected")}};com.infrared5.About.prototype.onFadeOutComplete=function(){};com.infrared5.About.prototype.drawLines=function(){var a=[];a.push({x:45,y:700});a.push({x:45,y:473});a.push({x:218,y:388});a.push({x:218,y:162});a.push({x:325,y:108});a.push({x:556,y:217});a.push({x:556,y:562});a.push({x:218,y:388});new com.infrared5.TimedLine(a,this.linesContext,75,false,$.proxy(this.onLinesComplete,this))};com.infrared5.About.prototype.onLinesComplete=function(){if(this.subSection=="library"){new com.infrared5.Library()}else{new com.infrared5.Company()}};com.infrared5.About.prototype.onLibraryClick=function(){$.address.value("about/library")};com.infrared5.About.prototype.onCompanyClick=function(){$.address.value("about/company")};com.infrared5.Work=function(){$(".content").load("./content/client_work.html",$.proxy(this.onLoaded,this));this.imageButtons=[];this.clientData=[]};com.infrared5.Work.prototype.onLoaded=function(){$(".content").fadeIn(400);this.setWorkMetaData();$(".work_client_name").html("<strong>client:</strong> "+this.clientData[0].client);$(".work_project").html("<strong>project:</strong> "+this.clientData[0].project);$(".work_description").html(this.clientData[0].description);this.workSlideShow=new com.infrared5.SlideShow($(".work_slideshow"),this.clientData[0].slideshow);$(".work_slideshow").hide();for(var c=0;c<this.clientData.length;c++){var b=new com.infrared5.WorkClientButton($(".work_icons").get(0),this.clientData[c],c,$.proxy(this.onBtnClick,this));this.imageButtons.push(b)}this.imageButtons[0].img.animate({opacity:1});this.selectedItem=this.imageButtons[0];if(Modernizr.video){$(".work_video_container").html("<video id='work_video' width='704' height='396' controls='controls'><source class='work_video_mp4' id='work_video_mp4' src='./video/sick.mp4' type='video/mp4'/><source class='work_video_ogv' id='work_video_ogv' src='./video/sick.ogv'type='video/ogg; codecs='theora, vorbis''></video>")}else{$(".work_video_container").html("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='704' height='396'><param name='movie' value='./video/sick.swf' /><!--[if !IE]>--><object type='application/x-shockwave-flash' data='./video/sick.swf' width='704' height='396'><!--<![endif]--><p></p><!--[if !IE]>--></object><!--<![endif]--></object>")}if(Modernizr.canvas){var a=$(".work_lines").get(0);a.width=950;a.height=700;this.linesContext=a.getContext("2d");this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;this.drawLines()}else{$(".work_slideshow").fadeIn(400)}};com.infrared5.Work.prototype.onBtnClick=function(a){if(a==this.selectedItem){return}if(this.selectedItem){this.selectedItem.hideDetail()}this.selectedItem=a;this.selectedItem.showDetail();this.drawSelectedLine();this.setCurrentClient();$(".work_slideshow").html("");new com.infrared5.SlideShow($(".work_slideshow"),this.clientData[this.clientData[this.selectedItem.index].id].slideshow);this.handleVideo()};com.infrared5.Work.prototype.hide=function(a){$(".content").fadeOut(400,a)};com.infrared5.Work.prototype.handleVideo=function(){var d=document.getElementsByTagName("video")[0];if(Modernizr.video){if(document.getElementById("work_video")){d.pause();d.currentTime=0}}$(".work_video_container").hide();$(".work_video_container").html("");if(this.clientData[this.clientData[this.selectedItem.index].id].trailer[0]!=""){$(".video_link_container").fadeIn(400);$(".video_link_hide").hide();$(".video_link_play").fadeIn(400);var c=this.clientData[this.clientData[this.selectedItem.index].id].trailer[0];var b=this.clientData[this.clientData[this.selectedItem.index].id].trailer[1];var a=this.clientData[this.clientData[this.selectedItem.index].id].trailer[2];if(Modernizr.video){$(".work_video_container").html("<video id='work_video' width='704' height='396' controls='controls'><source class='work_video_mp4' id='work_video_mp4' src='"+c+"' type='video/mp4'/><source class='work_video_ogv' id='work_video_ogv' src='"+b+"' type='video/ogg; codecs='theora, vorbis''></video>")}else{$(".work_video_container").html("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='704' height='396'><param name='movie' value='"+a+"' /><!--[if !IE]>--><object type='application/x-shockwave-flash' data='"+a+"' width='704' height='396'><!--<![endif]--><p></p><!--[if !IE]>--></object><!--<![endif]--></object>")}}else{$(".video_link_container").hide();$(".work_video_container").hide()}};com.infrared5.Work.prototype.drawSelectedLine=function(){if(Modernizr.canvas){this.linesContext.clearRect(-220,420,700,700);this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;var a=this.clientData[this.selectedItem.index].lines;new com.infrared5.TimedLine(a.slice(0),this.linesContext,30,false)}};com.infrared5.Work.prototype.setCurrentClient=function(){$(".work_client_name").html("<strong>client:</strong> "+this.clientData[this.selectedItem.index].client);$(".work_project").html("<strong>project:</strong> "+this.clientData[this.selectedItem.index].project);$(".work_description").html(this.clientData[this.selectedItem.index].description)};com.infrared5.Work.prototype.drawLines=function(){if(Modernizr.canvas){var a=[];a.push({x:218,y:76});a.push({x:920,y:19});a.push({x:920,y:404});a.push({x:218,y:404});a.push({x:218,y:76});new com.infrared5.TimedLine(a,this.linesContext,75,false,$.proxy(this.onLinesComplete,this))}};com.infrared5.Work.prototype.onLinesComplete=function(){$(".work_slideshow").fadeIn(400);if(Modernizr.canvas){this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;var a=[];a.push({x:150,y:460});a.push({x:190,y:445});a.push({x:330,y:445});new com.infrared5.TimedLine(a,this.linesContext,75,false,$.proxy(this.onWorkLinesComplete,this))}};com.infrared5.Work.prototype.onWorkLinesComplete=function(){};com.infrared5.Work.prototype.setWorkMetaData=function(){this.clientData=[{id:0,client:"SICK",project:"SOSA",date:"11/27/11",src:"./images/work/logo_sick.png",pos:{x:20,y:20},lines:[{x:150,y:460},{x:190,y:445},{x:330,y:445}],slideshow:["./images/work/sick/sick_01.png","./images/work/sick/sick_02.png"],trailer:["./video/sick.mp4","./video/sick.ogv","./video/sick.swf"],description:"Starting in 2009, Infrared5 has worked with SICK, a top manufacturer of intelligent scanners and sensors, to design and develop the SICK Open Solution Architecture (SOSA). This technology allows for data visualizations of packages flowing down shipping conveyers at high speeds. After scanning, the real-time data is streamed to a monitoring hub which can also access other consoles, locally and remotely. Infrared5 designed the system around the acclaimed Red5 server, and built the desktop application using Adobe AIR. The apps display real-time data visually through charting, grids and live-motion graphical representations of the packages. The result is a faster, more accurate tracking of packages across locations and more efficient troubleshooting of issues as they arise."},{id:1,client:"Star Wars",project:"Trench Run",date:"2/11/11",src:"./images/work/logo_starwars.png",pos:{x:180,y:40},lines:[{x:255,y:470},{x:305,y:445},{x:330,y:445}],slideshow:["./images/work/trench/trenchrun_01.png","./images/work/trench/trenchrun_02.png","./images/work/trench/trenchrun_03.png","./images/work/trench/trenchrun_04.png","./images/work/trench/trenchrun_05.png"],trailer:["./video/trenchrun.mp4","./video/trenchrun.ogv","./video/trenchrun.swf"],description:"In 2010, Infrared5 teamed up with LucasFilm and THQ Wireless to recreate the final scenes of Star Wars Episode IV -- the original Star Wars film -- in a fast-paced, thrilling browser-based and iOS game. The resulting collaboration was celebrated by Star Wars fanatics the world over, covered on the majority of iPhone and gaming review websites, and generated enough buzz that Apple chose to feature it on a national press tour about iPhone apps. Trench Run was also the first official game to incorporate Brass Monkey controller technology. <br /> <br /><div align='right'><a href='http://starwars.com/play/online-games/trench-run/' target='_blank'>Try it now at http://starwars.com/play/online-games/trench-run/</a></div>"},{id:2,client:"SmartSports",project:"SmartKage",date:"2/11/11",src:"./images/work/logo_smartsports.png",pos:{x:28,y:60},lines:[{x:160,y:480},{x:185,y:445},{x:330,y:445}],slideshow:["./images/work/smartsports/smartsports_01.png","./images/work/smartsports/smartsports_02.png","./images/work/smartsports/smartsports_03.png","./images/work/smartsports/smartsports_04.png"],trailer:[""],description:"In 2011, Infrared5 was approached to help create the future of athletic assessment -- a smart batting cage equipped with sensors capable of picking up performance details, many of which cannot be seen by the naked eye. The company, SmartSports, has key partnerships with Sportvision and Rawlings, and we've helped them create the console from which coaches, scouts and trainers can monitor athletes' progress. The SmartKage tracks every important metric while processing data in real time. When a pitcher throws a ball we track where it goes and how fast it's going. From the data we're compiling and interpreting, better training decisions can be made."},{id:3,client:"Brass Monkey",project:"Brass Monkey",date:"2/11/11",src:"./images/work/logo_brassmonkey.png",pos:{x:135,y:22},lines:[{x:245,y:465},{x:285,y:465},{x:330,y:445}],slideshow:["./images/work/brassmonkey/brassmonkey_01.png","./images/work/brassmonkey/brassmonkey_02.png","./images/work/brassmonkey/brassmonkey_03.png","./images/work/brassmonkey/brassmonkey_04.png"],trailer:["./video/brassmonkey.mp4","./video/brassmonkey.ogv","./video/brassmonkey.swf"],description:"In 2010, Infrared5 created a bit of proprietary technology of our own, which has since spawned a whole new business. Brass Monkey is video game console that uses smart phones as controllers and any screen with a web browser as the main display. The company, which spun out of Infrared5, recently raised $750,000 in seed funding and announced partnerships with Verizon and Alcatel-Lucent at the 2012 Consumer Electronics Showcase (CES). Brass Monkey provides a free software development kit that lets developers create games with similar features to traditional consoles using familiar tools for creating Web based games: HTML5, Unity and/or Flash.<br /> <br /><div align='right'><a href='http://playbrassmonkey.com' target='_blank'>Try it now at http://playbrassmonkey.com</a></div>"}]};com.infrared5.ClientFeed=function(){this.setPhotoRotate()};com.infrared5.ClientFeed.prototype.setPhotoRotate=function(){(function(){var b=0;var a=[{src:"./images/clients_01.png"},{src:"./images/clients_02.png"},{src:"./images/clients_03.png"}];$(".home_client_feed").html("<img src='"+a[b].src+"'/>");rotateClientImages=function(){$(".home_client_feed").hide();$(".home_client_feed").html("<img src='"+a[b].src+"'/>");$(".home_client_feed").fadeIn(600);if(b==a.length-1){b=0}else{b++}};rotateClientImages();window.setInterval(rotateClientImages,10000)})(jQuery)};com.infrared5.Company=function(){this.contentArea=$(".about_content_area");this.contentArea.load("./content/company.html",$.proxy(this.onLoaded,this))};com.infrared5.Company.prototype.onLoaded=function(){$(".about_content_area").fadeIn(800)};com.infrared5.FadingSlideShow=function(b,a){this.fadingSlideShowDiv=b;this.fadingSlideShowImageList=a;this.fadingSlideShowInterval};com.infrared5.FadingSlideShow.prototype.onFadingSlideShowRequest=function(){var a=0;rotateFadingSlideShow=function(){$(this.fadingSlideShowDiv).hide();$(this.fadingSlideShowDiv).html("<img src='"+this.fadingSlideShowImageList[a].src+"'/>");$(this.fadingSlideShowDiv).fadeIn(600);if(a==this.fadingSlideShowImageList.length-1){a=0}else{a++}};rotateFadingSlideShow();this.fadingSlideShowInterval=window.setInterval(rotateFadingSlideShow,6000)};com.infrared5.Contact=function(){$(".content").load("./content/contact.html",$.proxy(this.onLoaded,this))};com.infrared5.Contact.prototype.onLoaded=function(){$(".content").fadeIn(400);$(".contact_content").hide();if(Modernizr.canvas){var a=$(".contact_lines").get(0);a.width=950;a.height=700;this.linesContext=a.getContext("2d");this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;this.drawLines()}else{$(".contact_content").fadeIn(400)}};com.infrared5.Contact.prototype.hide=function(a){$(".content").fadeOut(400,a)};com.infrared5.Contact.prototype.drawLines=function(){var a=[];a.push({x:45,y:700});a.push({x:45,y:473});a.push({x:218,y:388});a.push({x:218,y:162});a.push({x:325,y:108});a.push({x:556,y:217});a.push({x:556,y:562});a.push({x:218,y:388});new com.infrared5.TimedLine(a,this.linesContext,75,false,$.proxy(this.onLinesComplete,this))};com.infrared5.Contact.prototype.onLinesComplete=function(){$(".contact_content").fadeIn(400)};com.infrared5.Home=function(){$(".content").load("./content/home.html",$.proxy(this.onLoaded,this))};com.infrared5.Home.prototype.onLoaded=function(){$(".home_image_slideshow").hide();$(".home_content_area").hide();var a=["./images/home_01.png","./images/home_02.png","./images/home_03.png","./images/home_04.png"];new com.infrared5.NewsFeed();new com.infrared5.TwitterFeed();new com.infrared5.WorkFeed();new com.infrared5.SlideShow($(".home_image_slideshow"),a,"home");$(".content").fadeIn(400);if(Modernizr.canvas){var b=$(".home_lines").get(0);b.width=950;b.height=700;this.linesContext=b.getContext("2d");this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;this.drawLines()}else{$(".home_image_slideshow").fadeIn(400);$(".home_content_area").fadeIn(400)}window.setTimeout(this.checkTwitterTruncation,5000)};com.infrared5.Home.prototype.checkTwitterTruncation=function(){window.clearInterval(this.scrollTwitterInterval);var c=$(".home_twitter_feed").outerWidth();var b=600;var a=false;startTwitterScroll=function(){var d=c-b;if(a){$(".home_twitter_feed").animate({left:0},2000);a=false}else{$(".home_twitter_feed").animate({left:-d},4000);a=true}};if(c<=600){$(".home_twitter_feed").animate({width:b},2000)}else{startTwitterScroll();this.scrollTwitterInterval=window.setInterval(startTwitterScroll,15000)}};com.infrared5.Home.prototype.drawLines=function(){if(Modernizr.canvas){var a=[];a.push({x:218,y:76});a.push({x:920,y:19});a.push({x:920,y:404});a.push({x:218,y:404});a.push({x:218,y:76});new com.infrared5.TimedLine(a,this.linesContext,75,false,$.proxy(this.onLinesComplete,this))}};com.infrared5.Home.prototype.onLinesComplete=function(){$(".home_image_slideshow").fadeIn(400);$(".home_content_area").fadeIn(400)};com.infrared5.Home.prototype.hide=function(a){$(".content").fadeOut(400,a)};com.infrared5.ImageButton=function(c,d,a,b){this.parent=c;this.data=d;this.img=$("<image src='"+d.src+"'/>");this.parent.appendChild(this.img.get(0));this.faded=this.data.faded||0.5;this.pos=d.pos;this.index=a;this.handler=b;this.img.load($.proxy(this.onImageLoaded,this));this.img.hide()};com.infrared5.ImageButton.prototype.makeLabel=function(){if(this.data.label){this.label=$("<div class='whoswho_label'>"+this.data.label+"</div>");this.label.css("position","absolute").css("width",this.smallWidth).css("left",this.pos.x-this.smallWidth/2).css("top",this.pos.y+this.smallHeight/2).css("opacity",this.faded);this.parent.appendChild(this.label.get(0))}};com.infrared5.ImageButton.prototype.onImageLoaded=function(){var a=this.img.width();var b=this.img.height();this.ratio=a/b;this.width=this.data.large;this.height=this.width/this.ratio;this.smallWidth=this.data.small;this.smallHeight=this.smallWidth/this.ratio;this.img.css("position","absolute").css("left",this.pos.x-this.smallWidth/2).css("top",this.pos.y-this.smallHeight/2).css("width",this.smallWidth).css("height",this.smallHeight).css("cursor","pointer").css("opacity",this.faded).click($.proxy(this.onClick,this));this.img.show();this.makeLabel()};com.infrared5.ImageButton.prototype.onClick=function(a){this.handler(this);this.grow()};com.infrared5.ImageButton.prototype.grow=function(){this.img.animate({width:this.width*0.85,height:this.height*0.85,left:this.pos.x-this.width/2,top:this.pos.y-this.height/2,opacity:1});if(this.label){this.label.animate({width:this.width*0.85,left:this.pos.x-this.width/2,top:this.pos.y+(this.height/2)*0.75,opacity:1})}$(this.label).css("color","red");$(this.img).css("box-shadow","1px 2px 5px #888888");$(this.img).css("-moz-box-shadow","1px 2px 5px #888");$(this.img).css("-webkit-box-shadow","1px 2px 5px #888")};com.infrared5.ImageButton.prototype.shrink=function(){this.img.animate({width:this.smallWidth,height:this.smallHeight,left:this.pos.x-this.smallWidth/2,top:this.pos.y-this.smallHeight/2,opacity:0.5});if(this.label){this.label.animate({width:this.smallWidth,left:this.pos.x-this.smallWidth/2,top:this.pos.y+this.smallHeight/2,opacity:0.5})}$(this.label).css("color","black");$(this.img).css("box-shadow","0px 0px 0px #888888");$(this.img).css("-moz-box-shadow","0px 0px 0px #888");$(this.img).css("-webkit-box-shadow","0px 0px 0px #888")};com.infrared5.Library=function(){$(".about_menu li:eq(0)").css("color","black");$(".about_menu li:eq(1)").css("color","red");if(Modernizr.canvas){var a=$(".about_lines").get(0);this.faded=0.6;this.linesContext=a.getContext("2d");this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75}this.makeImageData();this.imageButtons=[];this.contentArea=$(".about_content_area");this.contentArea.load("./content/library.html",$.proxy(this.onLoaded,this))};com.infrared5.Library.prototype.makeImageData=function(){this.imageData=[{src:"./images/library/book_01.png",pos:{x:560,y:-10},small:60,large:100,faded:1,mainImage:"./images/library/book_shape_01.png",lines:[{x:530,y:-10},{x:480,y:15},{x:480,y:85}]},{src:"./images/library/book_02.png",pos:{x:350,y:20},small:60,large:100,faded:this.faded,mainImage:"./images/library/book_shape_02.png",lines:[{x:320,y:20},{x:270,y:45},{x:270,y:76}]},{src:"./images/library/book_03.png",pos:{x:30,y:410},small:60,large:100,faded:this.faded,mainImage:"./images/library/book_shape_03.png",lines:[{x:60,y:410},{x:110,y:385},{x:110,y:335}]},{src:"./images/library/book_04.png",pos:{x:160,y:510},small:60,large:100,faded:this.faded,mainImage:"./images/library/book_shape_04.png",lines:[{x:190,y:510},{x:240,y:485},{x:240,y:402}]},{src:"./images/library/book_05.png",pos:{x:200,y:-50},small:60,large:100,faded:this.faded,mainImage:"./images/library/book_shape_05.png",lines:[{x:170,y:-50},{x:120,y:-25},{x:120,y:5}]},{src:"./images/library/book_06.png",pos:{x:380,y:540},small:60,large:100,faded:this.faded,mainImage:"./images/library/book_shape_06.png",lines:[{x:350,y:540},{x:300,y:515},{x:300,y:434}]}]};com.infrared5.Library.prototype.onLoaded=function(){this.textDiv=$(".about_text div");this.libraryImage=$(".library_image");this.contentArea.fadeIn(800);this.textDiv.hide();$(".book_text_06").show();for(var b=0;b<this.imageData.length;b++){var a=new com.infrared5.ImageButton($(".library_thumbs").get(0),this.imageData[b],b,$.proxy(this.onBtnClick,this));this.imageButtons.push(a)}this.lineIndex=0;this.drawBookLine()};com.infrared5.Library.prototype.onBtnClick=function(a){if(a==this.selectedItem){return}if(this.selectedItem){this.selectedItem.shrink()}this.selectedItem=a;this.libraryImage.fadeOut(400,$.proxy(this.onFadeOut,this));this.textDiv.fadeOut(200)};com.infrared5.Library.prototype.onFadeOut=function(){this.libraryImage.attr("src",this.imageData[this.selectedItem.index].mainImage).clearQueue().fadeIn(800);$(".about_text div:eq("+this.selectedItem.index+")").delay(400).fadeIn(800)};com.infrared5.Library.prototype.drawBookLine=function(){if(Modernizr.canvas){this.linesContext.save();this.linesContext.translate(220,110);var a=this.imageData[this.lineIndex].lines;new com.infrared5.TimedLine(a,this.linesContext,10,false,$.proxy(this.onLineDone,this))}};com.infrared5.Library.prototype.onLineDone=function(){this.linesContext.restore();this.lineIndex++;if(this.lineIndex<this.imageData.length){this.drawBookLine()}};com.infrared5.NewsFeed=function(){$(".home_news_feed").load("./content/newsfeed.txt")};com.infrared5.Services=function(a){$(".content").load("./content/services.html",$.proxy(this.onLoaded,this))};com.infrared5.Services.prototype.onLoaded=function(){$(".content").fadeIn(400);$(".services_content").hide();this.setTestimonial();if(Modernizr.canvas){var a=$(".services_lines").get(0);a.width=950;a.height=700;this.linesContext=a.getContext("2d");this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;this.drawLines()}else{$(".services_content").fadeIn(400)}};com.infrared5.Services.prototype.hide=function(a){$(".content").fadeOut(400,a)};com.infrared5.Services.prototype.drawLines=function(){var a=[];a.push({x:218,y:76});a.push({x:920,y:19});a.push({x:920,y:404});a.push({x:218,y:404});a.push({x:218,y:76});new com.infrared5.TimedLine(a,this.linesContext,75,false,$.proxy(this.onLinesComplete,this))};com.infrared5.Services.prototype.onLinesComplete=function(){$(".services_content").fadeIn(400)};com.infrared5.Services.prototype.setTestimonial=function(){$(".prev_arrow").prepend('<img id="prevArrow" src="./images/btn_Arrow_sm_lt.png" />');$(".next_arrow").prepend('<img id="nextArrow" src="./images/btn_Arrow_sm_rt.png" />');$("#nextArrow").click(function(){if(b==a.length-1){b=0}else{b++}rotateSlideshow()});$("#prevArrow").click(function(){if(b==0){b=a.length-1}else{b=b-1}rotateSlideshow()});var b=0;var a=[{quote:"Infrared5 showed a deep understanding of the general application, the architectural requirements and how to apply good design. The project resulted in a very solid platform product...users are very pleased with how natural and yet powerful the application is to use...a winning combination!",signature:"John Dwinell, VP of Emerging Technologies, SICK"},{quote:"We were impressed with the iOS developers at Infrared5 and their skills, and found the team to be great to work with throughout our project.",signature:"Ashley Streb, VP Technology, Brightcove"},{quote:"Beyond their extraordinary aesthetic, the group's deep level of technical expertise ensures both thoughtful and thorough solutions. SmartKage presents substantial project complexity IR5's principals manage the unexpected with grace, solve with innovation, and remain dedicated colleagues. Rebecca Smith Allen and Dominick Accattato have built--and lead--a true, best in class organization...",signature:"Corrine Vitolo, CEO, SmartSports"},{quote:"Infrared 5 has been a great partner of ours over the past 2 years. ...we're able to count on their professionalism along with the fact that they'll deliver on-time and on-budget. When we have a technical challenge we need help with, or can't figure out with our own resources, they are the first partner we call.",signature:"Matt Snyder, CEO, MediaMob"}];rotateSlideshow=function(){$(".services_testimonials_quote").hide();$(".services_testimonials_sig").hide();$(".services_testimonials_quote").html(a[b].quote);$(".services_testimonials_sig").html("- "+a[b].signature);$(".services_testimonials_quote").fadeIn(600);$(".services_testimonials_sig").fadeIn(600)};rotateSlideshow()};com.infrared5.SlideShow=function(b,a){this.slideShowDiv=b;this.imageList=a;this.createSlideShow()};com.infrared5.SlideShow.prototype.createSlideShow=function(){var c=$("<div class='slideshow'/>");$(this.slideShowDiv).append(c);var b=$(".slideshow img");var d=-1;var a=this.imageList.length;c.remove("img");for(var e=0;e<a;e++){var f=$("<image class='home_slideshow_image' src='"+this.imageList[e]+"'/>");c.append(f)}c.css("width",a*699);rotateSlideshow=function(){c.animate({opacity:0},600);if(d<a-1){d++}else{if(d==a-1){d=0}}d=Math.min(d,a-1);$(b[d-1]).fadeTo(200,0.01);$(b[d]).fadeTo(200,1);c.animate({"margin-left":-d*699},1);c.animate({opacity:1},400)};rotateSlideshow();window.setInterval(rotateSlideshow,6000)};com.infrared5.TwitterFeed=function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="http://twitter.com/statuses/user_timeline.json?screen_name=infrared5&count=5&callback=onTwitter";$("head").append(a)};function onTwitter(a){$(".home_twitter_feed").html(a[0].text)}com.infrared5.TimedLine=function(h,b,e,f,i){var a={x:h[0].x,y:h[0].y};var g=1;var d=30;var c=setInterval(function(){b.beginPath();b.moveTo(a.x+0.5,a.y+0.5);var k=h[g].x-a.x;var j=h[g].y-a.y;var l=Math.sqrt(k*k+j*j);if(f){if(l>1){a.x+=k*0.35;a.y+=j*0.35}else{a={x:h[g].x,y:h[g].y};g++}}else{if(l>e){a.x+=k/l*e;a.y+=j/l*e}else{a={x:h[g].x,y:h[g].y};g++}}b.lineTo(a.x+0.5,a.y+0.5);b.stroke();if(g>=h.length){clearInterval(c);if(i){i()}}},1000/d)};com.infrared5.InstantLine=function(c,b){b.beginPath();b.moveTo(c[0].x+0.5,c[0].y+0.5);for(var a=1;a<c.length;a++){b.lineTo(c[a].x+0.5,c[a].y+0.5)}b.stroke()};com.infrared5.WhosWho=function(){this.makeImageData();this.imageButtons=[];$(".content").load("./content/whoswho.html",$.proxy(this.onLoaded,this))};com.infrared5.WhosWho.prototype.onLoaded=function(){$(".whoswho_text div").hide();$(".who_text").show();if(Modernizr.canvas){var a=$(".whoswho_lines").get(0);a.width=950;a.height=700;this.linesContext=a.getContext("2d");this.linesContext.translate(220,110);this.drawLines()}for(var c=0;c<this.imageData.length;c++){var b=new com.infrared5.ImageButton($(".whoswho_thumbs").get(0),this.imageData[c],c,$.proxy(this.onBtnClick,this));this.imageButtons.push(b)}this.showContent()};com.infrared5.WhosWho.prototype.showContent=function(){$(".content").fadeIn(400)};com.infrared5.WhosWho.prototype.hide=function(a){$(".content").fadeOut(400,a)};com.infrared5.WhosWho.prototype.onBtnClick=function(a){if(a==this.selectedItem){return}if(this.selectedItem){this.selectedItem.shrink()}this.selectedItem=a;if(Modernizr.canvas){this.drawSelectedLine()}$(".whoswho_text div").fadeOut(400);$("."+this.selectedItem.data.label+"_text").delay(400).fadeIn(400)};com.infrared5.WhosWho.prototype.drawSelectedLine=function(){this.drawLines();if(Modernizr.canvas){this.linesContext.strokeStyle="#ff0000";this.linesContext.lineWidth=0.75;var a=this.imageData[this.selectedItem.index].lines;new com.infrared5.TimedLine(a.slice(0),this.linesContext,30,false)}};com.infrared5.WhosWho.prototype.drawLines=function(){if(Modernizr.canvas){this.linesContext.clearRect(-220,-110,950,700);this.linesContext.strokeStyle="#cccccc";this.linesContext.lineWidth=0.75;for(var a=0;a<this.imageData.length;a++){new com.infrared5.InstantLine(this.imageData[a].lines,this.linesContext)}}};com.infrared5.WhosWho.prototype.makeImageData=function(){var b=50;var a=80;this.imageData=[{src:"./images/who/anthony.png",label:"anthony",pos:{x:700,y:20},small:b,large:a,lines:[{x:675,y:20},{x:635,y:40},{x:635,y:130}]},{src:"./images/who/kelly.png",label:"kelly",pos:{x:620,y:-45},small:b,large:a,lines:[{x:595,y:-45},{x:565,y:-30},{x:565,y:130}]},{src:"./images/who/doggy.png",label:"francine",pos:{x:500,y:-40},small:b,large:a,lines:[{x:525,y:-40},{x:545,y:-30},{x:545,y:130}]},{src:"./images/who/kasey.png",label:"kasey",pos:{x:450,y:40},small:b,large:a,lines:[{x:425,y:40},{x:385,y:60},{x:385,y:130}]},{src:"./images/who/todd.png",label:"todd",pos:{x:370,y:-30},small:b,large:a,lines:[{x:345,y:-30},{x:305,y:-15},{x:305,y:130}]},{src:"./images/who/mike.png",label:"mike",pos:{x:220,y:-20},small:b,large:a,lines:[{x:245,y:-20},{x:285,y:0},{x:285,y:130}]},{src:"./images/who/kyle.png",label:"kyle",pos:{x:20,y:-50},small:b,large:a,lines:[{x:45,y:-50},{x:135,y:-5},{x:135,y:15},{x:255,y:75},{x:255,y:130}]},{src:"./images/who/rebecca.png",label:"rebecca",pos:{x:100,y:80},small:b,large:a,lines:[{x:125,y:80},{x:170,y:80},{x:240,y:115},{x:240,y:130}]},{src:"./images/who/chris.png",label:"chris",pos:{x:100,y:210},small:b,large:a,lines:[{x:125,y:210},{x:225,y:210}]},{src:"./images/who/dominick.png",label:"dominick",pos:{x:100,y:340},small:b,large:a,lines:[{x:125,y:340},{x:170,y:340},{x:250,y:300}]},{src:"./images/who/trevor.png",label:"trevor",pos:{x:20,y:470},small:b,large:a,lines:[{x:45,y:470},{x:75,y:455},{x:75,y:425},{x:265,y:330},{x:265,y:310}]},{src:"./images/who/keith.png",label:"keith",pos:{x:180,y:420},small:b,large:a,lines:[{x:205,y:420},{x:250,y:390},{x:250,y:300}]},{src:"./images/who/john.png",label:"john",pos:{x:290,y:450},small:b,large:a,lines:[{x:315,y:450},{x:345,y:430},{x:345,y:280}]},{src:"./images/who/elliott.png",label:"elliott",pos:{x:400,y:400},small:b,large:a,lines:[{x:425,y:400},{x:450,y:380},{x:450,y:230}]},{src:"./images/who/kennison.png",label:"kenneson",pos:{x:510,y:470},small:b,large:a,lines:[{x:490,y:470},{x:460,y:450},{x:460,y:280}]},{src:"./images/who/paul.png",label:"paul",pos:{x:550,y:380},small:b,large:a,lines:[{x:525,y:380},{x:485,y:360},{x:485,y:260}]},{src:"./images/who/aniyah.png",label:"aniyah",pos:{x:660,y:470},small:b,large:a,lines:[{x:635,y:470},{x:595,y:450},{x:595,y:280}]},{src:"./images/who/andy.png",label:"andy",pos:{x:700,y:370},small:b,large:a,lines:[{x:675,y:370},{x:635,y:350},{x:635,y:280}]}]};com.infrared5.WorkFeed=function(){var a=$(".home_work_feed img").length;$(".home_work_feed").css("width",a*204);$(".home_work_feed img").click(function(){var b=$(".work_feed img").index(this);$.address.value("work/"+b)})};com.infrared5.WorkClientButton=function(c,d,a,b){this.parent=c;this.data=d;this.img=$("<image src='"+d.src+"'/>");this.parent.appendChild(this.img.get(0));this.faded=this.data.faded||0.5;this.pos=d.pos;this.index=a;this.handler=b;this.img.load($.proxy(this.onImageLoaded,this));this.img.hide()};com.infrared5.WorkClientButton.prototype.onImageLoaded=function(){this.width=this.img.width();this.height=this.img.height();this.img.css("position","absolute").css("left",this.pos.x).css("top",this.pos.y).css("width",this.width).css("height",this.height).css("cursor","pointer").css("opacity",this.faded).click($.proxy(this.onClick,this));this.img.show()};com.infrared5.WorkClientButton.prototype.onClick=function(a){this.handler(this)};com.infrared5.WorkClientButton.prototype.showDetail=function(){this.img.animate({opacity:1})};com.infrared5.WorkClientButton.prototype.hideDetail=function(){this.img.animate({opacity:0.5})};
