// JavaScript Document
$(document).ready(function() {
	
		/*if($('select').length > 0) {
			$('select').selectmenu({
				style: 'dropdown'
			});
		}*/
		
		// Preload all rollovers
		$("#mainMenu img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.jpg$/ig,"_f2.jpg");
			$("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		$("#mainMenu a").mouseover(function(){
			if($(this).children("img").length) {
				imgsrc = $(this).children("img").attr("src");
				matches = imgsrc.match(/_f2/);
				
				// don't do the rollover if state is already ON
				if (!matches) {
				imgsrcON = imgsrc.replace(/.jpg$/ig,"_f2.jpg");
				$(this).children("img").attr("src", imgsrcON);
				}
			}
			
		});
		
		$("#mainMenu a").mouseout(function(){
			if($(this).children("img").length) {
				$(this).children("img").attr("src", imgsrc);
			}
		});
		
	});

var src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAyxFIDPL9FbXvnuSYtaqQeRR93aeeTh9rN8a4bXhU03HL6MEXBRTd0Cir597VsWk7lzzhADZeM1ethA";

function load() {
  if (GBrowserIsCompatible()) {
	var map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(35.898645,14.511306), 16);
	
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	
	var point = new GLatLng(35.898645,14.511306);
	
	var marker = new GMarker(point);
	marker.openInfoWindowHtml('<p>Fenech &amp; Fenech Advocates Offices</p>');
	map.addOverlay(marker);
  }
}
	
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


