
(function($,Edge,compId){var Composition=Edge.Composition,Symbol=Edge.Symbol;
//Edge symbol: 'stage'
(function(symbolName){Symbol.bindElementAction(compId,symbolName,"document","compositionReady",function(sym,e){var headline;var headlinetxt=sym.$("headlineTxt");var stage;var date;var sources;var pictures;var atlantic;var pacific;var restday;var bolivia;var paraguay;var brazil;var chile;var argentina;var peru;var lima;var pisco;var nazca;var arequipa;var arica;var calama;var salta;var tucuman;var cordoba;var rioja;var fiambala;var copiapo;var serena;var santiago;var km;var bike;var quad;var car;var truck;var winners;var scalekm;var scalemile;$.ajax({type:"GET",url:"GN29967.xml",dataType:"xml",success:function(xml){headline=$(xml).find('headline').text();sym.$("headlineTxt").html(headline);stage=$(xml).find('stage0').text();sym.$("stageTxt").html(stage);date=$(xml).find('date0').text();sym.$("dateTxt").html(date);km=$(xml).find('km0').text();sym.$("kmTxt").html(km);bike=$(xml).find('bike0').text();sym.$("bikeTxt").html(bike);quad=$(xml).find('quad0').text();sym.$("quadTxt").html(quad);car=$(xml).find('car0').text();sym.$("carTxt").html(car);truck=$(xml).find('truck0').text();sym.$("truckTxt").html(truck);sources=$(xml).find('sources').text();sym.$("sourcesTxt").html(sources);pictures=$(xml).find('pictures').text();sym.$("picturesTxt").html(pictures);atlantic=$(xml).find('atlantic').text();sym.$("atlanticTxt").html(atlantic);pacific=$(xml).find('pacific').text();sym.$("pacificTxt").html(pacific);restday=$(xml).find('restday').text();sym.$("restdayTxt").html(restday);paraguay=$(xml).find('paraguay').text();sym.$("paraguayTxt").html(paraguay);bolivia=$(xml).find('bolivia').text();sym.$("boliviaTxt").html(bolivia);brazil=$(xml).find('brazil').text();sym.$("brazilTxt").html(brazil);chile=$(xml).find('chile').text();sym.$("chileTxt").html(chile);argentina=$(xml).find('argentina').text();sym.$("argentinaTxt").html(argentina);peru=$(xml).find('peru').text();sym.$("peruTxt").html(peru);lima=$(xml).find('lima').text();sym.$("limaTxt").html(lima);pisco=$(xml).find('pisco').text();sym.$("piscoTxt").html(pisco);nazca=$(xml).find('nazca').text();sym.$("nazcaTxt").html(nazca);arequipa=$(xml).find('arequipa').text();sym.$("arequipaTxt").html(arequipa);arica=$(xml).find('arica').text();sym.$("aricaTxt").html(arica);calama=$(xml).find('calama').text();sym.$("calamaTxt").html(calama);salta=$(xml).find('salta').text();sym.$("saltaTxt").html(salta);tucuman=$(xml).find('tucuman').text();sym.$("tucumanTxt").html(tucuman);cordoba=$(xml).find('cordoba').text();sym.$("cordobaTxt").html(cordoba);rioja=$(xml).find('rioja').text();sym.$("riojaTxt").html(rioja);fiambala=$(xml).find('fiambala').text();sym.$("fiambalaTxt").html(fiambala);copiapo=$(xml).find('copiapo').text();sym.$("copiapoTxt").html(copiapo);serena=$(xml).find('serena').text();sym.$("serenaTxt").html(serena);santiago=$(xml).find('santiago').text();sym.$("santiagoTxt").html(santiago);winners=$(xml).find('winners').text();sym.$("winnersTxt").html(winners);scalekm=$(xml).find('scalekm').text();sym.$("scalekmTxt").html(scalekm);scalemile=$(xml).find('scalemile').text();sym.$("scalemileTxt").html(scalemile);}});sym.setVariable("number",1);       for(var i=0;i<15;i++){       sym.$("stageBtn"+i).bind('click',btnClick);       }
function resetStages(){           for(n=0;n<15;n++){       if(n>0){       sym.$("stageBtn"+n).css({"border-width":"2px","border-style":"solid","border-color":"rgba(100,100,100,0)"}); 
       }
               }}
resetStages();function btnClick(e){           resetStages();           sym.$("mapBox").show();           var selected_id=$(this).attr("id");         $.ajax({   
           type:"GET",           url:"GN29967.xml",           dataType:"xml",           success:function(xml){           for(n=0;n<15;n++){                   if(selected_id=="Stage_stageBtn"+n){               stage=$(xml).find('stage'+n).text();               sym.$("stageTxt").html(stage);               date=$(xml).find('date'+n).text();               sym.$("dateTxt").html(date);               km=$(xml).find('km'+n).text();               sym.$("kmTxt").html(km);              bike=$(xml).find('bike'+n).text();               sym.$("bikeTxt").html(bike);              quad=$(xml).find('quad'+n).text();               sym.$("quadTxt").html(quad);             car=$(xml).find('car'+n).text();               sym.$("carTxt").html(car);             truck=$(xml).find('truck'+n).text();               sym.$("truckTxt").html(truck);       if(n>0){               sym.$("stageBtn"+n).css({"border-width":"2px","border-style":"solid","border-color":"rgba(100,100,100,1.0)"}); 
       }else{               }
               }
           }
             }
           });       
   }});
//Edge binding end
})("stage");
//Edge symbol end:'stage'

//=========================================================

//Edge symbol: 'tab'
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",0,function(sym,e){sym.stop();});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",1000,function(sym,e){sym.stop();});
//Edge binding end
})("tab");
//Edge symbol end:'tab'

//=========================================================

//Edge symbol: 'slider'
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",1000,function(sym,e){sym.stop();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_forward_butt}","click",function(sym,e){sym.play("p1");});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_forward_butt}","touchstart",function(sym,e){sym.play("p1");});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_back_butt}","click",function(sym,e){sym.playReverse();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_back_butt}","touchstart",function(sym,e){sym.playReverse();});
//Edge binding end
})("slider");
//Edge symbol end:'slider'

//=========================================================

//Edge symbol: 'panel02'
(function(symbolName){})("panel02");
//Edge symbol end:'panel02'

//=========================================================

//Edge symbol: 'panel01'
(function(symbolName){})("panel01");
//Edge symbol end:'panel01'

//=========================================================

//Edge symbol: 'backBtn'
(function(symbolName){})("back_butt");
//Edge symbol end:'back_butt'

//=========================================================

//Edge symbol: 'forwardBtn'
(function(symbolName){})("forward_butt");
//Edge symbol end:'forward_butt'

//=========================================================

//Edge symbol: 'videopane'
(function(symbolName){})("videopane");
//Edge symbol end:'videopane'

//=========================================================
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",4000,function(sym,e){sym.play("glow");});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_vid_icon}","click",function(sym,e){sym.play("start");});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_vid_back}","click",function(sym,e){sym.play("back");});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",6000,function(sym,e){sym.stop("off");});
//Edge binding end
})("video_sym");
//Edge symbol end:'video_sym'

//=========================================================

//Edge symbol: 'button_strip'
(function(symbolName){Symbol.bindElementAction(compId,symbolName,"${_btn0}","click",function(sym,e){sym.setVariable("number",1);var id=sym.getVariable("number");var mainPic=sym.$("main_pic");var athlete;var nation;var born;var caption;var order;var img_arr=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];for(var i=0;i<20;i++){if(img_arr[i]==id){mainPic.attr("src","images/pic_"+id+".jpg");sym.$(this.lookupSelector("pic_"+img_arr[i]+"_lite")).show();}else{sym.$(this.lookupSelector("pic_"+img_arr[i]+"_lite")).hide();}}
$.ajax({   
   type:"GET",   url:"GN29566.xml",   dataType:"xml",   success:function(xml){   
       athlete=$(xml).find('athlete'+id).text();       sym.$("athleteTxt").html(athlete);       nation=$(xml).find('nation'+id).text();       sym.$("nationTxt").html(nation);       born=$(xml).find('born'+id).text();       sym.$("bornTxt").html(born);       caption=$(xml).find('caption'+id).text();       sym.$("captionTxt").html(caption);       order=$(xml).find('order'+id).text();       sym.$("orderTxt").html(order);               }
   });});
//Edge binding end
})("button_strip");
//Edge symbol end:'button_strip'
})(jQuery,AdobeEdge,"GraphicNews29967");