var deviceWidth;

$(document).ready(function(){
	deviceWidth = $(window).width();

	$(function() {
	    FastClick.attach(document.body);
	});	
});

$(window).resize(function(){
	deviceWidth = $(window).width();
});

$('.side-menu-button').click(function(){
	showSideMenu();
});

$('.menu li').click(function(){
	hideSideMenu(this);
});

function showSideMenu(){
	if(Modernizr.csstransitions){
		$('.window').addClass('animate');
		$('.menu').addClass('animate');
		$('.window').css('transform', 'translate3d(' + (deviceWidth / 2) + 'px, 0px, 0) scale(0.5,0.5) ');
		$('.menu').css('transform', 'scale(1,1) ');
		$('.menu').css('opacity', '1');
	} else {
		$('.menu').animate({'left': '0px'}, 200);		
		$('.window').animate({'left': (deviceWidth - ($('.side-menu-button').width() + 20)) + 'px'}, 200);
	}
}

function hideSideMenu(title){
	if(Modernizr.csstransitions){
		$('.window').css('transform', 'translate3d(0px, 0, 0) scale(1,1) ');
		$('.menu').css('transform', 'scale(0.6,0.6) ');	
		$('.menu').css('opacity', '0');	
		$('.title').html($(title).attr('class'));
	} else {
		$('.window').animate({'left': '0px'}, 200);
		$('.menu').animate({'left': '60%'}, 200);				
		$('.title').html($(title).attr('class'));		
	}	
}
@@ -822,17 +822,21 @@
 ideMenu(
-t
+menuT
 itle)%7B%0A%09
@@ -1026,52 +1026,8 @@
 );%09%0A
-%09%09$('.title').html($(title).attr('class'));%0A
 %09%7D e
@@ -1132,17 +1132,21 @@
 %09%0A%09%09$('.
-t
+menuT
 itle').h
@@ -1151,17 +1151,21 @@
 .html($(
-t
+menuT
 itle).at
@@ -1184,9 +1184,217 @@
 ;%09%09%0A%09%7D%09%0A
+%09feedContent(menuTitle);%0A%7D%0A%0Afunction feedContent(menuTitle)%7B%0A%09$('.window-content').load('views/' + $(menuTitle).attr('class') + '.html');%0A%09$('.title').html($(menuTitle).attr('class'));%09%0A%09setContentHeight();%09%0A
 %7D

add ajax content loading to menu animation