$(document).ready(function () {
    $("#slider_body").easySlider({
        auto: true,
        continuous: true,
        controlsShow: true,
        speed: 	500,
        pause:	7000,
		numeric: true
    });
	
	focusing($("input[name='search']"), 'Αναζήτηση');
	
});

//GoogleMap function
 function GoogleMap(divid, address, label)
{
       geocoder = new google.maps.Geocoder();
       var latlng = new google.maps.LatLng(-34.397, 150.644);
       var myOptions = {
         zoom: 15,
         center: latlng,
         mapTypeId: google.maps.MapTypeId.ROADMAP
       }
       map = new google.maps.Map(document.getElementById(divid), myOptions);

       geocoder.geocode( { 'address': address }, function(results, status) {
         if (status == google.maps.GeocoderStatus.OK) {
               map.setCenter(results[0].geometry.location);
               var marker = new google.maps.Marker({
                       map: map,
                       position: results[0].geometry.location,
                       animation: google.maps.Animation.DROP,
                       title:""
               });

               var infowindow = new google.maps.InfoWindow({
                       content: label,
               });

               google.maps.event.addListener(marker, 'click', function() {
                 infowindow.open(map,marker);
               });

         } else {
               $("#"+divid).hide();
         }
       });
}

function focusing(element, text)
{
	element.focus(function () {
		$(this).val('');
	});
	
	element.focusout(function () {
		if($(this).val()=="")
			$(this).val(text);
	});
}

