$(function(){$.xLazyLoader({css:"http://www.wigan.gov.uk/pub/scripts/theme/ui.all.css",js:"http://www.wigan.gov.uk/pub/scripts/jquery-ui-1.7.dialogueonly.min.js",load:function(){var A;A='<div id="dialog" style="display: none;" title="Committed to buying local">\n';A+='<form name="Committed" id="Committed" method="post" action="http://kinnear.wiganmbc.gov.uk/forms/sendinter.asp">\n';A+='<input name="0To" type="hidden" value="tcm@wigan.gov.uk">\n';A+='<input type="hidden" name="0Subject" value="Committed to buying local">\n';A+='<input type="hidden" name="0Reply" value="index.htm">\n';A+='<div id="txtInp_bName_id0_Wrap"> I\n';A+='<label style="display: none;" for="txtInp_bName_id0">Your Name</label>\n';A+='<input type="text" id="txtInp_bName_id0" name="bName">\n';A+="* am committed to shopping locally wherever possible so that together we can help protect our borough from the worst effects of these difficult economic times. </div>\n";A+="<div>\n";A+="<p> If you would like to be contacted about this scheme please leave your email address below.</p>\n";A+="<span>\n";A+='<label for="txtInp_cEmail_id0">Your Email: </label>\n';A+="</span> <span>\n";A+='<input type="text" id="txtInp_cEmail_id0" name="cEmail">\n';A+="</span> </div>\n";A+="</form>\n";A+="</div>\n";$("body").append(A);$("#dialog").dialog({resizable:false,autoOpen:false,modal:true,width:500,buttons:{"Submit Your Pledge":function(){if($("#txtInp_bName_id0").val()===""){alert("Please fill in your name in the box marked '*'.")}else{var C;C=$("#Committed :input").serializeArray();var B;B="http://www.wigan.gov.uk/Pub/Forms/sendinter.asp";$.post(B,C,function(D){$("#dialog").dialog("close");$("#dialog").html("Thank you for submitting your pledge.");$("#dialog").dialog("option","buttons",{Close:function(){$(this).dialog("close");A='<form name="Committed" id="Committed" method="post" action="http://kinnear.wiganmbc.gov.uk/forms/sendinter.asp">\n';A+='<input name="0To" type="hidden" value="tcm@wigan.gov.uk">\n';A+='<input type="hidden" name="0Subject" value="Committed to buying local">\n';A+='<input type="hidden" name="0Reply" value="index.htm">\n';A+='<div id="txtInp_bName_id0_Wrap"> I\n';A+='<label style="display: none;" for="txtInp_bName_id0">Your Name</label>\n';A+='<input type="text" id="txtInp_bName_id0" name="bName" tabindex="1">\n';A+="* am committed to shopping locally wherever possible so that together we can help protect our borough from the worst effects of these difficult economic times. </div>\n";A+="<div>\n";A+="<p> If you would like to be contacted about this scheme please leave your email address below.</p>\n";A+="<span>\n";A+='<label for="txtInp_cEmail_id0">Your Email: </label>\n';A+="</span> <span>\n";A+='<input type="text" id="txtInp_cEmail_id0" name="cEmail" tabindex="2">\n';A+="</span> </div>\n";A+="</form>\n";$("#dialog").html(A)}});$("#dialog").dialog("open").focus()})}}}});$("#PledgeSupport").click(function(){$("#dialog").dialog("open").focus();return false})}})});