﻿$(window).load(function() {
	$("#nav").find("a[href='"+window.location.href+"']").each(function(){$(this).addClass("active")})
});
$(function() {
    $('.contact a').click(function(event){
        if ($('.contact').hasClass('open')) {
            $('.contact').animate({right:'-300px'},500,'easeInQuart').removeClass('open');
        } else {
            $('.contact').animate({right:'0px'},400,'easeInOutCubic').addClass('open');
        }
    });
});
$(function() {
	$('a.readmore').click(function () {
		if ($("div.readmore").is(":hidden")) {
			$("div.readmore").slideDown("slow")
		}
		else {
			$("div.readmore").slideUp("slow")
		}
	});
});

$(document).ready(function() {
	$('a[href*=homesites]').fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'inside'
			});
});
