}
while(tempStr.indexOf(“*”) !== -1)
var firstPos = tempStr.indexOf(“*”);
var nextPos = tempStr.indexOf(“*”,firstPos + 1);
if(nextPos !== -1)
var innerTxt = tempStr.substring(firstPos + 1,nextPos);
var italicized = “” + innerTxt + ““;
tempStr = tempStr.substring(0,firstPos) + italicized + tempStr.substring(nextPos + 2,tempStr.length);
else
tempStr = tempStr.replace(“*”,”");
}
return tempStr;
}
Poll.drop_decimals = function(x)
var number = Number(x).toFixed(); return number;
;
Poll.poll_template = function()
return “#prebuilt_questions
“;
};
Poll.question_template = function()
return “
#text:Poll.markdownToHtml
#prebuilt_answers”;
};
Poll.answer_template = function()
return “#prebuilt_image#text:Poll.markdownToHtml#prebuilt_enlarge “;
};
Poll.closed_poll_template = function()
return “#prebuilt_questions”;
};
Poll.closed_question_template = function()
return “
#text:Poll.markdownToHtml
#prebuilt_answers”;
};
Poll.closed_answer_template= function() {
return “#text:Poll.markdownToHtml#percentage:Poll.drop_decimals%”;
};
document.domain = “people.com”;$(document).ready(function() Poll.init(base_url: “http://polls.people.com”, brand: “People”, section: “Polls”, article: “20576547″, data_url: “http://www.people.com/people/poll/json/0,,20576547,00.js”);Poll.render_polls();});
Related posts:
- Justin Timberlake gives fans the chance to become his personal photographer
- Russell Brand set for pay out after Katy Perry divorce
- Dancing with the Stars: Hope Solo Defends Maksim Chmerkovskiy
- Katy Perry s Parents — Divorce Was a Gift from Creator
- Katy Perry — First Big Night Out Since Split with Russell Brand