$(function() {
		$('#images_and_maps a').lightBox();
});

$(document).ready(function () {
	$(".contact_form").click(function(e) {
		var t = is_old_ie();
		if (is_old_ie() == 0) { 
			e.preventDefault();
			call_content(this);	
		}	
	});
});

function call_content (ob) {
	if ($("#contact_pop").length>0) {
	  $("#contact_pop").remove();	
	} else {
		if (ob.href != undefined && ob.href != "#") {
			var loc = ob.href;
			$.ajax({
				type: 'GET',
				url: loc,
				dataType: 'html',
				success: function (html) {
					var x = document.createElement("DIV");
					x.id = "contact_pop";
					x.className='floating';
					$("body").append(x);
					$("#"+ x.id).html(html);		
				}
			});		
		}  
	}
	return false; 	
}

/**
*   Borrowed from w3school.com
*/
function is_old_ie () {
	var browser=navigator.appName;
	var b_version=navigator.appVersion;
	var version=parseFloat(b_version);
	if (browser=="Microsoft Internet Explorer" && version < 8 ) {
    return 1;
	} else {
  	return 0;
  }
}
