jQuery(function($) {
	$(window).resize(function() {
		$('#debug').html('resize');
		if ($(window).width() > '1271') { 
			$(window).width(1271); 
			}
	});
	$('#systemMenu .about').click(function() {
		$('#logo').blur();
		$.ajax({
  		type: "GET",
  		url: "/controller?page=about",
  		dataType: "html",
  		success: function(html){
    		$("#contentHolder").html(html);
  			}
		});
		return false;
	});
	$('#systemMenu .people').click(function() {
		$('#logo').blur();
		$.ajax({
  		type: "GET",
  		url: "/controller?page=people",
  		dataType: "html",
  		success: function(html){
    		$("#contentHolder").html(html);
  			}
		});
		return false;
	});
	$('#systemMenu .contact').click(function() {
		$('#logo').blur();
		$.ajax({
  		type: "GET",
  		url: "/controller?page=contact",
  		dataType: "html",
  		success: function(html){
    		$("#contentHolder").html(html);
  			}
		});
		return false;
	});
	$('#systemMenu .portfolio').click(function() {
		$('#logo').blur();
		$.ajax({
  		type: "GET",
  		url: "/controller?page=portfolio",
  		dataType: "html",
  		success: function(html){
    		$("#contentHolder").html(html);
  			}
		});
		return false;
	});
	$('systemMenu .logo').click(function() {
		$(this).blur();
		$('.selected').removeClass('selected');
		$.ajax({
  		type: "GET",
  		url: "/controller?page=home",
  		dataType: "html",
  		success: function(html){
    		$("#contentHolder").html(html);
  			}
		});
		return false;
	});
	$('#menu li').hover(function() {
		$(this).addClass('hover');
	},
	function() {
		$(this).removeClass('hover');
	}
	);
	$('#menu span').click(function() {
		var url = $(this).parent().children('a').attr('href');
		window.location = url;
	});
});