function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = jQuery(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
(function(jQuery) {
	jQuery.fn.customFadeIn = function(speed, callback) {
		jQuery(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				jQuery(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	jQuery.fn.customFadeOut = function(speed, callback) {
		jQuery(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				jQuery(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);
function initialize() {
        var myOptions = {
          zoom: 8,
          center: new google.maps.LatLng(54.618660712160214, -5.9156756401062038),
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };

        var map = new google.maps.Map(document.getElementById('map_canvas'),
            myOptions);
		var marker = new google.maps.Marker({
          map: map,
          position: map.getCenter()
        });
      }

      function loadScript() {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = 'http://maps.googleapis.com/maps/api/js?sensor=false&' +
            'callback=initialize';
        document.body.appendChild(script);
      }

      window.onload = loadScript;


$(document).ready(function() {
	jQuery("#community-nav a").click(function() {
		jQuery("#community-nav a").removeClass("active");
		jQuery(this).addClass("active");
		jQuery('div.more-community').hide();
		var activeTab = jQuery(this).attr("href");
		jQuery(activeTab).customFadeIn('slow', function() {});
		return false;
	});
	jQuery("#recruitment-classifieds-nav a").click(function() {
		jQuery("#recruitment-classifieds-nav a").removeClass("active");
		jQuery(this).addClass("active");
		jQuery('div.more-recruitment-classifieds').hide();
		var activeTab = jQuery(this).attr("href");
		jQuery(activeTab).customFadeIn('slow', function() {});
		return false;
	});
	jQuery("#signup-nav a").click(function() {
		jQuery("#signup-nav a").removeClass("active");
		jQuery(this).addClass("active");
		jQuery('div.more-sign-up').hide();
		var activeTab = jQuery(this).attr("href");
		jQuery(activeTab).customFadeIn('slow', function() {});
		return false;
	});
	//Country Dropdown	
	jQuery('#top_menu li.country_analysis').hover(
		function () {
			jQuery('#country_list').customFadeIn('slow', function() {});
			jQuery('#top_menu li.country_analysis a').addClass("over");

		}, 
		function () {
			jQuery('#country_list').customFadeOut('fast', function() {});
			jQuery('#top_menu li.country_analysis a').removeClass("over");
		}
	);
	equalHeight(jQuery('#home-boxes li'));
});


