 



$(document).ready(function() {

	if (IS_HOME_PAGE == 1) {
	  document.body.onmousemove = function() {
		if (BROWSER_TYPE == 'IE') {
			$('#site_head,#site_foot,#iqtpi_login_form_footer').animate({"filter":"alpha(opacity=100)"},280);
		}
		else {
			$('#site_head,#site_foot,#iqtpi_login_form_footer').animate({"opacity":"1"},280);
		}
		document.body.onmousemove = null;
	  }
	}

	activate_wax();

	activate_slideys();

	activate_delete_links(document.body);

	activate_questions(document.body);

	activate_reaskers(document.body);

	$(document.body).find('.age_rate_link').each( function() {
		/*
			Note that .age_rate_link anchors are followed by hidden spans that contain
			the content's title (ex. "What did you eat for breakfast?")
		*/
		var _s = this.href.split('=');
		 var _jstr = _s[_s.length-1];
		var _title = $(this).next('span').text();
		$(this).click(function() {
			$(document.body).append('<div class="age_rater_container" style="position:fixed; left:0px; top:0px; width:100%; height:100%; z-index:1002;">\
			  <div class="age_rater_bg" style="position:absolute; left:0px; top:0px; width:100%; height:100%; background:#280; opacity:0.4; filter:alpha(opacity=40); z-index:1;"></div>\
			  <div class="age_rater" style="position:absolute; display:none; width:44%; min-height:40%; padding:2%; left:26%; top:10%; background:white; z-index:2;">\
				<h3>' + _title + '</h3>\
				<p>Please select the type of ages that you think this content is appropriate for.</p>\
				<div id="age_rater_input_container" style="margin-bottom:1em;">\
					<div style="padding:5px;"> <img src="http://iqtpi.com/?&o=608&f=routine-2134" border="0" style="height:1em;; height:1em;"> </div>\
				</div>\
				<div align="right">\
				  <a onclick="setTimeout(&quot;$(\'.age_rater_container\').remove()&quot;,10); return false;" href="#">Cancel</a>\
				   | \
				  <a class="age_rater_submit" href="http://' + document.domain + '/qa_service?&function=age_rate&j=' + _jstr + '"><b>Submit Age Rating</b></a>\
				</div>\
			  </div>\
			</div>');
			$('#age_rater_input_container').html('<select><option value="4">Grown Ups and Way Grown Ups Only</option><option value="2">Teens and older</option><option value="1">All Ages</option></select>');
			$('#age_rater_input_container').find('select').css('font-size','1.32em');
			$('#age_rater_input_container').find('select').css('width','99%');
			$('#age_rater_input_container').find('select').keyup(function(e) {
				if (e.keyCode == 13) {
					$('.age_rater_submit').click();
					return false;
				}
			});
			setTimeout("$('#age_rater_input_container').find('select').focus()",180);
			$('.age_rater_submit').click(function() {
				var _s = this.href.split('=');
				var _content_jstr = _s[_s.length-1];
				var _txt = '';
				$('#age_rater_input_container').find('select').find('option').each(function() {
					if (this.selected == true) {
						_txt = $(this).val();
						return false;
					}
				});
				if (_txt == '') {
					var _txt = $('#age_rater_input_container').find('select:first').find('option').val();
				}
				$.get(this.href + '&rating=' + encodeURIComponent(_txt) + '&jstr_echo=' + _content_jstr, function(data) {
					var _s = this.url.split('=');
					var _content_jstr = _s[_s.length-1];
					 var _content_jstr = _content_jstr.replace('/','');
					// take user to their ratings.
					window.location = 'http://' + document.domain + '/' + CLIENT_ID + '/Age_Ratings';
					$('.age_rater_container').remove();
				});
				return false;
			});
			setTimeout("$('.age_rater').fadeIn(240);",120);
			return false;
		});
	});

});


function activate_questions(el) {
	if (!el) { var el = document.body; }
	$(el).find('.question').each(function() {
		if (this.is_question == 1) { return true; }
		this.is_question = 1;
		$(this).find('.question_closer').click(function() {
			$.get(this.href + '&elId=' + encodeURIComponent(this.id), function(data) {
				var _s = this.url.split('=');
				var _elId = decodeURIComponent(_s[_s.length-1]);
				var el = document.getElementById(_elId);
				var _data = jQuery.trim(data);
				if (_data == 'are you sure') {
					var c = confirm('Really?\n\nThis will delete ALL OF YOUR ANSWERS to this question.\n\nThere is NO UNDO.');
					if (c !== true) {
						return false;
					}
					else {
						$.get(this.url + '&yes_i_am_sure=1');
					}
				}
				var _pElId = _elId.replace('closer:','');
				var pEl = document.getElementById(_pElId);
				if (pEl !== null) {
				  try {
					// question closer callback - do something with the parent el
					question_closer_callback(pEl);
				  } catch(err) {
					// nope!  just remove the parent element.
					$(pEl).slideUp(240);
					if ($(pEl).hasClass('question_float')) {
						setTimeout("try{\
						  _special_iterator = 0;\
						  $(document.getElementById('" + pEl.id + "')).siblings('.question').each(function() {\
							_special_iterator = _special_iterator + 1;\
							if (_special_iterator == 1) {\
								$(this).css('clear','left');\
							}\
							else {\
								$(this).css('clear','none');\
								if (_special_iterator == 3) {\
									_special_iterator = 0;\
								}\
							}\
						  });\
						  $(document.getElementById('" + pEl.id + "')).remove();\
						}\
						catch(err){}",200);
					}
					else {
						setTimeout("try{\
						  $(document.getElementById('" + pEl.id + "')).remove();\
						}\
						catch(err){}",200);
					}
				  }
				  var hoverer_el = document.getElementById('hoverer:' + pEl.id);
				  if (hoverer_el !== null) {
					$(hoverer_el).remove();
				  }
				}
			});
			return false;
		});
		$(this).find('.answer_question').each( function() {
			/*
				Note that .answer_question anchors are followed by hidden spans that contain
				the question text (ex. "What did you eat for breakfast?")
			*/
			var _s = this.href.split('=');
			 var _jstr = _s[_s.length-1];
			var _title = $(this).next('span').text();
			var _answer_format = 'standard';
			  if ($(this).hasClass('answerformat_short')) {
				var _answer_format = 'short';
			  }
			var _answer_type = 'text';
			  if ($(this).hasClass('answertype_autocomplete')) {
				var _answer_type = 'autocomplete';
			  }
			  else if ($(this).hasClass('answertype_multiple_choice')) {
				var _answer_type = 'multiple_choice';
			  }
			$(this).click(function() {
				AC_AJAX_NUM = 0;
				DID_GET_ANSWER_FROM_AUTOCOMPLETE = 0;
				$(document.body).append('<div class="answerer_container" style="position:fixed; left:0px; top:0px; width:100%; height:100%; z-index:1002;">\
				  <div class="answerer_bg" style="position:absolute; left:0px; top:0px; width:100%; height:100%; background:#69e; opacity:0.4; filter:alpha(opacity=40); z-index:1;"></div>\
				  <div class="answerer" style="position:absolute; display:none; width:44%; min-height:40%; padding:2%; left:26%; top:10%; background:white; z-index:2;">\
					<h3>' + _title + '</h3>\
					<div id="answerer_input_container" style="margin-bottom:1em;">\
						<div style="padding:5px;">  <img src="http://iqtpi.com/?&o=608&f=routine-2134" border="0" style="height:1em;; height:1em;"> </div>\
					</div>\
					<div style="margin-bottom:1em;">\
						<select class="answerer_key">\
						  <option value="1">Everyone can see my answer</option>\
						  <option value="5">Friends and followers can see my answer</option>\
						  <option value="9">Only my friends can see this</option>\
						  <option value="0">Only I can see this (private)</option>\
						</select>\
					</div>\
					<div align="right">\
					  <a onclick="setTimeout(&quot;$(\'.answerer_container\').remove()&quot;,10); return false;" href="#">Cancel</a>\
					   | \
					  <a class="answerer_submit answerformat_' + _answer_format + ' answertype_' + _answer_type + '" href="http://' + document.domain + '/qa_service?&function=answer&j=' + _jstr + '"><b>Answer</b></a>\
					</div>\
				  </div>\
				</div>');
				if (_answer_type == 'text') {
					$('#answerer_input_container').html('<input class="answerer_input" style="width:99%; font-size:1.64em;" autocomplete="off">');
					$('#answerer_input_container').find('input').keydown(function(e) {
						if (e.keyCode == 13) {
							$('.answerer_submit').click();
							return false;
						}
					});
					setTimeout("$('#answerer_input_container').find('input').focus();",180);
				}
				else {
					$.get('http://' + document.domain + '/qa_service?&function=answerer_html&j=' + _jstr + '&answertype_echo=' + _answer_type, function(data) {
						var _s = this.url.split('=');
						var _answer_type = _s[_s.length-1];
						$('#answerer_input_container').html(data);
						if (_answer_type == 'multiple_choice') {
							$('#answerer_input_container').find('select').css('font-size','1.64em');
							$('#answerer_input_container').find('select').css('width','99%');
							$('#answerer_input_container').find('select').keyup(function(e) {
								if (e.keyCode == 13) {
									$('.answerer_submit').click();
									return false;
								}
							});
							setTimeout("$('#answerer_input_container').find('select').focus()",180);
						}
						else if (_answer_type == 'autocomplete') {
							$('#answerer_input_container').append('<div id="answerer_ac_results" style="margin:0.12em; font-size:0.86em; display:none;"></div>');
							$('#answerer_input_container').find('input').css('font-size','1em');
							$('#answerer_input_container').find('input').css('width','99%');
							$('#answerer_input_container').find('input').focus(function() {
								this.is_focused = 1;
								$('#answerer_ac_results').show();
							});
							$('#answerer_input_container').find('input').blur(function() {
								this.is_focused = 0;
								setTimeout("if ($('#answerer_input_container').find('input')[0].is_focused !== 1) { $('#answerer_ac_results').hide() }",200);
							});
							$('#answerer_input_container')[0].go_up = function() {
								try {
									$('#answerer_ac_results').children('.ac_highlighted:first').prev()[0].highlight();
									$('#answerer_input_container').find('input').val($('#answerer_ac_results').children('.ac_highlighted:first').text());
								} catch(err) {
									$('#answerer_ac_results').children('.ac_result').each(function() {
										this.unhighlight();
										var imp = $('#answerer_input_container').find('input')[0];
										$(imp).val(imp.last_typed_val);
									});
								}
							}
							$('#answerer_input_container')[0].go_down = function() {
								if ($('#answerer_ac_results').children('.ac_highlighted').length == 0) {
									try {
										$('#answerer_ac_results').children('.ac_result:first')[0].highlight();
										$('#answerer_input_container').find('input').val($('#answerer_ac_results').children('.ac_highlighted:first').text());
									} catch(err) { }
								}
								else {
									try {
										$('#answerer_ac_results').children('.ac_highlighted:first').next()[0].highlight();
										$('#answerer_input_container').find('input').val($('#answerer_ac_results').children('.ac_highlighted:first').text());
									} catch(err) { }
								}
							}
							$('#answerer_input_container').find('input').keydown(function(e) {
								if (e.keyCode == 13) {
									if ($('#answerer_ac_results').children('.ac_highlighted').length > 0) {
										$('#answerer_ac_results').children('.ac_highlighted')[0].choose();
										setTimeout("$('#answerer_input_container').find('input').blur(); $('.answerer_key').focus()",100);
										return false;
									}
									$('.answerer_submit').click();
									return false;
								}
								else if (e.keyCode == 38) { // up arrow
									$('#answerer_input_container')[0].go_up();
									return false;
								}
								else if (e.keyCode == 40) { // down arrow
									$('#answerer_input_container')[0].go_down();
									return false;
								}
							});
							$('#answerer_input_container').find('input')[0].last_typed_val = $('#answerer_input_container').find('input').val();
							$('#answerer_input_container').find('input').bind('keyup mouseover change', function(e) {
								if (e.type == 'keyup' && (e.keyCode == 13 || e.keyCode == 38 || e.keyCode == 40)) { return true; }
								// make answer text valid
								var _txt = $(this).val();
								 var _orig_txt = _txt;
								if (this.last_typed_val.toLowerCase() == _txt.toLowerCase()) { return true; }
								var _txt = _txt.replace(/[^a-zA-Z0-9' ,?]/g,'');
								// bonus: get rid of double spaces or double single quotes
								var _txt = _txt.replace(/[ ]+/g,' ');
								var _txt = _txt.replace(/[']+/g,"'");
								if (_txt !== _orig_txt) {
									$(this).val(_txt);
								}
								if (jQuery.trim(_txt) == '') {
									$('#answerer_ac_results').html('');
									this.last_typed_val = '';
								}
								else if (this.last_typed_val.toLowerCase() !== _txt.toLowerCase()) {
									this.last_typed_val = _txt;
									AC_AJAX_NUM = AC_AJAX_NUM + 1;
									$.get('http://' + document.domain + '/qa_service?&function=answerer_ac&j=' + _jstr + '&str=' + encodeURIComponent(_txt) + '&ajax_num_echo=' + AC_AJAX_NUM, function(data) {
										var _s = this.url.split('=');
										var _ajax_num_echo = _s[_s.length-1] - 0;
										var _imp = $('#answerer_input_container').find('input')[0];
										if (_ajax_num_echo >= AC_AJAX_NUM && jQuery.trim($(_imp).val()) !== '') { 
											$('#answerer_ac_results').html(data);
											$('#answerer_ac_results').children('.ac_result').each(function() {
												$(this).css('cursor','pointer');
												this.is_highlighted = 0;
												this.highlight = function() { $(this).addClass('ac_highlighted'); $(this).siblings('.ac_result').each(function() { this.unhighlight() }); $(this).css('background','#e0e5ff'); this.is_highlighted = 1; }
												this.unhighlight = function() { $(this).removeClass('ac_highlighted'); $(this).css('background','none'); this.is_highlighted = 0; }
												this.choose = function() { $('#answerer_input_container').find('input')[0].ac_populate($(this).text()); }
												$(this).mousedown(function() {
													this.choose();
												});
												$(this).mouseover(function() {
													this.highlight();
												});
												$(this).mouseout(function() {
													this.unhighlight();
												});
											});
										}
									});
								}
							});
							$('#answerer_input_container').find('input')[0].ac_populate = function(txt) {
								$(this).val(txt);
								this.last_typed_val = txt;
								$('#answerer_ac_results').children('.ac_result').each(function() {
									this.unhighlight();
								});
							}
							setTimeout("$('#answerer_input_container').find('input').focus();",180);
						}
						else {
							alert('Unknown answer type "' + _answer_type + '"');
						}
					});
				}
				$('.answerer_submit').click(function() {
					var _s = this.href.split('=');
					var _question_jstr = _s[_s.length-1];
					var _key = $('.answerer_key').val();
					var _answer_format = 'standard';
					  if ($(this).hasClass('answerformat_short')) {
						var _answer_format = 'short';
					  }
					var _answer_type = 'text';
					  if ($(this).hasClass('answertype_autocomplete')) {
						var _answer_type = 'autocomplete';
					  }
					  else if ($(this).hasClass('answertype_multiple_choice')) {
						var _answer_type = 'multiple_choice';
					  }
					if (_answer_type == 'multiple_choice') {
						var _txt = '';
						$('#answerer_input_container').find('select').find('option').each(function() {
							if (this.selected == true) {
								_txt = $(this).text();
								return false;
							}
						});
						if (_txt == '') {
							var _txt = $('#answerer_input_container').find('select:first').find('option').text();
						}
					}
					else {
						var _txt = $('#answerer_input_container').find('input').val();
					}
					if (jQuery.trim(_txt) == '') {
						// answer must not be blank
						alert('Type something first!');
						return false;
					}
					else if (_answer_type == 'autocomplete') {
						LOWERCASE_VALUE = jQuery.trim(_txt.toLowerCase());
						ANSWER_DOES_MATCH_AC_RESULTS = 0;
						$('#answerer_ac_results').children('.ac_result').each(function() {
							var _test_against_lowercase_value = jQuery.trim($(this).text().toLowerCase());
							if (_test_against_lowercase_value == LOWERCASE_VALUE) {
								ANSWER_DOES_MATCH_AC_RESULTS = 1;
								return false;
							}
						});
						if (ANSWER_DOES_MATCH_AC_RESULTS !== 1) {
							var c = confirm('The answer you typed does not match anyone else\'s answer.\n\nIs this okay?');
							if (c == false) {
								setTimeout("$('#answerer_input_container').find('input').focus()",100);
								return false;
							}
						}
					}
					$.get(this.href + '&answer=' + encodeURIComponent(_txt) + '&key=' + _key + '&answer_format=' + _answer_format + '&jstr_echo=' + _question_jstr, function(data) {
						// take user to feed, which will start with their answer.
						window.location = 'http://' + document.domain + '/';
						$('.answerer_container').remove();
					});
					return false;
				});
				setTimeout("$('.answerer').fadeIn(240);",120);
				return false;
			});
		});
		if ($(this).hasClass('question_hoverable')) {
			var _s = this.id.split('-');
			this.idnum = _s[_s.length-1];
			this.target_user_id = 0;
			this.target_user_name = '';
			var _targs = $(this).find('.target_user_id');
			if (_targs.length > 0) {
				this.target_user_id = $(_targs[0]).html();
				this.target_user_name = $($(this).find('.target_user_name')[0]).html();
			}
			$(this).hover(
			  function() { // Mouse Goes Over
				this.mouse_is_over = 1;
				$(this).css('background','#e0e5ff');
				var _cushion = 8;
			  	var _width = 240;
			  	var _height = 240;
				var _left = 0;
				var _top = 0;
				var _offset = $(this).offset();
				  if ($(this).hasClass('question_hoverable_reverse')) {
					var _cushion = _cushion + 2;
					_offset.left = _offset.left + $(this).width() + _cushion - $(window).scrollLeft();
					_offset.top = _offset.top - $(window).scrollTop();
				  }
				  else {
					_offset.left = _offset.left - _width - _cushion - $(window).scrollLeft();
					_offset.top = _offset.top - $(window).scrollTop();
				  }
				if (_offset.top + _height + _cushion < $(window).height()) {
					var _top = _offset.top;
				}
				else {
					var _top = $(window).height() - _height - _cushion;
				}
				if (_offset.left + _width + _cushion < $(window).width()) {
					var _left = _offset.left;
				}
				else {
					var _left = $(window).width() - _width - _width - _cushion;
				}
				$('.hoverer').hide();
				$(document.body).append('<div class="hoverer" id="hoverer:' + this.id + '" style="position:fixed; padding-right:' + (_cushion+8) + 'px; left:' + _left + 'px; top:' + _top + 'px; width:' + _width + 'px; min-height:' + _height + 'px; z-index:1001;">\
				 <div class="hoverer_content" style="display:none; font-size:0.72em; background:#e0e5ff; border:1px solid #999; height:' + (_height-12) + 'px; overflow:auto;">\
					<div style="font-size:0.88em; margin:1.7em;">  <img src="http://iqtpi.com/?&o=608&f=routine-2134" border="0" style="height:1em;; ">  hangonnasecond...</div>\
				 </div>\
				</div>');
				var _hoverer = document.getElementById('hoverer:' + this.id);
				_hoverer.compadre = this;
				this.compadre = _hoverer;
				$(this.compadre).find('.hoverer_content').slideDown(210);
				$(this.compadre).hover(
				  function() { this.mouse_is_over = 1; },
				  function() {
					this.mouse_is_over = 0;
					setTimeout("try{if (document.getElementById('" + this.id + "').compadre.mouse_is_over !== 1) {\
						$(document.getElementById('" + this.compadre.id + "')).css('background','none');\
						$(document.getElementById('" + this.id + "')).remove();\
					}}catch(err){}",500);
				  }
				);
				_idnum = this.idnum;
				$(this.compadre).find('.hoverer_content').load('http://' + document.domain + '/qa_service?&j=/question-' + _idnum + '&function=question_facts&target_user_id=' + encodeURIComponent(this.target_user_id) + '&target_user_name=' + encodeURIComponent(this.target_user_name), function(data) {
					activate_questions();
				});
			  },
			  function() { // Mouse Goes Out
				this.mouse_is_over = 0;
				setTimeout("try{if (document.getElementById('" + this.id + "').compadre.mouse_is_over !== 1) {\
					$(document.getElementById('" + this.compadre.id + "')).remove();\
					$(document.getElementById('" + this.id + "')).css('background','none');\
				}}catch(err){}",500);
			  }
			);
		}
		activate_answers(this);
		activate_delete_links(this);
	});
}


function activate_answers(el) {
	if (!el) { var el = document.body; }
	$(el).find('.answer').each(function() {
		if (this.is_answer == 1) { return true; }
		this.is_answer = 1;
		activate_delete_links(this);
	});
}


function activate_delete_links(el) {
	if (!el) { var el = document.body; }
	$(el).find('.delete_link').each(function() {
	  if (this.is_delete_link == 1) { return true; }
	  this.is_delete_link = 1;
	  $(this).click(function() {
		// each delete link is within a parent container called "otype-idnum"; the delete link itself should be called "delete:otype-idnum".
		var pElId = this.id.replace('delete:','');
		var c = confirm('Really delete?  There is no undo.');
		if (c == true) {
			var _s = pElId.split('-');
			var otype = _s[0];
			var idnum = _s[1];
			$.post('http://' + document.domain + '/?&siteformat=xml&elId=' + pElId, {'1_posttype':'delete','1_orb':otype,'1_where':otype + '.id = ' + idnum}, function(data) {
				var _s = this.url.split('=');
				var el = document.getElementById(_s[_s.length-1]);
				 var spacer_id = el.id + '-spacer';
				$(el).slideUp(360);
				 try { $('#' + spacer_id).hide(); } catch(err) {}
				// how many records now match?
				var _n = document.getElementById('num_records');
				if (_n !== null) {
					var num_records = $(_n).html();
					var num_records = num_records - 1;
					if (num_records == 1) {
						var _txt = "Result";
					}
					else {
						var _txt = "Results";
					}
					$(_n).html(num_records);
					$('#records_match').html(_txt);
				}
			});
		}
		return false;
	  });
	});
}




function activate_radio_containers() {
	$('.radio_container').each(function() {
		style_radio_container(this);
		$(this).find('input.radio').bind('change blur click', function(e) {
			if (e.type == 'click') {
				this.checked = true;
				e.stopPropagation();
			}
			$($(this).parents('.radio_container')[0]).siblings('.radio_container').each(function() {
				style_radio_container(this);
			});
			style_radio_container($(this).parents('.radio_container')[0]);
		});
		$(this).click(function() {
			$(this).find('input.radio').click();
		});
		$(this).css('cursor','pointer');
	});
}

function style_radio_container(el) {
	if ($(el).find('input.radio')[0].checked == true) {
		$(el).css('background','#ff9');
	}
	else {
		$(el).css('background','white');
	}
}



function activate_wax(el) {
	if (!el) { var el = document.body; }
	$(el).find('.wax').each(function() {
		if ($(this).hasClass('wax_alert')) {
			this.wax_color = '#ffb';
		}
		else if ($(this).hasClass('wax_maybe')) {
			this.wax_color = '#e2ffda';
		}
		else if ($(this).hasClass('wax_hot')) {
			this.wax_color = '#ffeedc';
		}
		else {
			this.wax_color = '#dae3ff';
		}
		$(this).hover(
		  function() {
			this.is_over = 1;
			wax(this.wax_color);
		  },
		  function() {
			this.is_over = 0;
			setTimeout("unwax()",360);
		  }
		);
	});
}
function wax(color) {
	$(document.body).animate({"backgroundColor":color},428);
}
function unwax() {
	var _any_wax_over = 0;
	$('.wax').each(function() {
		if (this.is_over == 1) {
			_any_wax_over = 1;
			return false;
		}
	});
	if (_any_wax_over == 0) {
		$(document.body).animate({"backgroundColor":"#fff"},90);
	}
}


function activate_slideys() {
	$('.slidey').hover(
	  function () { $(this).children('.slidey_slide').slideDown(210); },
	  function () { $(this).children('.slidey_slide').slideUp(90); }
	);
}




function activate_reaskers(el) {
	if (!el) { var el = document.body; }
	$(el).find('.reasker').click(function() {
		var _s = this.href.split('=');
		 var _reask = _s[_s.length-1];
		var _title = $(this).next('span').text();
		var _question_id = $(this).next('span').next('span').text();
		$(document.body).append('<div class="reasker_container" style="position:fixed; left:0px; top:0px; width:100%; height:100%; z-index:1001;">\
		  <div class="reasker_bg" style="position:absolute; left:0px; top:0px; width:100%; height:100%; background:#69e; opacity:0.4; filter:alpha(opacity=40); z-index:1;"></div>\
		  <div class="reasker" style="position:absolute; display:none; width:44%; min-height:40%; padding:2%; left:26%; top:10%; background:white; z-index:2;">\
			<h3>' + _title + '</h3>\
			<div id="reasker_content" style="margin-bottom:1em; margin-left:1em;">\
				<div style="padding:5px;">  <img src="http://iqtpi.com/?&o=608&f=routine-2134" border="0" style="height:1em;; height:1em;"> </div>\
			</div>\
			<div align="right">\
			  <a onclick="setTimeout(&quot;$(\'.reasker_container\').remove()&quot;,10); return false;" href="#">Cancel</a>\
			   | \
			  <a class="reasker_submit" href="http://' + document.domain + '/qa_service?&function=reask&reask=' + _reask + '&question_id=' + _question_id + '&question_title=' + encodeURIComponent(_title) + '"><b>Ask This Question</b></a>\
			</div>\
		  </div>\
		</div>');
		$('#reasker_content').load('http://' + document.domain + '/qa_service?&function=reask_html&reask=' + _reask);
		setTimeout("$('.reasker').fadeIn(240);",120);
		return false;
	});
}  