/***********************
* Adobe Edge Composition Actions
*
* Edit this file with caution, being careful to preserve 
* function signatures and comments starting with 'Edge' to maintain the 
* ability to interact with these actions from within Adobe Edge
*
***********************/
(function($, Edge, compId){
var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

   //Edge symbol: 'stage'
   (function(symbolName) {
      Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {
         // insert code for compositionReady event here
         //apply css style to an array of objects (this example changes leading for text objects)

//Edge binding end
        
         var menu_arr = ["txt4","txt5"];
         $.each(menu_arr, function(index, value) {
         sym.$(value).css('line-height', '160%');
         });
         
sym.getSymbol("menuBtn1").$("menuBtnOverClick").show();
sym.getSymbol("menuBtn2").$("menuBtnOverClick").hide();
sym.getSymbol("menuBtn1").$("menuBtnOver").hide();
sym.getSymbol("menuBtn2").$("menuBtnOver").hide();
sym.$("btnImg1").css("pointer-events","none");
sym.$("btnImg2").css("pointer-events","none");
sym.$("txt20").hide();


         
         var headline;
         var headlinetxt = sym.getSymbol("styleMc").$("headlineTxt").css({"pointer-events":"none","font-weight":"900"});
         var stand;
         var standtxt = sym.getSymbol("styleMc").$("standTxt").css("pointer-events","none");
         var source;
         var sourcetxt = sym.getSymbol("styleMc").$("sourceTxt").css("pointer-events","none");
         var txt1;
         var txt1txt = sym.$("txt1").css("pointer-events","none");
         var txt2;
         var txt2txt = sym.$("txt2").css("pointer-events","none");
         var txt3;
         var txt3txt = sym.$("txt3").css("pointer-events","none");
         var txt4;
         var txt4txt = sym.$("txt4").css("pointer-events","none");
         var txt5;
         var txt5txt = sym.$("txt5").css("pointer-events","none");
         var txt6;
         var txt6txt = sym.$("txt6").css("pointer-events","none");
         var txt7;
         var txt7txt = sym.$("txt7").css("pointer-events","none");
         var txt8;
         var txt8txt = sym.$("txt8").css("pointer-events","none");
         var txt9;
         var txt9txt = sym.$("txt9").css("pointer-events","none");
         var txt10;
         var txt10txt = sym.$("txt10").css("pointer-events","none");
         var txt11;
         var txt11txt = sym.getSymbol("taxi1Mc").$("txt11").css("pointer-events","none");
         var txt12;
         var txt12txt = sym.getSymbol("taxi1Mc").$("txt12").css("line-height", "185%");
         var txt13;
         var txt13txt = sym.getSymbol("taxi1Mc").$("txt13").css("line-height", "185%");
         var txt14;
         var txt14txt = sym.getSymbol("taxi1Mc").$("txt14").css("pointer-events","none");
         var txt15;
         var txt15txt = sym.getSymbol("taxi2Mc").$("txt15").css("pointer-events","none");
         var txt16;
         var txt16txt = sym.getSymbol("taxi2Mc").$("txt16").css("line-height", "185%");
         var txt17;
         var txt17txt = sym.getSymbol("taxi2Mc").$("txt17").css("line-height", "185%");
         var txt18;
         var txt18txt = sym.getSymbol("taxi2Mc").$("txt18").css("pointer-events","none");
         var txt19;
         var txt19txt = sym.$("txt19")
         var txt20;
         var txt20txt = sym.$("txt20")
         var txt21;
         var txt21txt = sym.$("txt21")
         var txt22;
         var txt22txt = sym.$("txt22")
         
         
         
         //var yourtag;
         //var yourtagtxt = sym.$("yourtagTxt");
         
         //AJAX retrieves data from xml source specified in url, maps xml variable to DOM object variable
         $.ajax({	
         	type: "GET",
         	url: "GN29653.xml",
         	dataType: "xml",
         	success: function(xml) {
         
         		headline = $(xml).find('headline').text();
         		headlinetxt.html(headline);
         		stand = $(xml).find('stand').text();
         		standtxt.html(stand);
         		source = $(xml).find('source').text();
         		sourcetxt.html(source);
         		txt1 = $(xml).find('txt1').text();
         		txt1txt.html(txt1);
         		txt2 = $(xml).find('txt2').text();
         		txt2txt.html(txt2);
         		txt3 = $(xml).find('txt3').text();
         		txt3txt.html(txt3);
         		txt4 = $(xml).find('txt4').text();
         		txt4txt.html(txt4)
         		txt5 = $(xml).find('txt5').text();
         		txt5txt.html(txt5);
         		txt6 = $(xml).find('txt6').text();
         		txt6txt.html(txt6);
         		txt7 = $(xml).find('txt7').text();
         		txt7txt.html(txt7);
         		txt8 = $(xml).find('txt8').text();
         		txt8txt.html(txt8);
         		txt9 = $(xml).find('txt9').text();
         		txt9txt.html(txt9);
         		txt10 = $(xml).find('txt10').text();
         		txt10txt.html(txt10);
         		txt11 = $(xml).find('txt11').text();
         		txt11txt.html(txt11);
         		txt12 = $(xml).find('txt12').text();
         		txt12txt.html(txt12);
         		txt13 = $(xml).find('txt13').text();
         		txt13txt.html(txt13);
         		txt14 = $(xml).find('txt14').text();
         		txt14txt.html(txt14);
         		txt15 = $(xml).find('txt15').text();
         		txt15txt.html(txt15);
         		txt16 = $(xml).find('txt16').text();
         		txt16txt.html(txt16);
         		txt17 = $(xml).find('txt17').text();
         		txt17txt.html(txt17);
         		txt18 = $(xml).find('txt18').text();
         		txt18txt.html(txt18);
         		txt19 = $(xml).find('txt19').text();
         		txt19txt.html(txt19);
         		txt20 = $(xml).find('txt20').text();
         		txt20txt.html(txt20);
         		txt21 = $(xml).find('txt21').text();
         		txt21txt.html(txt21);
         		txt22 = $(xml).find('txt22').text();
         		txt22txt.html(txt22);
         }
	});
this.i = 1;
// Total number of jpgs
this.t =7;
});
//Edge binding end

Symbol.bindElementAction(compId, symbolName, "${_button_back}", "click", function(sym, e) {
this.i = this.i-1;
if (this.i == 0)
{

this.i=this.t;
}

$(this.lookupSelector("photo")).attr("src","images/"+this.i+".jpg");
});
//Edge binding end

Symbol.bindElementAction(compId, symbolName, "${_buttonNext}", "click", function(sym, e) {
if (this.i > this.t-1)
{
this.i=0;
}

this.i = this.i+1;
$(this.lookupSelector("photo")).attr("src","images/"+this.i+".jpg");
});

// MENU BTN 1 =========================================================
	Symbol.bindElementAction(compId, symbolName, "${_menuBtn1}", "mouseover", function(sym, e) {
		sym.getSymbol("menuBtn1").$("menuBtnOver").show();
		sym.$("handMc").hide();
		sym.$("txt19").show();
		sym.$("txt20").hide();
	});//Edge binding end
	Symbol.bindElementAction(compId, symbolName, "${_menuBtn1}", "mouseout", function(sym, e) {
		sym.getSymbol("menuBtn1").$("menuBtnOver").hide();
		sym.$("txt19").hide();
		sym.$("txt20").hide();
	});//Edge binding end
		Symbol.bindElementAction(compId, symbolName, "${_menuBtn1}", "click", function(sym, e) {
		sym.getSymbol("menuBtn1").$("menuBtnOverClick").show();
		sym.getSymbol("menuBtn2").$("menuBtnOverClick").hide();
		sym.playReverse();
		sym.$("txt19").show();
		sym.$("txt20").hide();
	});//Edge binding end
	
// MENU BTN 2 =========================================================
	Symbol.bindElementAction(compId, symbolName, "${_menuBtn2}", "mouseover", function(sym, e) {
		sym.getSymbol("menuBtn2").$("menuBtnOver").show();
		sym.$("handMc").hide();
		sym.$("txt19").hide();
		sym.$("txt20").show();
	});//Edge binding end
	Symbol.bindElementAction(compId, symbolName, "${_menuBtn2}", "mouseout", function(sym, e) {
		sym.getSymbol("menuBtn2").$("menuBtnOver").hide();
		sym.$("txt19").hide();
		sym.$("txt20").hide();
	});//Edge binding end
		Symbol.bindElementAction(compId, symbolName, "${_menuBtn2}", "click", function(sym, e) {
		sym.getSymbol("menuBtn1").$("menuBtnOverClick").hide();
		sym.getSymbol("menuBtn2").$("menuBtnOverClick").show();
		sym.play();
		sym.$("txt19").hide();
		sym.$("txt20").show();
	});//Edge binding end
	       
// TAXI BTN 1 =========================================================
	Symbol.bindElementAction(compId, symbolName, "${_taxiBtn1}", "mouseover", function(sym, e) {
		sym.getSymbol("taxiBtn1").play();
		sym.getSymbol("taxi1Mc").play();
		sym.getSymbol("shadeBoxMc").play();
		sym.$("handMc").hide();
	});//Edge binding end
	Symbol.bindElementAction(compId, symbolName, "${_taxiBtn1}", "mouseout", function(sym, e) {
		sym.getSymbol("taxiBtn1").playReverse();
		sym.getSymbol("taxi1Mc").playReverse();
		sym.getSymbol("shadeBoxMc").playReverse();
	});//Edge binding end
	
// TAXI BTN 2 =========================================================
	Symbol.bindElementAction(compId, symbolName, "${_taxiBtn2}", "mouseover", function(sym, e) {
		sym.getSymbol("taxiBtn2").play();
		sym.getSymbol("taxi2Mc").play();
		sym.getSymbol("shadeBoxMc").play();
		sym.$("handMc").hide();
	});//Edge binding end
	Symbol.bindElementAction(compId, symbolName, "${_taxiBtn2}", "mouseout", function(sym, e) {
		sym.getSymbol("taxiBtn2").playReverse();
		sym.getSymbol("taxi2Mc").playReverse();
		sym.getSymbol("shadeBoxMc").playReverse();
	});//Edge binding end

})("stage");
   //Edge symbol end:'stage'

})(jQuery, AdobeEdge, "EDGE-170928702");