$(document).ready(function(){

	$('#warning').remove();

	var loader, link, target, activePage, navLinks;
//	activePage = '/index.php .wrapper.content';
	$('a[rel=ajax]').live('click', function() {
		link	= $(this).attr('href') + '.php .wrapper.content';
		if($(this).attr('href') == '/') {
			link = '/index.php .wrapper.content';
		}
		target	= $('#content');
		if(activePage !== link) {
			$('#nav li').removeClass('active');
			if(target.load(link)) {
				activePage	= link;
				navLinks	= $('#nav li a');
				$this		= $(this);
				$($('#nav li a')).each(function(){
					if($(this).attr('href') == $this.attr('href')){
						$(this).parent('li').addClass('active');
					}
				});
				$('title').text('::webgrooves:: ' + $(this).html());
			}
		}
		return false
	});

	$('#contactForm').live('submit', function(){
		ajaxHit('/asdasd', '#contactForm', 'post', 'all set');
		return false;
	});

	$(".liquidColumn").live({
		mouseenter:
			function(){
				$(this).find('.overlay').slideUp(250);
			},
			mouseleave:
				function(){
					$(this).find('.overlay').slideDown(100);
			}
		}
	);

	$('.email').click(function(){
		window.location.href = "mailto:" + $('.email').html();
	});

});
