//<![CDATA[
	/**
	* Preloader
	*/
	jQuery.preloadImages = function()
	{
		for(var i = 0; i<arguments.length; i++)
			jQuery("<img>").attr("src", arguments[i]);
	}

	$(document).ready(function()
	{
		/**
		* jQuery menu animations - mouseover and mouseout for each list link item
		*/
		var width = 10;
		var speed = 250;

		// Upper left hand side nav links
		if ( $("body#page-id-2").length == 0)
		{
			$("#link-welcome").mouseover(function(){$("#block-welcome").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-welcome").mouseout(function(){$("#block-welcome").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-3").length == 0)
		{
			$("#link-about").mouseover(function(){$("#block-about").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-about").mouseout(function(){$("#block-about").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-4").length == 0)
		{
			$("#link-landlords1").mouseover(function(){$("#block-landlords1").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-landlords1").mouseout(function(){$("#block-landlords1").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-5").length == 0)
		{
			$("#link-landlords2").mouseover(function(){$("#block-landlords2").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-landlords2").mouseout(function(){$("#block-landlords2").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-6").length == 0)
		{
			$("#link-tenants1").mouseover(function(){$("#block-tenants1").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-tenants1").mouseout(function(){$("#block-tenants1").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-7").length == 0)
		{
			$("#link-tenants2").mouseover(function(){$("#block-tenants2").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-tenants2").mouseout(function(){$("#block-tenants2").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-8").length == 0)
		{
			$("#link-tenants3").mouseover(function(){$("#block-tenants3").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-tenants3").mouseout(function(){$("#block-tenants3").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-9").length == 0)
		{
			$("#link-links").mouseover(function(){$("#block-links").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-links").mouseout(function(){$("#block-links").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}
		if ( $("body#page-id-10").length == 0)
		{
			$("#link-contact").mouseover(function(){$("#block-contact").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
			$("#link-contact").mouseout(function(){$("#block-contact").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		}

		// Lower left hand side nav links
		$("#link-telno").mouseover(function(){$("#link-telno").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
		$("#link-telno").mouseout(function(){$("#link-telno").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		$("#link-register").mouseover(function(){$("#link-register").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
		$("#link-register").mouseout(function(){$("#link-register").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });
		$("#link-search").mouseover(function(){$("#link-search").animate({"width": "+="+width+"px"}, { duration: speed, queue: true }); });
		$("#link-search").mouseout(function(){$("#link-search").animate({"width": "-="+width+"px"}, { duration: speed, queue: true }); });

		/**
		* Drop down box animations - need to give the header and the wrapper
		* unique id's for each box - css class allows for styling multiple boxes.
		*/
		$("a#box-header-1").toggle(
			function(){ $("#box-wrapper-1").slideDown("slow"); },
			function(){ $("#box-wrapper-1").slideUp("slow"); }
		); 

		$("a#box-header-2").toggle(
			function(){  $("#box-wrapper-2").slideDown("slow"); },
			function(){ $("#box-wrapper-2").slideUp("slow"); }
		); 

		$("a#box-header-3").toggle(
			function(){ $("#box-wrapper-3").slideDown("slow"); },
			function(){ $("#box-wrapper-3").slideUp("slow"); }
		);

		/**
		* Image swapper for the main property layout - click the thumbs to
		* change the main image
		*/
		$("#property-thumb-1").click( function(){ $("img#property-main").attr("src",$(this).attr("src")); } );
		$("#property-thumb-2").click( function(){ $("img#property-main").attr("src",$(this).attr("src")); } );
		$("#property-thumb-3").click( function(){ $("img#property-main").attr("src",$(this).attr("src")); } );
		$("#property-thumb-4").click( function(){ $("img#property-main").attr("src",$(this).attr("src")); } );
		
		$('a[rel~="external"]').click( function(){
			window.open( $(this).attr('href') );
			return false;
		});

	}); // End document.ready()
//]]>