if (typeof (menulogUniqId) == 'undefined') {
	var menulogUniqId = Math.floor (Math.random () * 100000000000);
	var menulogDefaultPostcodeText = 'Your suburb / postcode';
	var menulogDomainName = 'mumsdelivery.menulog.com.au';

	// load jquery if it's not currently available
	// load gsuggest if it's not currently available
	document.write ('<script type="text/javascript" src="http://' + menulogDomainName + '/javascript/jquery/jquery-1.4.2.gsuggest.for_external_sites.min.js"></script>\n');	

	// load the stylesheet needed for the suggestion popover
	document.write ('<link rel="StyleSheet" href="http://' + menulogDomainName + '/styles/jquery/jquery.gcomplete.menulog-theme.mums_delivery.css" type="text/css" />\n');
}





// display the form
document.write ('<div class="menulog">\n');
document.write ('	<div class="box">\n');
document.write ('		<div class="title">\n');
document.write ('		</div>\n');
document.write ('		<div class="content">\n');
document.write ('			<p>Get food delivered to your home or office from over 1000 restaurants Australia wide:</p>\n');

document.write ('			<form action="http://' + menulogDomainName + '/search.php" method="GET" target="_BLANK">\n');
document.write ('				<input name="searchMode" value="takeaway" type="hidden" />\n');
document.write ('				<input name="submit2" value="T" type="hidden" />\n');

document.write ('				<input id="cartType_delivery" type="radio" checked="checked" value="delivery" name="cartType" class="radio" />\n');
document.write ('				<label for="cartType_delivery">Delivery</label>\n');

document.write ('				<input id="cartType_pickUp" type="radio" value="pickUp" name="cartType" class="radio" />\n');
document.write ('				<label for="cartType_pickUp">Pick Up</label>\n');
document.write ('				<div class="contentEnd"></div>\n');

document.write ('				<input id="postcode' + menulogUniqId + '" type="text" name="postcode" value="' + menulogDefaultPostcodeText.replace ('"', '\\"') + '" class="searchTextBox" autocomplete="off" />\n');
document.write ('				<input type="submit" value="Search" class="submitButton" />\n');
document.write ('				<div class="contentEnd"></div>\n');
document.write ('				<br/>&gt; Over 1 million meals delivered<br/>&gt; Free to use<br/>&gt; Get instant confirmation\n');
document.write ('				<div class="contentEnd"></div>\n');
document.write ('			</form>\n');

document.write ('		</div>\n');
document.write ('	</div>\n');
document.write ('</div>\n');



// initialize the javascript on the page
var initPage = function (menulogDomainName2, menulogUniqId2) {
	// make the postcode field default text appear/disappear
	jQueryMenulog ("#postcode" + menulogUniqId2).focus (function () { if (jQueryMenulog (this).val () == menulogDefaultPostcodeText.replace ('"', '\\"')) jQueryMenulog (this).val ("") });
	jQueryMenulog ("#postcode" + menulogUniqId2).blur (function () { if (jQueryMenulog (this).val () == "") jQueryMenulog (this).val (menulogDefaultPostcodeText.replace ('"', '\\"')) });

	// give the postcode field it's suggestion ability
	jQueryMenulog ("#postcode" + menulogUniqId2).gcomplete ({
		url: "http://" + menulogDomainName2 + "/ajax_update_suburb_suggest3.php",
		style: "menulog",
		effect: true,
		limit: 15
	});
}

var init = function (init, menulogDomainName, menulogUniqId) {
	if (typeof (jQueryMenulog) != 'undefined')
		setTimeout ((function (menulogDomainName, menulogUniqId) { return function () { initPage (menulogDomainName, menulogUniqId); }} ) (menulogDomainName, menulogUniqId), 50);
	else
		setTimeout ((function (init, menulogDomainName, menulogUniqId) { return function () { init (init, menulogDomainName, menulogUniqId); }} ) (init, menulogDomainName, menulogUniqId), 250);
}
init (init, menulogDomainName, menulogUniqId);

