	$(document).ready(function(){
		// WORK BUTTON ACTIONS
		$("#btn-close").click(function() {
			if ($("#popup").css('top') == '0px') {
				$("#work").animate({'top': -235});
				$("#contact").animate({'top': -235});
				$("#contact").css('z-index', 0);
			}
			else {
				if ($("#project_info").css('top') == '-135px') {
					close_project();
				}
				else if ($("#chicago").css('top') == '155px') {
					$("#chicago").animate({'top': -456});
				}				
				$("#work").animate({'top': 0});
				$("#contact").animate({'top': 0});
				$("#contact").css('z-index', 0);
			}
			$("#button_work").toggleClass('selected');
			return false;
		});

		// CONTACT BUTTON ACTIONS
		$("#button_contact").click(function() {
			if ($("#contact").css('top') == '-135px') {
				if ($("#chicago").css('top') == '155px') {
					$("#chicago").animate({'top': -456});
				}	
				else if ($("#project_info").css('top') == '-135px') {
					close_project();
				}		
				$("#contact").css('z-index', 100);
				$("#contact").animate({'top': -235});
				$("#work").animate({'top': -235});
			}			
			else {
				$("#contact").css('z-index', 100);
				$("#contact").animate({'top': -135});
				$("#work").animate({'top': -135});
			}
			$("#button_work").toggleClass('selected');
			return false;
		});		
				
		// DRAGGABLE PROJECTS
		$("#fg_mailer").children("img").draggable();
		$("#fg_datasheets").children("img").draggable();
		$("#carone").children("img").draggable();
		$("#html_newsletter").children("img").draggable();
		$("#darko").children("img").draggable();
		$("#fg_site").children("img").draggable();
		$("#aurora").children("img").draggable();
		$("#asse").children("img").draggable()
		
		
		// FG MAILER PROJECT ACTIONS
		$("#prj_fg_mailer").click(function() {
			$("#fg_mailer").animate({'top': 110});
			
			$("#name_title").animate({'opacity': .1});	
					
			$("#info_fg_mailer").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		

		// FG DATASHEETS PROJECT ACTIONS
		$("#prj_fg_datasheets").click(function() {
			$("#fg_datasheets").animate({'top': 110});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_fg_datasheets").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		
		
		// CARONE PROJECT ACTIONS
		$("#prj_carone").click(function() {
			$("#carone").animate({'top': 110});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_carone").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		

		// HTML NEWSLETTER PROJECT ACTIONS
		$("#prj_html_newsletter").click(function() {
			$("#html_newsletter").animate({'top': 145});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_fg_newsletter").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		

		// DARKO PROJECT ACTIONS
		$("#prj_darko").click(function() {
			$("#darko").animate({'top': 165});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_darko").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		

		// VIDEO PROJECT ACTIONS
		$("#prj_fg_video").click(function() {
			$("#fg_video").animate({'top': 165});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_fg_video").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		
		
		// FG SITE PROJECT ACTIONS
		$("#prj_fg_site").click(function() {
			$("#fg_site").animate({'top': 120});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_fg_site").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		
		
		// AURORA BOREALIS PROJECT ACTIONS
		$("#prj_aurora").click(function() {
			$("#aurora").animate({'top': 135});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_aurora").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		
		
		// ASSE PROJECT ACTIONS
		$("#prj_asse").click(function() {
			$("#asse").animate({'top': 135});
			
			$("#name_title").animate({'opacity': .1});			
			
			$("#info_asse").css('display', 'block');
			$("#project_info").animate({'top': -135});
			$("#project_info").css('z-index', 101);
			$("#contact").animate({'top': -135});
			$("#work").animate({'top': -135});
			
			$("#button_project").css('display', 'block');
			$("#button_project").toggleClass('selected');
			return false;
		});		



		function close_project() {
			$("#project_info").animate({'top': -260});
			$("#fg_mailer").animate({'top' : -550});
			$("#fg_datasheets").animate({'top' : -780});
			$("#carone").animate({'top' : -545});
			$("#html_newsletter").animate({'top' : -540});
			$("#darko").animate({'top' : -280});
			$("#fg_video").animate({'top' : -440});
			$("#fg_site").animate({'top' : -700});
			$("#aurora").animate({'top' : -625});
			$("#asse").animate({'top' : -550});
			
			
			$("#button_project").css('display', 'none');
			$("#button_project").toggleClass('selected');
			
			$("#work").animate({'top': 0});
			$("#contact").animate({'top': 0});
			$("#name_title").animate({'opacity': 1});	
			
			$("#fg_mailer_img1").animate({'top' : 0});
			$("#fg_mailer_img2").animate({'top' : 25});
			$("#fg_mailer_img1").animate({'left' : 0});
			$("#fg_mailer_img2").animate({'left' : 437});
			
			$("#fg_datasheets_img1").animate({'top' : 0});
			$("#fg_datasheets_img1").animate({'left' : 0});
			$("#fg_datasheets_img2").animate({'top' : 70});
			$("#fg_datasheets_img2").animate({'left' : 295});
			$("#fg_datasheets_img3").animate({'top' : 25});
			$("#fg_datasheets_img3").animate({'left' : 550});
			$("#fg_datasheets_img4").animate({'top' : 210});
			$("#fg_datasheets_img4").animate({'left' : 0});
			$("#fg_datasheets_img5").animate({'top' : 320});
			$("#fg_datasheets_img5").animate({'left' : 295});
			$("#fg_datasheets_img6").animate({'top' : 235});
			$("#fg_datasheets_img6").animate({'left' : 570});
			
			$("#carone_img1").animate({'top' : 0});
			$("#carone_img1").animate({'left' : 85});
			$("#carone_img2").animate({'top' : 25});
			$("#carone_img2").animate({'left' : 270});
			$("#carone_img3").animate({'top' : 0});
			$("#carone_img3").animate({'left' : 370});
			
			$("#html_newsletter_img1").animate({'top' : 0});
			$("#html_newsletter_img1").animate({'left' : 170});
			$("#html_newsletter_img2").animate({'top' : 0});
			$("#html_newsletter_img2").animate({'left' : 280});		
			
			$("#darko_img1").animate({'top' : 25});
			$("#darko_img1").animate({'left' : 0});
			$("#darko_img2").animate({'top' : 0});
			$("#darko_img2").animate({'left' : 232});
			$("#darko_img3").animate({'top' : 25});
			$("#darko_img3").animate({'left' : 571});	
			
			$("#fg_video_img1").animate({'top' : 25});
			$("#fg_video_img1").animate({'left' : 120});
			$("#fg_video_img2").animate({'top' : 0});
			$("#fg_video_img2").animate({'left' : 190});
			$("#fg_video_img3").animate({'top' : 25});
			$("#fg_video_img3").animate({'left' : 380});				
			$("#fg_site_img1").animate({'top' : 0});
			$("#fg_site_img1").animate({'left' : 0});
			$("#fg_site_img2").animate({'top' : 20});
			$("#fg_site_img2").animate({'left' : 530});
			$("#fg_site_img3").animate({'top' : 390});
			$("#fg_site_img3").animate({'left' : 400});	
			
			$("#aurora_img1").animate({'top' : 0});
			$("#aurora_img1").animate({'left' : 60});
			$("#aurora_img2").animate({'top' : 35});
			$("#aurora_img2").animate({'left' : 555});
			$("#aurora_img3").animate({'top' : 75});
			$("#aurora_img3").animate({'left' : 227});
			$("#aurora_img4").animate({'top' : 300});
			$("#aurora_img4").animate({'left' : 0});
			$("#aurora_img5").animate({'top' : 350});
			$("#aurora_img5").animate({'left' : 495});
			
			$("#asse_img1").animate({'top' : 0});
			$("#asse_img2").animate({'top' : 25});
			$("#asse_img1").animate({'left' : 100});
			$("#asse_img2").animate({'left' : 390});			
			
			$("#info_fg_site").css('display', 'none');	
			$("#info_fg_video").css('display', 'none');	
			$("#info_darko").css('display', 'none');
			$("#info_fg_newsletter").css('display', 'none');
			$("#info_carone").css('display', 'none');
			$("#info_fg_datasheets").css('display', 'none');
			$("#info_fg_mailer").css('display', 'none');
			$("#info_aurora").css('display', 'none');
			$("#info_asse").css('display', 'none');
		}
		
		// PROJECT BUTTON ACTIONS
		$("#button_project").click(function() {
			close_project();
		});		
		
		$("#button_chicago").click(function() {
			$("#chicago").animate({'top': 155});
			$("#button_chicago").toggleClass('selected');
		});	
	});