var pages = {
	init: function(page) {
		switch(page) {
			case "clients": {
				$("#content").css("height", "auto" );
				
				break;
			}
		
			case "culture": case "place": {
				gallery.init();
				
				break;
			}
			
			case "works": case "": {
				gallery.init();
			
				var tiles = $(".tiles");
				if(tiles.find("LI").size() > 0) {
					// Tiles onload animation	
					setTimeout(function() {
						tiles.find('.folio').find("img").animate({
							opacity: "1"
						}, 1000);

						setTimeout(function() {
							tiles.find('.folio').find("img").animate({
								opacity: "0.2"
							}, 2000);

							$("footer").find(".map img").animate({
								opacity: "0.2"
							}, 2000);
						}, 2000);
					}, 500);

					// Portfolio tiles
					tiles.find(".folio").hover(
						// Over
						function() {
							$(this).find("img").stop(true, false).animate({
								"opacity": 1
							}, 200);
						},

						// Out
						function() {
							$(this).find("img").stop(true, false).animate({
								"opacity": "0.2"
							}, 2000);				
						}
					);

					tiles.find(".folio ")


					// About tile
					tiles.find(".about").hover(
						// Over
						function() {
							$(this).find("img").clearQueue().animate({
								"margin-top": "-240px"
							}, 200);
						},

						// Out
						function() {
							$(this).find("img").clearQueue().animate({
								"margin-top": 0
							}, 200);
						}
					);
				}
				
				break;
			}
		}
		
		$(window).resize();
	}	
}
