function initialize(){var latlng=new google.maps.LatLng(52.632815,-1.09754);var myOptions={zoom:16,navigationControl:true,scaleControl:true,center:latlng,mapTypeId:google.maps.MapTypeId.ROADMAP};var map=new google.maps.Map(document.getElementById("map"),myOptions);var image=new google.maps.MarkerImage('http://www.leoproperties.com/wp-content/themes/custom/images/map/image.png',new google.maps.Size(50,50),new google.maps.Point(0,0),new google.maps.Point(25,50));var shadow=new google.maps.MarkerImage('http://www.leoproperties.com/wp-content/themes/custom/images/map/shadow.png',new google.maps.Size(78,50),new google.maps.Point(0,0),new google.maps.Point(25,50));var shape={coord:[32,1,34,2,36,3,38,4,39,5,41,6,42,7,43,8,44,9,44,10,45,11,46,12,46,13,47,14,47,15,48,16,48,17,48,18,49,19,49,20,49,21,49,22,49,23,49,24,49,25,49,26,49,27,49,28,49,29,49,30,48,31,48,32,48,33,47,34,47,35,46,36,46,37,45,38,45,39,44,40,43,41,42,42,41,43,40,44,39,45,37,46,35,47,33,48,17,48,14,47,12,46,11,45,10,44,8,43,7,42,6,41,6,40,5,39,4,38,4,37,3,36,3,35,2,34,2,33,1,32,1,31,1,30,1,29,1,28,1,27,1,26,1,25,1,24,1,23,1,22,1,21,1,20,1,19,1,18,2,17,2,16,2,15,3,14,3,13,4,12,5,11,5,10,6,9,7,8,8,7,9,6,10,5,12,4,13,3,15,2,18,1,32,1],type:'poly'};var marker=new google.maps.Marker({draggable:false,raiseOnDrag:false,icon:image,shadow:shadow,shape:shape,map:map,position:latlng});}
var index=0;var timer;function next_banner(){$("#billboard ul a:eq(1)").trigger('click');}
$(function(){var normal_height=$(".home div.centre:eq(1)").height();$(".home div.centre:eq(1)").css({height:"390px",overflow:"hidden"});$(".home div.centre:eq(1)").append('<a id="more" href="#" title="Read more about Leo Properties">more</a>');$("#more").toggle(function(){$(".home div.centre:eq(1)").animate({height:normal_height});$('html, body').animate({scrollTop:normal_height},800);$("#more").text("close");},function(){$(".home div.centre:eq(1)").animate({height:"390px"});$('html, body').animate({scrollTop:0},800);$("#more").text("more");});$("#billboard").hover(function(){clearInterval(timer);$("#billboard ul").stop('true','true').fadeIn();},function(){timer=setInterval("next_banner()",3000);$("#billboard ul").stop('true','true').fadeOut();});var position=$("#scroller").position();var current_ad=0;$("#billboard ul a").click(function(){index=$("#billboard ul a").index(this);if(index==0){if(current_ad>0){current_ad--;$("#scroller").animate({left:-(940*current_ad)},750,'easeInOutQuad');}}else{if(current_ad<2){current_ad++;$("#scroller").animate({left:-(940*current_ad)},750,'easeInOutQuad');}else{current_ad=-1;}}});timer=setInterval("next_banner()",3000);$("#alt_nav a").hover(function(){index=$("#alt_nav a").index(this);$("#alt_nav img:eq("+index+")").stop('true','true').animate({left:'-10'},'750','easeInOutQuart');$("#alt_nav span:eq("+index+")").stop('true','true').animate({top:'20'},'750','easeInOutQuart');},function(){$("#alt_nav img").stop('true','true').animate({left:0},'750','easeInOutQuart');$("#alt_nav span").stop('true','true').animate({top:'33'},'750','easeInOutQuart');});$("#new_developments section").hide();$("#new_developments h2").css('margin-bottom','10px');$("#new_developments h2 a").toggle(function(){index=$("#new_developments h2 a").index(this);$("#new_developments section:eq("+index+")").slideDown('750','easeInOutQuart');$("#new_developments h2:eq("+index+")").css('margin-bottom','0');$("#new_developments h2 a:eq("+index+")").addClass('active');},function(){index=$("#new_developments h2 a").index(this);$("#new_developments section:eq("+index+")").slideUp('750',function(){$("#new_developments h2:eq("+index+")").css('margin-bottom','10px');$("#new_developments h2 a:eq("+index+")").removeClass('active');});});});
