(function() {
	var questions = { "pro": "David A. Dreyfuss, MD", "questions": [ { "title": "Can sclerotherapy treat facial veins?", "nid": "59366", "url": "/question/can-sclerotherapy-treat-facial-veins#tip-59534" }, { "title": "Botox lips: is Botox best for lip plumping?", "nid": "59388", "url": "/question/botox-lips-botox-best-lip-plumping#tip-59533" }, { "title": "My cheeks look too plump post-Botox and Perlane!", "nid": "59424", "url": "/question/my-cheeks-look-too-plump-post-botox-perlane#tip-59531" }, { "title": "How many Botox units do I need for moderate/severe forehead lines?", "nid": "59117", "url": "/question/how-many-botox-units-need-for-moderate-severe-forehead-lines#tip-59442" }, { "title": "Is Mesotheraphy better than Liposuction?", "nid": "59069", "url": "/question/mesotheraphy-better-lipo#tip-59440" } ], "link": "/find/Illinois/Chicago/Plastic-Surgeon/David-Dreyfuss" };
	
	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);
})();
