$(document).ready(function(){
    if (window.location.href.toLowerCase().indexOf('contact')>=0){
        $("body").load(initialize());
    }
    $("fieldset li:odd").addClass("odd-item");
				$(".list .list-items li:nth-child(3n)").css({marginRight: 0});
    $("fieldset li:last-child").addClass("last-item");
				$(".download-map a:first").addClass("active");
				$(".download-map .map-canvas").html('<a href="'+$(this).attr("rel")+'"><img src="'+$(".download-map a:first").attr("href")+'" alt="" /></a>');
				$(".download-map a").click(function(){return false});
				$(".download-map a.loc-dxb,.download-map a.loc-auh").hover(function(){
				 $(".download-map a").removeClass("active");
				 $(this).addClass("active");
					$(".download-map .map-canvas").html('<a href="'+$(this).attr("rel")+'"><img src="'+$(this).attr("href")+'" alt="" /></a>');
				},function(){
				})
				$(".homepage-listing").append('<div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>')
				$(".homepage-listing .list-items").wrap("<div class='viewport' />");
				$(".homepage-listing .list-items").wrap("<div class='overview' />");
				$('.homepage-listing').tinyscrollbar({ axis: 'x',sizethumb: 66});	
				$(".list .list-items li .article-header").append('<div class="hover-div" />');
				$(".list .list-items li").hover(function(){
				 var content = $(this).find(".content p").html();
					$(this).find(".hover-div").html(content).show();
				},function(){
				 $(this).find(".hover-div").hide(); 
				})
    Cufon.replace("h1,h2,h3,.menu li a",{fontFamily: 'NudistaSemiBold',hover: true});
  });

				function initialize() {
					var dubai = new google.maps.LatLng(25.101125,55.168469);
					var myOptions1 = {
							zoom: 10,
							center: dubai,
							mapTypeId: google.maps.MapTypeId.ROADMAP
					}
					var infowindow1 = new google.maps.InfoWindow({
					content: "<h4>Head Office</h4> <p>PO Box 108800 Abu Dhabi - UAE <br />Phone +971 (0)2 501 8383<br />Fax +971 (0)2 501 8484</p>"
			});
    var map = new google.maps.Map(document.getElementById("googleMap"), myOptions1);    
    var marker = new google.maps.Marker({
        position: dubai, 
        map: map
    }); 

				google.maps.event.addListener(marker, 'click', function() {
					infowindow1.open(map,marker);
			});
  }
