var geoXml;
var showSurvey=true;
$(document).ready(function(){
	geoXml = new GGeoXml("http://www.southsidehealth.org/pilotstudy_communities.kmz");
	$("ul#catset").before($("<button>").attr('id','sbb').html("show borders").toggle(function(){map.addOverlay(geoXml);$(this).html("hide borders");}, function(){map.removeOverlay(geoXml);$(this).html("show borders");}));
	$('#sbb').click();
	$("#notice").corner();
	$("#cmap div.ui-resizable-e").dblclick( function(){ var b=$('#cmap'); b.css("width",b.css("width")=="500px"?"auto":"500px"); map.checkResize(); } );
	//$("#handlebar").dblclick( function(){ var b=$('#cmap'); b.css("width",b.css("width")=="500px"?"auto":"500px"); map.checkResize(); } )
	//$("#ins").before($("<div>").attr("id","under-construction").html("We launched this site in <u><strong>an early stage of development</strong></u> knowing it needs improvement.  Please give us feedback using this <a id='survey' href='#'>short survey</a>.  Thank you!"));
	$("#foobar").before($("<div>").attr("id","under-construction").html("We are building this site with your help. Please take this <a id='survey' href='#'>brief survey</a>."));
	$("#under-construction").corner();
	//$("#ins ol").prepend("We have intentionally launched this site in an <u><strong>early stage of development</strong></u> in order to obtain feedback from users.  Please take a minute to <a id='survey' href='#'>complete this short survey</a>.  Thank you");
	$("a#survey").click(function(){$("#the-survey").dialog("open"); showSurvey=false;});
	$("#under-construction").after($("<div>").attr('id','the-survey').html("<iframe src='http://www.surveymonkey.com/s/W8MNRXP'></iframe>"));
	$("#the-survey").dialog({width:800, height:1000, autoOpen: false, title:'Thank you for your feedback!'});
	//window.onbeforeunload = function(evt) { if(showSurvey){$("#the-survey").dialog("open");  return 'PRESS CANCEL TO TAKE OUR SURVEY BEFORE YOU LEAVE.';}}
	
	$("#lic").corner();
	$("#foobar").corner();
	
	
	
	
	// gcfd additions
	
	
	var temp=["This is the emergency food box program. Single and family boxes are distributed to individuals at DFSS (Chicago Department of Family and Support Services) sites and other community organizations.","Health Kids Markets are food pantries that operate out of schools serving all families of children at that particular school.  These programs are closed to families that have children attending these particular schools.","The Kids Cafe Program is an initiative of Feeding America and is administered locally by the Food Depository. The Food Depository distributes hot meals each day to after-school and summer programs in Cook County. Hot meals are prepared by Chicago's Community Kitchens (CCK), the Food Depository's foodservice training program for underemployed and unemployed adults. CCK works to create healthy, USDA-approved meals using the most nutritious ingredients, including brown rice, whole wheat flour and whole wheat pasta in its recipes. Kids Cafe program options include meal service on weekends and during the summer, so that children from low-income families have access to a free meal even when school is not in session. After-school and summer programs also provide tutoring assistance and educational activities.  Enrollment guidelines vary per Kids Cafes - some programs are open to the public and some are closed programs. If an individual is interested in locating a Kids Cafe near their home, please  contact the Food Depository's Programs Department at 773-843-2608.","The Mobile Pantry program, launched in 2007, distributes nonperishable food and perishable food to numerous sites each month. The Mobile Pantry brings food to targeted communities that have a high concentration of poverty. The program aims to serve working people by delivering food on nights and weekends—when food assistance typically is not available. Almost all of the MP sites are open to individuals residing in Cook County and are not restricted programs. Please refer to the Service Area description for details about specific MP sites.","Nourish for Knowledge is an afterschool \"backpack\" program that provides take-home bags of nutritious, ready-to-eat, shelf-stable food to schoolchildren in low-income neighborhoods.  Nourish for Knowledge ensures that children who are eligible for free and reduced-price meals at school have the nutritious food they need over the weekend.  These programs are closed to children attending these particular schools.","Food pantries. Some food pantries are open to the public, but some are closed programs - restricted to individuals enrolled in a specific program. Each food pantry also has a specific service area - meaning that the pantry is restricted to individuals residing within that area (e.g. zip codes, street boundary, etc.). Please see the Service Area and Program Description for details about specific food pantries.","Similar to the Mobile Pantry, the Producemobile (PM) is essentially a \"farmer's market on wheels\" The first Food Depository Producemobile was launched in 2001. The Food Depository's PM sites are open to individuals residing in Cook County and are not restricted programs. Please refer to the Service Area description for details about specific PM sites.","Programs for seniors include the Healthy Helpings program which provides seniors with frozen, low-sodium, nutritious individual meals prepared by the Food Depository's workforce development program, Chicago's Community Kitchen. The Food Depository also distributes fresh produce and boxes of nutritionally balanced, nonperishable food to seniors living in CHA and HUD residences. These are closed programs and are restricted to seniors residing in these particular residences.","Almost all shelters are closed programs that are restricted to specific individuals (e.g. based on gender, age, domestic violence victims, etc.).  Meals are served to all individuals staying at the shelter. Please see the Service Area and Program Description for details about specific shelters.","Soup kitchens provide individuals with a hot meal on site. Most soup kitchens are open to the public, but some have specific guidelines about who they serve and the service area - meaning that the soup kitchen is restricted to individuals residing within that area (e.g. zip codes, street boundary, etc.).  Please see the Service Area and Program Description for details about specific soup kitchens."];
	$("#sel16 li[id!=s16]").each(function(idx){$(this).attr("title",temp[idx])});

// move gcfd to top
$("#sel16").insertBefore("#sel01");	
});
