
function PeopleHolder(growthFactor){var _that=this;this.people=jQuery("div.person");this.peopleLiner=jQuery("#PeopleLiner");this.personLiner=jQuery("div.personLiner");this.growth=growthFactor;this.linerWidth=0;this.linerHeight=0;this.singleWidth=0;this.singleHeight=210;this.containerWidth=parseInt(jQuery(window).width(),10);var count=0;this.people.each(function(){_that.linerWidth+=parseInt(jQuery(this).width(),10);count++;});this.singleWidth=this.linerWidth/count;this.additionalSpace=(this.singleWidth*this.growth)-this.singleWidth;this.personLinerWidth=this.singleWidth/this.growth;this.personLinerHeight=this.singleHeight/this.growth;this.personLiner.each(function(){jQuery(this).show();jQuery(this).css("width",_that.personLinerWidth+"px");jQuery(this).css("height",_that.personLinerHeight+"px");});this.linerWidth=(this.linerWidth+(this.additionalSpace));this.margin=((this.containerWidth-this.linerWidth)/2);this.peopleLiner.css("margin-left",this.margin+"px");this.peopleLiner.bind("mouseleave",function(){_that.peopleLiner.animate({marginLeft:_that.margin+"px"},200);});this.addEventHandlers();}
PeopleHolder.method('addEventHandlers',function(){var _this=this;this.people.each(function(){var person=jQuery(this);var width=parseInt(person.css("width"),10);var widthLarge=parseInt(width,10)*_this.growth;person.hover(function(){_this.peopleLiner.animate({marginLeft:_this.margin-(_this.additionalSpace/2)+"px"},200);person.animate({marginRight:(_this.additionalSpace)+"px"},{duration:200,queue:false});person.children("div.personLiner").animate({width:_this.singleWidth,height:_this.singleHeight},{duration:200,queue:false,complete:function(){person.children("div.hoverLiner").fadeIn(50);}});},function(){person.animate({marginRight:"0px"},{duration:250,queue:false});person.children("div.personLiner").animate({width:_this.personLinerWidth,height:_this.personLinerHeight},{duration:200,queue:false,complete:function(){person.children("div.hoverLiner").hide();}});person.children("div.hoverLiner").hide();});});});