// JavaScript Document

droplinemenu.buildmenu("droplinetabs1");

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
    	wrap: 'circular',
		auto: 5,
		scroll: 1,
		animation: "slow",
		buttonNextHTML: null,
		buttonPrevHTML: null
    });
});

  function initialize() {
    var myLatlng = new google.maps.LatLng(44.474354,26.111948);
    var myOptions = {
      zoom: 14,
      center: myLatlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	
	setMarkers(map, beaches);
  }
  
   var beaches = [
        ['Ara Software Group', 44.474454, 26.111448, 4]
    ];

    var markers = [];

    function setMarkers(map, locations) {
        // Add markers to the map

        // Marker sizes are expressed as a Size of X,Y
        // where the origin of the image (0,0) is located
        // in the top left of the image.

        // Origins, anchor positions and coordinates of the marker
        // increase in the X direction to the right and in
        // the Y direction down.
        var image = new google.maps.MarkerImage("media/ara_software.png",
            // This marker is 20 pixels wide by 32 pixels tall.
            new google.maps.Size(148, 40),
            // The origin for this image is 0,0.
            new google.maps.Point(0, 0),
            // The anchor for this image is the base of the flagpoleat 0,32.
            new google.maps.Point(6, 32),
            // set scaledSize:
            new google.maps.Size(148, 40));


        // Shapes define the clickable region of the icon.
        // The type defines an HTML <area> element 'poly' which
        // traces out a polygon as a series of X,Y points. The final
        // coordinate closes the poly by connecting to the first
        // coordinate.
        var shape = {
            coord: [1, 1, 1, 20, 18, 20, 18, 1],
            type: 'poly'
        };
        for (var i = 0; i < locations.length; i++) {
            var beach = locations[i];
            var myLatLng = new google.maps.LatLng(beach[1], beach[2]);
            var marker = new google.maps.Marker({
                position: myLatLng,
                map: map,
                // shadow: shadow,
                icon: image,
                shape: shape,
                title: beach[0],
                zIndex: beach[3]
            });
            markers[i] = marker;
        }
    }
  
  
  function loadScript() {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initialize";
    document.body.appendChild(script);
  }
  
  window.onload = loadScript;
