$(document).ready(function(){$('#slides').cycle({fx:'fade',timeout:2000});map_it();popEquiryForm();sendMail();});function popEquiryForm(){$("#enquiry").click(function(){centerPopup();loadPopup();return false;});$("#closeEnquiry").click(function(){disablePopup();});$("#bgDim").click(function(){disablePopup();});$(document).keypress(function(e){if(e.keyCode==27&&popupStatus==1){disablePopup();}});}
var popupStatus=0;function loadPopup(){if(popupStatus==0){$("#bgDim").css({"opacity":"0.7"});$("#bgDim").fadeIn("slow");$("#enquiryForm").fadeIn("slow");popupStatus=1;}}
function disablePopup(){if(popupStatus==1){$("#bgDim").fadeOut("slow");$("#enquiryForm").fadeOut("slow");popupStatus=0;}}
function centerPopup(){var windowWidth=document.documentElement.clientWidth;var windowHeight=document.documentElement.clientHeight;var popupHeight=$("#enquiryForm").height();var popupWidth=$("#enquiryForm").width();$("#enquiryForm").css({"position":"absolute","top":windowHeight/2-popupHeight/2,"left":windowWidth/2-popupWidth/2});$("#bgDim").css({"height":windowHeight});}
function sendMail1(){$("#sendEnquiry").click(function(){var enquiryName=$("#enquiryName").val();var enquiryEmail=$("#enquiryEmail").val();var enquiryPhone=$("#enquiryPhone").val();var enquiryMessage=$("#enquiryMessage").val();alert(enquiryName+enquiryEmail+enquiryPhone+enquiryMessage);$.post("test.php",{name:"John",time:"2pm"},function(data){alert(enquiryName+enquiryEmail+enquiryPhone+enquiryMessage);});return false;})}
function sendMail(){var options={type:'post',tartget:'#mailSuccess',success:function(){$('#mailSuccess').fadeIn('slow');}};$('#enquiry-form').ajaxForm(function(options){$('#enquiry-form').slideUp('slow',function(){$('#enquiryForm h1').hide().delay(5800);$("#mailSuccess").show('fast').delay(5800);setTimeout(function(){disablePopup();},3000);});});}
var map;var zoomLevel=15;var places=[['Variable 3','Our Office where all the magic happens.',13.005621,77.577531,19,'blue'],['Sankey Tank','Beautiful Lake. Amazing place to refresh and get those ah ha movements of ideas.',13.008999,77.575616,13,'mark'],['Cafe Coffee Day','A nice place for informal meetings. Any thing can happen over coffee.',13.007455,77.579682,5,'mark'],['Pizza Hut','Pizza !! The last place we meet people. We get lost into the cheese.',13.005559,77.578465,10,'mark'],['Chung Wah','One of the best Chineese Restaurant around. We do call in the noodle boxes at times.',13.003510,77.578883,11,'mark'],['Nandhini','You can find Harsha here all the time. They serve one of the best Hydrabadi Biryani\'s we have ever tasted. Got to know recently that they dont prepare it at that place buy get it done from someone from Hyderabad.',12.998279,77.584028,8,'mark'],['Corner House','The best Icecream parlour. To name a few - DBC, Fresh Strawberry with Ice Cream etc.',12.988431,77.577140,7,'mark'],['Beagles Basketball Club','When u feel like you need to sweat and yet enjoy what do you do ? We shoot some hoops and have a lot of fun.',13.005732,77.570263,3,'mark'],['Bangalore Golf Club','Sunday Mornings the best thing to do - Play a 18 holes and have a late breakfast and talk about whats happening around the world.',12.989394,77.584505,6,'mark'],['Donut Baker','Who doesnt like donuts ? Bavairan Filled Donuts, Sugar coated Donuts.. YUM! YUM !',13.004649,77.571161,6,'mark']];function map_it(){var myLatlng=new google.maps.LatLng(13.005621,77.577531);var myOptions={zoom:zoomLevel,center:myLatlng,disableDefaultUI:true,mapTypeId:google.maps.MapTypeId.ROADMAP,navigationControl:true,navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL}}
map=new google.maps.Map(document.getElementById("map"),myOptions);for(var i=0;i<places.length;i++){addMarker(places[i]);}}
function addMarker(location){var image='images/markers/'+location[5]+'.png';var content='<h5>'+location[0]+'</h5><p>'+location[1]+'</p>';var myLatLng=new google.maps.LatLng(location[2],location[3]);var marker=new google.maps.Marker({position:myLatLng,map:map,icon:image,title:location[0],zIndex:location[4]});var infowindow=new google.maps.InfoWindow({content:content,maxWidth:200,zIndex:location[4]});google.maps.event.addListener(marker,'click',function(event){infowindow.open(map,marker);});}
