(function() {
	var
	  questions = [ { "title": "Can too much Botox cause eyebrows to drop?", "nid": "40866", "url": "/question/botox-side-effects-can-too-much-cause-eyebrows-drop?p=s#comment-32543" }, { "title": "SmartLipo - Can I take ibuprofen for pain?", "nid": "46057", "url": "/question/can-i-take-ibuprofen-pain-after-smart-lipo?p=s#comment-32544" }, { "title": "What is VASER Liposuction?", "nid": "41275", "url": "/question/what-vaser-liposuction?p=s#comment-32542" }, { "title": "Can I use SmartLipo, Vaser or CoolLipo with a Brazilian Butt lift?", "nid": "48336", "url": "/question/can-use-smartlipo-vaser-or-coollipo-with-brazilian-butt-lift?p=s#comment-32545" }, { "title": "Mesotherapy vs. Carboxytherapy - which is better to treat cellulite?", "nid": "48100", "url": "/question/mesotherapy-vs-carboxytherapy-which-better-treat-cellulite?p=s#comment-32546" }, { "title": "Does SmartLipo cause cancer?", "nid": "48046", "url": "/question/does-smartlipo-cause-cancer?p=s#comment-32538" }, { "title": "Juvederm - What technique should I use to massage Juvederm into place?", "nid": "47608", "url": "/question/technique-how-massage-juvederm?p=s#comment-32539" }, { "title": "SmartLipo - How much fat loss can I expect?", "nid": "46699", "url": "/question/smart-lipo-fat-loss?p=s#comment-32540" }, { "title": "Why did I get burned during SmartLipo treatments?", "nid": "47828", "url": "/question/smart-lipo-1?p=s#comment-32537" }, { "title": "Does a medical spa have to be part of a doctor\'s office? ", "nid": "47270", "url": "/question/does-medi-spa-have-be-part-doctors-office-do-they-have-have-medical-license?p=s#comment-32541" }, { "title": "Does Restylane work for lips?", "nid": "41124", "url": "/question/does-restylane-work-lips?p=s#comment-32535" }, { "title": "How much does Smart lipo cost?", "nid": "41149", "url": "/question/how-much-does-smartlipo-cost?p=s#comment-32550" }, { "title": "Is traditional liposuction outdated?", "nid": "39486", "url": "/question/traditional-liposuction-outdated?p=s#comment-32536" }, { "title": "How can I get rid of cellulite?", "nid": "9629", "url": "/question/how-can-get-rid-cellulite?p=s#comment-32534" }, { "title": "Does Thermage work for cellulite?", "nid": "45091", "url": "/question/thermage-cellulite?p=s#comment-32547" }, { "title": "Hardness after smartlipo?", "nid": "43903", "url": "/question/hardness-after-smartlipo?p=s#comment-19757" }, { "title": "Is Alli weight loss program worth it?", "nid": "47360", "url": "/question/ali-weight-loss-diet-program-pills?p=s#comment-32533" }, { "title": "How to avoid Sculptra bumps?", "nid": "46380", "url": "/question/sculptra-injected-under-eyes-bumps?p=s#comment-32532" }, { "title": "Perlane bruising and swelling", "nid": "41299", "url": "/question/perlane-injection-bruising-swelling?p=s#comment-19234" }, { "title": "Chemical peel by a dermatologist vs. at-home", "nid": "821", "url": "/question/chemical-peel-kit-or-dermatologist?page=3\x26p=s#comment-18943" }, { "title": "Silicone mentor breast implants safe?", "nid": "6199", "url": "/question/silicone-mentor-breast-implants-safe?page=7\x26p=s#comment-18728" }, { "title": "More Lipodissolve information?", "nid": "43361", "url": "/question/lipo-dissolve-other-lipo-dissolve-information?p=s#comment-32531" }, { "title": "What is Active Fx really like?", "nid": "40923", "url": "/question/active-fx-treatment-really-like?page=4\x26p=s#comment-18136" }, { "title": "What is Active Fx really like?", "nid": "40923", "url": "/question/active-fx-treatment-really-like?page=4\x26p=s#comment-18135" }, { "title": "Is liposuction cheating?", "nid": "832", "url": "/question/is-liposuction-cheating?page=2\x26p=s#comment-18066" }, { "title": "Is liposuction cheating?", "nid": "832", "url": "/question/is-liposuction-cheating?p=s#comment-18065" }, { "title": "Is liposuction cheating?", "nid": "832", "url": "/question/is-liposuction-cheating?p=s#comment-18033" }, { "title": "How to fill in butt dimples?", "nid": "44035", "url": "/question/butt-dimples-fill-in?p=s#comment-18027" }, { "title": "Hardness after smartlipo?", "nid": "43903", "url": "/question/hardness-after-smartlipo?p=s#comment-18026" }, { "title": "How long do the results of endermologie last?", "nid": "826", "url": "/question/endermologie-cellulite-treatment-last?p=s#comment-18024" }, { "title": "How soon do you see results with Smart LIpo?", "nid": "7985", "url": "/question/how-soon-do-you-see-results-smart-lipo?page=3\x26p=s#comment-17484" }, { "title": "Who is a good candidate for SmartLipo?", "nid": "44818", "url": "/question/who-good-candidate-smartlipo?p=s#comment-32530" }, { "title": "Silicone mentor breast implants safe?", "nid": "6199", "url": "/question/silicone-mentor-breast-implants-safe?page=6\x26p=s#comment-17449" }, { "title": "How soon do you see results with Smart LIpo?", "nid": "7985", "url": "/question/how-soon-do-you-see-results-smart-lipo?page=3\x26p=s#comment-17419" }, { "title": "Is Smart Lipo FDA approved?", "nid": "44785", "url": "/question/smartlipo-fda-approval?p=s#comment-32529" }, { "title": "Advice on how to dissolve radiesse?  Very swollen", "nid": "7499", "url": "/question/any-advice-how-dissolve-radiesse-very-swollen?p=s#comment-17405" }, { "title": "How soon do you see results with Smart LIpo?", "nid": "7985", "url": "/question/how-soon-do-you-see-results-smart-lipo?page=3\x26p=s#comment-17403" }, { "title": "How long do SmartLipo results last?", "nid": "44782", "url": "/question/smartlipo-results?p=s#comment-32528" }, { "title": "What results can I expect from SmartLipo?", "nid": "9218", "url": "/question/what-results-can-expect-smartlipo?p=s#comment-32527" }, { "title": "Smart Lipo - What happens to stretched-out skin once the fat is removed?", "nid": "44779", "url": "/question/smartlipo-stretched-skin-after-fat-removal?p=s#comment-32526" }, { "title": "How much bruising and swelling does Smart Lipo cause?", "nid": "44773", "url": "/question/smartlipo-bruising-swelling?page=2\x26p=s#comment-32524" }, { "title": "Perlane bruising and swelling", "nid": "41299", "url": "/question/perlane-injection-bruising-swelling?p=s#comment-17390" }, { "title": "Advice on how to dissolve radiesse?  Very swollen", "nid": "7499", "url": "/question/any-advice-how-dissolve-radiesse-very-swollen?p=s#comment-17355" }, { "title": "Sculptra for under eye circles", "nid": "3796", "url": "/question/sculptra-under-eye-circles?page=2\x26p=s#comment-17352" }, { "title": "Juvederm side effects - discussion", "nid": "6883", "url": "/question/juvederm-side-effects-discussion?page=13\x26p=s#comment-17343" }, { "title": "Juvederm side effects - discussion", "nid": "6883", "url": "/question/juvederm-side-effects-discussion?page=13\x26p=s#comment-17341" }, { "title": "Silicone mentor breast implants safe?", "nid": "6199", "url": "/question/silicone-mentor-breast-implants-safe?page=5\x26p=s#comment-17339" }, { "title": "Silicone mentor breast implants safe?", "nid": "6199", "url": "/question/silicone-mentor-breast-implants-safe?page=4\x26p=s#comment-16919" }, { "title": "Silicone mentor breast implants safe?", "nid": "6199", "url": "/question/silicone-mentor-breast-implants-safe?page=3\x26p=s#comment-16910" }, { "title": "Silicone mentor breast implants safe?", "nid": "6199", "url": "/question/silicone-mentor-breast-implants-safe?page=3\x26p=s#comment-16897" } ],
	  pro = { "nid": 0, "title": "SmartLipoMD", "uri": "user/3203" },
	  domain = 'http://www.realself.com';
	
	function parse_questions() {
	  var
	    contains_link = false;
	    links = document.getElementsByTagName('A');
	  
	  for (var i in links) {
	    if (typeof links[i] != 'undefined' && links[i].protocol + '//' + links[i].hostname == domain) {
	      contains_link = true;
	      break;
	    }
	  }
	  
	  var output = '<div>';
	  if (contains_link) {
	    var i = 0;
      while(typeof questions[i] != 'undefined') {
        output += '<p><a href="' + domain + questions[i].url + '" target="_blank">' + questions[i].title + '</a></p>';
        i++;
      }
	  }
	  else {
	    output += "This page must link to www.realself.com to use this widget";
	  }
	  output += '<div>';
		
		var cont = document.getElementById('rs_questions');
		cont.innerHTML = output + cont.innerHTML;
		
		var links = cont.getElementsByTagName('A');
		if (links.length) {
			var s = 'pro_hdr=' + pro.nid
			for (var i = 0; i < links.length; i++) {
				links[i].href += (links[i].href.indexOf('#') == -1 ? '#' : '') + s;
			}
		}
	}
	
	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);
})();
