$(document).ready(function(){$("a[rel=popupForm]").click(function(){$(this).append('<div id="dialog"><iframe id="theFrame" width=100% height=100% frameborder=0 scrolling=no tabindex=-1 src="'+$(this).attr("href")+'"></iframe></div>');$("#dialog").dialog({autoOpen:false,width:535,height:500,modal:true,draggable:true,resizable:true,close:function(a,b){$("#theFrame").attr("src","");$("#dialog").remove()}});$("#dialog").dialog("open");return false});$("a[rel=popupFormAddress]").live("click",function(){$(this).append('<div id="dialog"><iframe id="theFrame" width=100% height=100% frameborder=0 scrolling=no tabindex=-1 src="'+$(this).attr("href")+'"></iframe></div>');$("#dialog").dialog({autoOpen:false,width:535,height:410,modal:true,draggable:true,resizable:true,close:function(a,b){$("#theFrame").attr("src","");$("#dialog").remove()}});$("#dialog").dialog("open");return false});$("a[rel=popupFormContact]").live("click",function(){$(this).append('<div id="dialog"><iframe id="theFrame" width=100% height=100% frameborder=0 scrolling=no tabindex=-1 src="'+$(this).attr("href")+'"></iframe></div>');$("#dialog").dialog({autoOpen:false,width:535,height:545,modal:true,draggable:true,resizable:true,close:function(a,b){$("#theFrame").attr("src","");$("#dialog").remove()}});$("#dialog").dialog("open");return false});$("a[rel=popupSearchForm]").live("click",function(){$(this).append('<div id="dialog"><iframe id="theFrame" width=100% height=100% frameborder=0 scrolling=no tabindex=-1 src="'+$(this).attr("href")+'"></iframe></div>');$("#dialog").dialog({autoOpen:false,width:600,height:450,modal:true,draggable:true,resizable:true,buttons:{Select:function(){if(document.getElementById("theFrame").contentWindow.Save()){$("#dialog").dialog("close")}}},close:function(a,b){$("#theFrame").attr("src","");$("#dialog").remove()}});$("#dialog").dialog("open");return false})});
