//Copyright © [Year(s)] Nokia Corporation and/or its subsidiary(-ies).
Fp.Menu.Share={elemIdPrefix:"menu-share-",buttons:[{name:"sms",hook:Fp.Api.C2Aid.SHARE_VIA_SMS},{name:"email",hook:Fp.Api.C2Aid.SHARE_VIA_EMAIL}],init:function(){this.setupEvents(this.fireAction);},setupEvents:function(c){if(typeof c!=="function"){return false;}for(var b=0,a=this.buttons.length;b<a;b++){new Fp.Utils.Events.addTapEvent({element:Fp.byId(this.elemIdPrefix+this.buttons[b].name),onEvent:Fp.Utils.bind(c,this,[this.buttons[b]])});}},fireAction:function(b){if(!b||!b.hook){return false;}var a=function(){Fp.Api.fireC2A({hook:b.hook});};if(Fp.Tracking.trackingOn){Fp.Tracking.track("sharePlaceClicked",{type:b.name,callback:function(){a();}});}else{a();}}};