/*****************************************************************************************
 * DESC:    Jquery code to perform AJAX calls for State fields depending on Country
 * DATE:    11/8/2008
 * BY:      Consolidated Marketing Services 
 *          Ed Orsini 
 ****************************************************************************************/

		$(function(){
			$("select#selectCountry").change(function(){
				  
          $.getJSON("http://catalog.cmsassociates.com/daymon_dev/javascript/select.php",{id: $(this).val()}, function(j){
					var options = '';
					for (var i = 0; i < j.length; i++) {
						options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
					}
					$("#selectState").html(options);
					$('#selectState option:first').attr('selected', 'selected');
				})
			})			
		})

