/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 8th 2010 8:57:16 PM PST                             */
/*      Machine:  10.16.140.106                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/insights/UIInsightsGeoList.js h:8nrn6a3p                  */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/insights/UIInsightsGeoList.js                             */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/insights\/UIInsightsGeoList.js"]); }

function UIInsightsGeoList(_L0,_L1){this.showLink=_L0.find('a.UIInsightsGeoList_Show');this.hideLink=_L0.find('a.UIInsightsGeoList_Hide');this.list_elements=[];switch(_L1){case '1':this.list_elements.push(_L0.find('div.UIInsightsGeoList_SingleList'));break;case '2':this.list_elements.push(_L0.find('div.UIInsightsGeoList_DoubleListFirst'));this.list_elements.push(_L0.find('div.UIInsightsGeoList_DoubleListLast'));break;case '3':this.list_elements.push(_L0.find('div.UIInsightsGeoList_TripleListFirst'));this.list_elements.push(_L0.find('div.UIInsightsGeoList_TripleList'));this.list_elements.push(_L0.find('div.UIInsightsGeoList_TripleListLast'));break;}this.showLink.listen('click',this.expand.bind(this));this.hideLink.listen('click',this.expand.bind(this));this.bottomShown=this.showLink.hasClass('hidden_elem');this.clickable=true;return this;}UIInsightsGeoList.prototype.expand=function(){for(var i=0;i<this.list_elements.length;i++){var _L1=this.list_elements[i].find('div.UIInsightsGeoList_ListBody');if(!this.bottomShown&&this.clickable){this.showContainer(_L1);}else if(this.clickable)this.hideContainer(_L1);}this.bottomShown=!this.bottomShown;this.clickable=false;};UIInsightsGeoList.prototype.showContainer=function(_L0){_L0.removeClass('hidden_elem');_L0.setStyle('height','auto');animation(_L0).from('opacity',0).to('opacity',1).ease(animation.ease.both).duration(200).ondone(function(){this.toggleControls();}.bind(this)).go();return false;};UIInsightsGeoList.prototype.hideContainer=function(_L0){_L0.setStyle('height','auto');animation(_L0).to('height','0px').from('opacity',1).to('opacity',0).ease(animation.ease.both).duration(200).ondone(function(){_L0.addClass('hidden_elem');this.toggleControls();}.bind(this)).go();return false;};UIInsightsGeoList.prototype.toggleControls=function(){if(this.bottomShown){this.showLink.addClass('hidden_elem');this.hideLink.removeClass('hidden_elem');}else{this.hideLink.addClass('hidden_elem');this.showLink.removeClass('hidden_elem');}this.clickable=true;};

if (window.Bootloader) { Bootloader.done(["js\/insights\/UIInsightsGeoList.js"]); }