	var infowindow = null;
    
    $(document).ready(function () { initialize(); });

    function initialize()
    {

		var centerMap = new google.maps.LatLng(34.14,-118.28);

        var myOptions =
        {
            zoom: 10,
            center: centerMap,
            mapTypeId: google.maps.MapTypeId.TERRAIN
        }

        var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

        setMarkers(map, sites);
		infowindow = new google.maps.InfoWindow({
                content: "loading..."
            });
    }

    var sites =
    [
	
		['SILVER LAKE',		'Silver Lake',		34.093894,	-118.271598,	1,	'<a href=index.php?view=growers&id=1075><img src=media/usericon/1075.JPG border=0 height=40 width=40></a>&nbsp;<a href=index.php?view=growers&id=1078><img src=media/usericon/1078.JPG border=0 height=40 width=40></a>',	'Arugula Beets Carrots Cavolo Nero Collard Greens Curly Kale English Mint Green Onions Kale Lavender Leeks Lemon Thyme Lemon Verbena Nasturtium Oregano Radishes Roma Tomatoes Spinach Swiss Chard Tatsoi Cabbage Thyme'],
		['SANTA MONICA',	'Santa Monica',		34.021944,	-118.481389,	1,	'<a href=index.php?view=growers&id=1081><img src=media/usericon/1081.JPG border=0 height=40 width=40></a>',		'Apricots Avocados Bay Leaves Black Zapote Calmarna Figs Chambas Ginger Guavas Java Coffee Kona Coffee Macadamia Nuts Mints Navel Oranges Nectarines Persimmons Pitangas Plums Pomegranates Tangerines Valencia Oranges'],
		['LOS FELIZ',		'Los Feliz',		34.1124,	-118.2851,		1,	'<a href=index.php?view=growers&id=1054><img src=media/usericon/1054.JPG border=0 height=40 width=40></a>',		'Bay Leaves Blood Oranges Cherry Tomatoes Nagami Kumquats Parsley Rosemary'],
		['MONTROSE',		'Montrose',			34.225,		-118.236944,	1,	'<a href=index.php?view=growers&id=1079><img src=media/usericon/1079.JPG border=0 height=40 width=40></a>',		'Pattypan Squash'],
		['WEST COVINA',		'West Covina',		34.056667,	-117.918611,	1,	'<a href=index.php?view=growers&id=1080><img src=media/usericon/1080.JPG border=0 height=40 width=40></a>',		'Apricots Apriums Asian Pears Avocados Babcock White Peaches Blackberries Blueberries Chocolate Persimmons Corn Cucumbers Donut Peaches Edamame Figs Fuyu Malabar Spinach Mesclun Plums Pluots Pomegranate Radish Raspberries Snow Queen White Nectarines Strawberries'],
		['PASADENA',		'Pasadena',			34.156111,	-118.131944,	1,	'<a href=index.php?view=growers&id=1082><img src=media/usericon/1082.JPG border=0 height=40 width=40></a>',		''],
		['NORTH HOLLYWOOD',	'North Hollywood',	34.17222,	-118.37806,		1,	'<a href=index.php?view=growers&id=1083><img src=media/usericon/1083.JPG border=0 height=40 width=40></a>',		'Broccoli Carrots Dill Flat Leaf Parsley Leeks Mint Onion Purple Basil Snap Peas Spinach Swiss Chard'],
		['WINNETKA',		'Winnetka',			34.208333,	-118.575278,	1,	'<a href=index.php?view=growers&id=1084><img src=media/usericon/1084.JPG border=0 height=40 width=40></a>',		'Almonds Apples Avocados Baby Beet Greens Cucumber Endive Figs Italian Pumpkin Mulberry Olives Passionfruit Peppers Persimmon Pineapple Guava Pomegranates'],
		['HIGHLAND PARK',	'Highland Park',	34.11194,	-118.19806,		1,	'<a href=index.php?view=growers&id=1085><img src=media/usericon/1085.JPG border=0 height=40 width=40></a>',		'Beets Bitter Melon Bok Choy Fava Beans Guavas Italian Eggplant Key Limes Lacinato Kale Lettuce Radishes Rutabagas Shelling Peas Snow Peas Swiss Chard Tomatillos Turnips']
	
	];

    function setMarkers(map, markers)
    {
        for (var i = 0; i < markers.length; i++)
        {
			var image = 'neighborhood.png';
            var sites = markers[i];
            var siteLatLng = new google.maps.LatLng(sites[2], sites[3]);
            var marker = new google.maps.Marker({
                position: siteLatLng,
                map: map,
                icon: image,
                title: sites[1],
                zIndex: sites[4],
                html: "<div style='width: 240px;'><div class=map_text>" + sites[6] + "</div></div>"
            });

            google.maps.event.addListener(marker, "click", function ()
            {
                infowindow.setContent(this.html);
                infowindow.open(map, this);
            });
        }
    }
