﻿/// <reference path="../../../vendor/jquery/jquery-1.3.2.custom.js"/>

showExternalSearchWindow = function(e, callback)
{
	var link = $(this);
	var $url = $(link).attr("href");
	$.post($url, function(data)
	{
		var $dialog = $(".dialog", data);
		$(".externalSourceLink", $dialog).click(function()
		{
			$(".externalSourceIframe", $dialog).attr("src", $(this).attr("href"));
			return false;
		});
		$dialog.dialog(getDialogOptions({ width: 1200, autoOpen: true, resizable: true, close: function() { $dialog.dialog("destroy").remove(); } }));

		$("#externalSearch1", $dialog).click();
		callback();
	});
	return false; //don't follow the href of the link
}

