
(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 clickEventType=('ontouchstart'in document.documentElement?"touchstart":"click");var headline;var headlinetxt=sym.getSymbol("styleHead").$("headlineTxt").css("pointer-events","none");var stand;var standtxt=sym.getSymbol("styleHead").$("standTxt").css("pointer-events","none");var source;var sourcetxt=sym.getSymbol("styleBase").$("sourceTxt").css("pointer-events","none");var menuTxt=[];menuTxt[0]=sym.$("menuTxt0").css({"pointer-events":"none",});menuTxt[1]=sym.$("menuTxt1").css({"pointer-events":"none"});menuTxt[2]=sym.$("menuTxt2").css({"pointer-events":"none"});var menuArr=[];var btnNo=0;for(var b=0;b<3;b++){sym.getSymbol("menuBtnsMc").getSymbol("menuBtn"+b).$("menuIcon").attr("src","images/menuIcon"+b+".png");}
var txt=[];txt[0]=sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt0").css({"pointer-events":"none",});txt[1]=sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt1").css({"pointer-events":"none","height":"auto"});txt[2]=sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt2").css({"pointer-events":"none","height":"auto"});txt[3]=sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt3").css({"pointer-events":"none","height":"auto"});txt[4]=sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("txt4").css({"pointer-events":"none"});txt[5]=sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("txt5").css({"pointer-events":"none"});txt[6]=sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("txt6").css({"pointer-events":"none"});txt[7]=sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("txt7").css({"pointer-events":"none"});txt[8]=sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("txt8").css({"pointer-events":"none"});txt[9]=sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("txt9").css({"pointer-events":"none"});txt[10]=sym.getSymbol("interiorMc").$("txt10").css({"pointer-events":"none"});txt[11]=sym.getSymbol("interiorMc").$("txt11").css({"pointer-events":"none"});txt[12]=sym.getSymbol("interiorMc").$("txt12").css({"pointer-events":"none"});txt[13]=sym.getSymbol("interiorMc").$("txt13").css({"pointer-events":"none"});txt[14]=sym.$("txt14").css({"pointer-events":"none"});txt[15]=sym.$("txt15").css({"pointer-events":"none"});var txtArr=[];$.ajax({type:"GET",url:"GN32506.xml",dataType:"xml",success:function(xml){custonCol=$(xml).find('customColour').text();sym.getSymbol("styleHead").$("headerBox").css("background-color",custonCol);headline=$(xml).find('headline').text();headlinetxt.html(headline);stand=$(xml).find('stand').text();standtxt.html(stand);source=$(xml).find('source').text();sourcetxt.html(source);for(var i=0;i<3;i++){menuArr[i]=$(xml).find('menuTxt'+i).text();menuTxt[i].html(menuArr[i]);}
for(var i=0;i<15;i++){txtArr[i]=$(xml).find('txt'+i).text();txt[i].html(txtArr[i]);}
sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt1").animate({top:115-sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt1").height()+10},0);sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt2").animate({top:56-sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt2").height()+10},0);sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt3").animate({top:138-sym.getSymbol("carMainMc").getSymbol("carTxtMc").$("txt3").height()+10},0);}});menuArray=[];for(var h=0;h<3;h++){var menuBtnSymbols=sym.getSymbol("menuBtnsMc").getSymbol("menuBtn"+h);menuBtnSymbols.setVariable("menuId",h);menuArray.push(menuBtnSymbols);}
$.each(menuArray,function(count,menuInTheArray){var menuBtnItem=$(menuInTheArray);var menuBtnElement=menuInTheArray.getSymbolElement();menuBtnElement.bind("click",{menuId:count},menuBtnClick);menuBtnElement.bind("touchstart",{menuId:count},menuBtnClick);menuBtnElement.bind("mouseover",{menuId:count},menuShow);menuBtnElement.bind("mouseout",{menuId:count},menuHide);})
function resetmenu(){for(var h=0;h<menuArray.length;h++){menuArray[h].$("btnClick").fadeOut(0);menuArray[h].$("btnOver").fadeOut(0);}}
resetmenu();var waiting=500;function menuBtnClick(e){resetmenu();var menuMenu_id=(e.data.menuId);sym.getSymbol("menuBtnsMc").getSymbol("menuBtn"+menuMenu_id).$("btnClick").fadeIn(0);btnNo=menuMenu_id;sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowDown").fadeOut(50);sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowUp").fadeIn(50);sym.getSymbol("carMainMc").$("toggleBtn").animate({top:401},500,"easeOutCubic");sym.$("videoMc").fadeOut(500);sym.$("interiorMc").fadeOut(500);sym.getSymbol("styleHead").$("standTxt").fadeOut(500);if(menuMenu_id==0){car=0;sym.getSymbol("styleHead").$("standTxt").fadeIn(0);waiting=500;}
if(menuMenu_id==1){car=1;sym.$("interiorMc").stop().delay(waiting).fadeIn(500);waiting=0;}
if(menuMenu_id==2){car=1;sym.$("videoMc").stop().delay(waiting).fadeIn(500);waiting=0;}
carMove();}
function menuShow(e){var menuMenu_id=(e.data.menuId);sym.getSymbol("menuBtnsMc").getSymbol("menuBtn"+menuMenu_id).$("btnOver").fadeIn(0);btnNo=menuMenu_id;sym.getSymbol("menuBtnsMc").$("menuTxt").empty();sym.getSymbol("menuBtnsMc").$("menuTxt").append(menuArr[btnNo]);}
function menuHide(e){var menuMenu_id=(e.data.menuId);sym.getSymbol("menuBtnsMc").getSymbol("menuBtn"+menuMenu_id).$("btnOver").fadeOut(0);sym.getSymbol("menuBtnsMc").$("menuTxt").empty();}
sym.getSymbol("menuBtnsMc").getSymbol("menuBtn0").$("btnClick").fadeIn(0);$.fn.animateRotate=function(angle,duration,easing,complete){return this.each(function(){var $elem=$(this);$({deg:0}).animate({deg:angle},{duration:duration,easing:easing,step:function(now){$elem.css({'-moz-transform':'rotate('+now+'deg)','-webkit-transform':'rotate('+now+'deg)','-o-transform':'rotate('+now+'deg)','-ms-transform':'rotate('+now+'deg)','transform':'rotate('+now+'deg)'});},complete:complete||$.noop});});};var car=0;var speed=0;var ease=0;var spin=0;sym.getSymbol("carMainMc").$("toggleBtn").stop().animate({opacity:0},0);function carMove(){if(car==0){sym.getSymbol("carMainMc").$("carMc").stop().animate({opacity:1},0);ease='easeOutCubic';speed=1500;sym.getSymbol("carMainMc").$("carMc").stop().animate({left:0},speed,'easeOutCubic',function(){sym.getSymbol("carMainMc").$("carTxtMc").stop().animate({opacity:1},500);sym.getSymbol("carMainMc").$("toggleBtn").stop().animate({opacity:1},500);});if(spin==0){sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel1").animateRotate(720,speed,ease);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel2").animateRotate(720,speed,ease);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel3").animateRotate(-720,speed,ease);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel4").animateRotate(-720,speed,ease);spin=1;}else{spin=0;}
car=1;}else{ease='easeInCubic';speed=500;sym.getSymbol("carMainMc").$("carTxtMc").stop().animate({opacity:0},0);sym.getSymbol("carMainMc").$("toggleBtn").stop().animate({opacity:0},0);sym.getSymbol("carMainMc").$("carMc").stop().animate({left:800},speed,'easeInCubic',function(){sym.getSymbol("carMainMc").$("carMc").stop().animate({left:-800},0,function(){sym.getSymbol("carMainMc").$("carMc").stop().animate({opacity:0},0);});});for(var b=0;b<4;b++){sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel"+b).animateRotate(0,0);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel1").animateRotate(720,speed,ease);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel2").animateRotate(720,speed,ease);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel3").animateRotate(-720,speed,ease);sym.getSymbol("carMainMc").getSymbol("carMc").$("wheel4").animateRotate(-720,speed,ease);}
car=0;spin=0;}}
sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowDown").fadeOut(0);sym.getSymbol("carMainMc").$("toggleBtn").on(clickEventType,function(e){if(sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowUp").is(":visible")){sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowDown").fadeIn(50);sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowUp").fadeOut(50);sym.getSymbol("carMainMc").$("toggleBtn").animate({top:330},500,"easeOutCubic");}else{sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowDown").fadeOut(50);sym.getSymbol("carMainMc").getSymbol("toggleBtn").$("arrowUp").fadeIn(50);sym.getSymbol("carMainMc").$("toggleBtn").animate({top:401},500,"easeOutCubic");}
e.stopPropagation();e.preventDefault();});sym.$("videoMc").fadeOut(0);sym.$("interiorMc").fadeOut(0);sym.getSymbol("carMainMc").$("carTxtMc").stop().animate({opacity:0},0);sym.getSymbol("carMainMc").$("carMc").stop().animate({left:-800},0);carMove();});
//Edge binding end 

// VIDEO BTN 1 =========================================================

// VIDEO BTN 2 =========================================================
})("stage");
//Edge symbol end:'stage'

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

//Edge symbol: 'Down-level'
(function(symbolName){})("Down-level");
//Edge symbol end:'Down-level'
})(jQuery,AdobeEdge,"GraphicNews32506");