var RS = RS || function() {
	var questions = { "pro": "Jennifer Walden, MD", "questions": [ { "title": "Silicone breast implants - Do you really lose 50 cc\'s with behind the muscle implant placement?", "nid": "54294", "url": "/question/silicone-breast-implants-behind-muscle-placement#tip-54605" }, { "title": "Do plastic surgeons try to get their patients to stop smoking?", "nid": "47995", "url": "/question/do-plastic-surgeons-try-get-their-patients-stop-smoking#tip-48010" }, { "title": "Mommy makeover: what is it?", "nid": "47998", "url": "/question/mommy-makeover-what-is#tip-48000" }, { "title": "Plastic surgery patients who smoke", "nid": "47886", "url": "/question/plastic-surgery-patients-who-smoke#tip-47898" }, { "title": "Top 5 Cosmetic Procedures in 2007", "nid": "46907", "url": "/answer/top-5-cosmetic-procedures-2007" } ], "link": "/beauty-professional/jennifer-walden" };
	
	function parse_questions() {
		var domain = 'http://www.realself.com';
		var img_src = domain + '/widget_logo.png';
		var img_alt = 'RealSelf.com - Answers, tips, reviews for beauty, anti-aging skin care, cosmetic plastic surgery';
		
		
		var content = '<div>';
		var q;
		for (var i = 0; q = questions.questions[i]; i++) {
			content += '<p><a href="' + domain + q.url + '" target="_blank">' + q.title + '</a></p>';
		}
		content += '<div>';
		content += '<p><a href="' + domain + questions.link + '" target="_blank">All answers from ' + questions.pro + '</a></p>';
		content += '<a href="' + domain + '" target="_blank"><img src="' + img_src + '" alt="' + img_alt + '" style="border: none" /></a>';
		
		var cont = document.getElementById('rs_questions');
		cont.innerHTML = content;
		
		if (navigator.userAgent.match(/MSIE [5|6]/)) {
			var img = cont.getElementsByTagName('IMG')[0];
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "', sizingMethod='image')";
			img.src = domain + '/themes/renewal/img/ie_fix.gif';
			img.parentNode.style.width = '121px';
			img.parentNode.style.height = '31px';
		}
	}
	
	function add_event(el, type, listener) {
		if (document.addEventListener) {
			el.addEventListener(type, listener, true);
		}
		else {
			el.attachEvent('on' + type, listener);
		}
	}
	
	add_event(window, 'load', parse_questions);
}();
