var resON = true; var retON = true; var offON = true; var leiON = true; var fooON = true; var hotON = true; var indON = true; var currentStatus = -1; var map; var myLatlng; var markers = new Array(); var myLatlngs = new Array(); var contentStrings = new Array(); var images = new Array(); var infowindows = new Array(); var itemIDs = new Array(); var itemTypes = new Array(); var itemSizes = new Array(); var itemStatus = new Array(); var numItems; var latlngbounds; function changeStatus(newStatus) { var sel; if(currentStatus>0) { var sel = document.getElementById('notch'+currentStatus); sel.src='http://www.3foxinternational.com/images/icons/notch.png'; } currentStatus = newStatus; if(currentStatus>0) { var sel = document.getElementById('notch'+currentStatus); sel.src='http://www.3foxinternational.com/images/icons/notch2.png'; } } function placeTicks() { var position; var xOffset = 30; var yOffset = 15; position = $("#residential").position(); $("#tick1").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); position = $("#retail").position(); $("#tick2").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); position = $("#office").position(); $("#tick3").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); position = $("#leisure").position(); $("#tick4").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); position = $("#food").position(); $("#tick5").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); position = $("#hotel").position(); $("#tick6").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); position = $("#industrial").position(); $("#tick7").css( { "left": (position.left + xOffset) + "px", "top": (position.top + yOffset ) + "px" } ); } function toggleRes() { var sel1 = document.getElementById('tick1'); if(resON==true) { sel1.innerHTML = ''; resON = false; } else { sel1.innerHTML = ''; resON = true; } } function toggleRet() { var sel1 = document.getElementById('tick2'); if(retON==true) { sel1.innerHTML = ''; retON = false; } else { sel1.innerHTML = ''; retON = true; } } function toggleOff() { var sel1 = document.getElementById('tick3'); if(offON==true) { sel1.innerHTML = ''; offON = false; } else { sel1.innerHTML = ''; offON = true; } } function toggleLei() { var sel1 = document.getElementById('tick4'); if(leiON==true) { sel1.innerHTML = ''; leiON = false; } else { sel1.innerHTML = ''; leiON = true; } } function toggleFoo() { var sel1 = document.getElementById('tick5'); if(fooON==true) { sel1.innerHTML = ''; fooON = false; } else { sel1.innerHTML = ''; fooON = true; } } function toggleHot() { var sel1 = document.getElementById('tick6'); if(hotON==true) { sel1.innerHTML = ''; hotON = false; } else { sel1.innerHTML = ''; hotON = true; } } function toggleInd() { var sel1 = document.getElementById('tick7'); if(indON==true) { sel1.innerHTML = ''; indON = false; } else { sel1.innerHTML = ''; indON = true; } } function hideAllInfoWindows() { for( i=0; i < numItems; i++ ) { infowindows[i].close(); } } function hideAll() { hideAllInfoWindows(); for(i=0; i-1) markers[i].setVisible(true); if(retON && itemTypes[i].indexOf('Retail')>-1) markers[i].setVisible(true); if(offON && itemTypes[i].indexOf('Office')>-1) markers[i].setVisible(true); if(leiON && itemTypes[i].indexOf('Leisure and Services')>-1) markers[i].setVisible(true); if(fooON && itemTypes[i].indexOf('Food and Drink')>-1) markers[i].setVisible(true); if(hotON && itemTypes[i].indexOf('Hotels and Hostels')>-1) markers[i].setVisible(true); if(indON && itemTypes[i].indexOf('Industrial')>-1) markers[i].setVisible(true); } for(i=0; i 0) { if(parseInt(itemStatus[i]) != currentStatus) markers[i].setVisible(false); } } } function showBySize(myMin, myMax) { hideAllInfoWindows(); for(i=0; i= myMin && itemSizes[i] <= myMax) { markers[i].setVisible(true); } else { markers[i].setVisible(false); } } map.setZoom(12); map.panToBounds( latlngbounds ); } window.onresize = placeTicks; var myTimer; var currentTip; currentTip = -1; function showTip(myObj) { var position; clearTimeout(myTimer); if(currentTip !=-1) { hideTip(currentTip); } var tipName = '#tipDiv' + myObj; var notchName = '#notch' + myObj; position = $(notchName).position(); $(tipName).show(); $(tipName).css( { "left": (position.left -50) + "px", "top": (position.top + 23 ) + "px" } ); currentTip = myObj; } function hideTip(myObj) { clearTimeout(myTimer); var tipName = '#tipDiv' + myObj; $(tipName).hide(); currentMenu = -1; } $('.mainImage').imagesLoaded( function() { placeTicks(); });