$(function() {
				$("#menu").hide();
                $("#menu").show("slide",1000);
				
				var pass = "/";
				var CookieName = $.cookie("path");
				
				function posHome() {
					
					$('#bg0').animate({top: '0px'}, 1000,'easeInOutExpo');
					$('#slider').animate({top: '0%'
						}, 1000,'easeInOutCirc');
						
				}
				function posNews() {
					
					$('#bg0').animate({top: '-382px'}, 1000,'easeInOutExpo');
					$('#slider').animate({top: '-100%'
						}, 1000,'easeInOutCirc');
						
				}
				function posBlog() {
					
					$('#bg0').animate({top: '-764px'}, 1000,'easeInOutExpo');
					$('#slider').animate({top: '-200%'
						}, 1000,'easeInOutCirc');
						
				}
				function posTweet() {
					
					$('#bg0').animate({top: '-1146px'}, 1000,'easeInOutExpo');
					$('#slider').animate({top: '-300%'
						}, 1000,'easeInOutCirc');
						
				}
				function posContact() {
					
					$('#bg0').animate({top: '-1528px'}, 1000,'easeInOutExpo');
					$('#slider').animate({top: '-400%'
						}, 1000,'easeInOutCirc');
						
				}
				$.cookie("path","",{path:"/",expires:-1});
				
				if (CookieName == "news") {
					posNews();
				} else if (CookieName == "blog") {
					posBlog();
				} else if (CookieName == "twitter") {
					posTweet();
				} else if (CookieName == "contact") {
					posContact();
				} else {
					posHome();
				}
				
				$('.pos1').click(function(){ 
					posHome();
				});
				
				$('.pos2').click(function(){ 
					posNews();
				});
				
				$('.pos3').click(function(){ 
					posBlog();
				});
				
				$('.pos4').click(function(){ 
					posTweet();
				});
				
				$('.pos5').click(function(){ 
					posContact();
				});
				
				
				$('.pos1c').click(function(){
				$.cookie("path","",{path:"/",expires:-1});
					
					location.href = pass;
				
					return false;
					
				});
				
				$('.pos2c').click(function(){ 
				$.cookie('path', 'news',{expires: 7, path: '/'});

					location.href = pass;
				
					return false;
				});
				
				$('.pos3c').click(function(){ 
					$.cookie('path', 'blog',{expires: 7, path: '/'});

					location.href = pass;
				
					return false;
				});
				
				$('.pos4c').click(function(){ 
					$.cookie('path', 'twitter',{expires: 7, path: '/'});

					location.href = pass;
				
					return false;
				});
				
				$('.pos5c').click(function(){ 
					$.cookie('path', 'contact',{expires: 7, path: '/'});

					location.href = pass;
				
					return false;
				});
				
            });
			
			$(function() {
			var $tumblelog = $('.tumblelog');
			  
				$tumblelog.imagesLoaded( function(){
				  $tumblelog.masonry({
					itemSelector: '.entry'
			  
				  });
				});
				
				/*$(".fancybox").fancybox(
					{
						width:"80%",
						height:"80%",
						padding:0,
						autoSize:false,
						scrolling:'auto'
					}
				);	*/
				
				if(!jQuery.support.opacity){
					
				}else{
					$("input,textarea").uniform();
				}
				
				
				
				
			});
			
			
