loadCounter=new function(){var b=2;var c=0;var d;this.doOnComplete=function(){if(loadCounter.onComplete){loadCounter.onComplete()}};this.advance=function(a){c++;if(c>=b){c=0;loadCounter.doOnComplete()}}};indexAnim=new function(){var g;var h;this.startItUp=function(){var a=$('a img');showUp.hidEm(a);var b=function(){window.setTimeout('showUp.kickMe()',500)};$('#iAmCentered').animate({opacity:1},300,'swing',b)};this.onDomReady=function(){$('#iAmCentered img').imgpreload(function(){loadCounter.advance('imgpreload')});if(window.is_mobile){return}$('#iAmCentered').css('opacity','0');loadCounter.advance('onDomready');if(indexAnimDebug){indexAnim.showHitAreas()}$('.hoverImg').hover(function(){var a=$(this).attr('class').substring(9);if(h){indexAnim.clearAnim(h)}var b=indexAnim.cssCamel(a);var c=$('a.'+a).attr('href');indexAnim.hitArea=new Object();indexAnim.hitArea=hitAreas[b];var d=function(e){indexAnim.hitTest(e.pageX,e.pageY,a)};$(document).bind('mousemove',d);var f=function(e){location.href=c};$(document).bind('click',f);$('#stage').css('cursor','pointer')})};this.showHitAreas=function(){for(var i in hitAreas){var a=hitAreas[i];var b='<div id="showHitAreas'+i+'" style="position: absolute; background:purple; opacity: 0.2"></div>';$('#stage').append(b);var c=$('#stage').css('margin-left');c=c.split('px');c=c[0]*-1;$('#showHitAreas'+i).css('margin-left',a.left+c);$('#showHitAreas'+i).css('top',a.top);$('#showHitAreas'+i).css('width',a.right-a.left);$('#showHitAreas'+i).css('height',a.bottom-a.top)}};this.cssCamel=function(a){var b=a.split('-');var c=b[0];for(var i=1;i<b.length;i++){c+=b[i].substring(0,1).toUpperCase()+b[i].substring(1)}return c};this.hitTest=function(a,b,c){h=c;var d=$('#stage').position();var e=a>indexAnim.hitArea.left+d.left;var f=indexAnim.hitArea.right+d.left;if(e){e=a<f}if(e){e=b>indexAnim.hitArea.top}if(e){e=b<indexAnim.hitArea.bottom}if(e){$('a.'+c+' img').css('visibility','visible');$('a.'+c+' img').css('opacity','1')}else{indexAnim.clearAnim(c)}};this.clearAnim=function(a){$('a.'+a+' img').css('visibility','hidden');$('a.'+a+' img').css('opacity','0');$(document).unbind('mousemove');$(document).unbind('click');$('#stage').css('cursor','auto')};this.clearTrace=function(){$('#status').html('clearTrace')};var j=0;this.trace=function(a){if(indexAnim.traceCounter++>100){indexAnim.clearTrace()}$('#status').html(a+'<br />'+$('#status').html())}};loadCounter.onComplete=indexAnim.startItUp;$(document).bind('ready',indexAnim.onDomReady);
