(function() {
	var
	  questions = [ { "title": "Nd:YAG and diode for bikini area hair removal?", "nid": "105391", "url": "/question/laser-hair-removal-bikini-area-advice?p=s#tip-106499" }, { "title": "Liposuction to lose 45 lbs?", "nid": "105611", "url": "/question/liposuction-lose-45-lbs?p=s#tip-106493" }, { "title": "Fat Transfer for lip augmentation?", "nid": "98293", "url": "/question/lip-augmentation-fat-transfer?p=s#tip-102454" }, { "title": "What happens to facial hair after laser resurfacing?", "nid": "98360", "url": "/question/facial-hair-laser-resurfacing?p=s#tip-102453" }, { "title": "Liposuction scars too high", "nid": "98375", "url": "/question/liposuction-scars-too-high?p=s#tip-102451" }, { "title": "How long Before asymmetry from Botox gets corrected?", "nid": "98441", "url": "/question/botox-correction-brow-asymmetry?p=s#tip-102450" }, { "title": "Juvederm for upper lip and nasolabial folds?", "nid": "98545", "url": "/question/juvederm-upper-lip-nasolabial-folds?p=s#tip-102448" }, { "title": "Fraxel Laser to fix hypertrophic scarring from acne?", "nid": "98592", "url": "/question/fraxel-laser-hypertrophic-scarring-acne?p=s#tip-102447" }, { "title": "Botox injection possible on 1 side of jaw?", "nid": "98609", "url": "/question/botox-one-side-jaw?p=s#tip-102446" }, { "title": "How effective is Fraxel Laser on sun damage?", "nid": "99998", "url": "/question/effective-fraxel-laser-sun-damage?p=s#tip-102444" }, { "title": "Rosacea after CO2 laser?", "nid": "100359", "url": "/question/rosacea-co2-laser-redness-flushing?p=s#tip-102443" }, { "title": "Restylane for indented surgery scar?", "nid": "100381", "url": "/question/indented-scar-restylane?p=s#tip-102442" }, { "title": "Best solution for smoothing out dimpling after Liposuction?", "nid": "100500", "url": "/question/smoothing-dimpling-liposuction?p=s#tip-102441" }, { "title": "Juvederm and Restylane allergy?", "nid": "100726", "url": "/question/restylane-juvederm-allergy?p=s#tip-102440" }, { "title": "Fraxel Laser to remove scar left from fever blister?", "nid": "100806", "url": "/question/fraxel-laser-remove-scar-fever-blister?p=s#tip-102439" }, { "title": "Does Sculptra work for jowls and marionette lines?", "nid": "101518", "url": "/question/sculptra-jowls-marionette-lines?p=s#tip-102438" }, { "title": "Bruising after Radiesse on nose permanent?", "nid": "101556", "url": "/question/radiesse-injection-nose-bruising?p=s#tip-102437" }, { "title": "Skin tightening treatment for loose skin after Liposuction?", "nid": "100985", "url": "/question/liposuction-loose-skin-tightening-procedures?p=s#tip-102436" }, { "title": "Fraxel Laser or Laser Genesis after Juvederm?", "nid": "100852", "url": "/question/juvederm-fraxel-laser-genesis?p=s#tip-102435" }, { "title": "Chin ripples after Neck liposuction along with S-lift?", "nid": "101730", "url": "/question/chin-ripples-neck-liposuction-s-lift?p=s#tip-102434" }, { "title": "Best long lasting lip filler?", "nid": "101855", "url": "/question/long-lasting-lip-filler?p=s#tip-102431" }, { "title": "Arm Liposuction incision through the arm?", "nid": "102040", "url": "/question/arm-liposuction-incision-armpit?p=s#tip-102430" }, { "title": "Will bulemia affect Botox results?", "nid": "102042", "url": "/question/botox-results-bulemia?p=s#tip-102428" }, { "title": "Laser hair removal may trigger Herpes symptoms?", "nid": "97060", "url": "/question/laser-hair-removal-risk-herpes?p=s#tip-98789" }, { "title": "Liposuction for a 19 year old?", "nid": "97135", "url": "/question/liposuction-19-year-old?p=s#tip-98788" } ],
	  pro = { "nid": 17158, "title": "Ronald Shelton, MD", "uri": "find/New-York/New-York-City/Dermatologist/Ronald-Shelton" },
	  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);
})();
