﻿$jq(document).ready(function() {
	$jq('.ajaxGeo').each(function() {
		var countryList = $jq('.countryPane SELECT', this);
		var stateList = $jq('.statePane SELECT', this);
		var cityList = $jq('.cityPane SELECT', this);
		var postalField = $jq('.postalPane INPUT', this);
		
		var geo = new MatchCore.AjaxGeo();
		geo.init({
			"countryList" : (countryList.length > 0) ? countryList[0] : null,
			"stateList" : (stateList.length > 0) ? stateList[0] : null,
			"cityList" : (cityList.length > 0) ? cityList[0] : null,
			"postalField" : (postalField.length > 0) ? postalField[0] : null
		});
		
		geo.render();
	});
});