% var instrument = model.models[0]; if (!instrument){ return; } var decimals = instrument.getDecimals(); var mv = instrument.getDescriptorValue("MV"); var agrup = instrument.getAgrup(); var topFlopCls = (instrument.getDescriptorValue('D9558') === 'i') ? instrument.getTopFlopClsInv(INFOBOLSA.Descriptors.ChangePercent) : instrument.getTopFlopCls(INFOBOLSA.Descriptors.ChangePercent); var ticker = instrument.getDescriptorValue("MV").replace(/(^[\s]+|[\s]+$)/g, '').replace(/\s/g, '_'); var instrumentType = instrument.getInstrumentType(); var instrumentName = (instrumentType === INFOBOLSA.InstrumentTypes.commodities || instrumentType === INFOBOLSA.InstrumentTypes.derivatives) ? instrument.getDescriptorValue('D9563') : instrument.getDescriptorValue('D80'); instrumentName = (instrument.getDescriptorValue('D9565') === "ES" && instrument.getDescriptorValue('D25') === "INDICES " && instrument.getDescriptorValue('D10104'))? instrument.getDescriptorValue('D10104') : instrumentName; instrumentName = (instrument.getDescriptorValue('D9558') === 'i') ? instrument.getDescriptorValue('D10103') : instrumentName; var instrumentTrend = topFlopCls === "top"? "sube" : topFlopCls === "equal"? "continua" : "baja"; var badgeIntrument = instrument.getDescriptorValue("D136") == "USD"? "$": instrument.getDescriptorValue("D136") == "EUR"? "€": instrument.getDescriptorValue("D136") == "GBP"? "£":instrument.getDescriptorValue("D136"); var twitterText = "#" + instrument.getDescriptorValue("D30").replace(/\s/g, '') + " " + instrumentTrend + " " + instrument.getChangePercent() + "% hasta los " + instrument.getLast() + badgeIntrument + " #Infobolsa @infobolsa" ; var twitterTextEncode = encodeURIComponent(twitterText); var perfilClass = ''; var isFavorite = model.options.isFavorite; var isFavoriteClass = (isFavorite) ? "active" : "noActive"; if (IS_PREMIUM_USER) { perfilClass = 'premium'; } else if (IS_PLUS_USER) { perfilClass = 'plus'; } var showFavorite = false; if (instrumentType === INFOBOLSA.InstrumentTypes.currencies) { showFavorite = true; } %>