$(document).ready(function(){$.history.init(pageload);$('a[rel=ajax]').click(function(){var hash=this.href;hash=hash.replace(/^.*#/,'');$.history.load(hash);$('.loading').show();return false});rollOvers();typeLinks()});function typeLinks(){$(".showprint").click(function(){$('html, body').animate({scrollTop:0},'slow');$('#content-load').slideUp('slow');$('.print').animate({opacity:1},800);$('.other').animate({opacity:0.25},800);$('.web').animate({opacity:0.25},800);$('#content h2').html('print work');return false});$(".showweb").click(function(){$('html, body').animate({scrollTop:0},'slow');$('#content-load').slideUp('slow');$('.web').animate({opacity:1},800);$('.other').animate({opacity:0.25},800);$('.print').animate({opacity:0.25},800);$('#content h2').html('web work');return false});$(".showother").click(function(){$('html, body').animate({scrollTop:0},'slow');$('#content-load').slideUp('slow');$('.other').animate({opacity:1},800);$('.web').animate({opacity:0.25},800);$('.print').animate({opacity:0.25},800);$('#content h2').html('other work');return false})};function rollOvers(){$('.piece').hover(function(){$(".snippet",this).stop().animate({bottom:'0px'},{queue:false,duration:160});$(".title",this).stop().animate({bottom:'-40px'},{queue:false,duration:160})},function(){$(".snippet",this).stop().animate({bottom:'-40px'},{queue:false,duration:160});$(".title",this).stop().animate({bottom:'0px'},{queue:false,duration:160})});$('a.show-info').toggle(function(){$("#nav").animate({height:"380px"},500);$('a.show-info').html('Read less about me')},function(){$("#nav").animate({height:"115px"},500);$('a.show-info').html('Read more about me')})}function pageload(hash){if(hash){$('html, body').animate({scrollTop:0},'slow');$('.loading').slideDown('slow');$('#content-load').slideUp('slow',function(){getPage()});return false}}function getPage(){var data='page='+encodeURIComponent(document.location.hash);$.ajax({url:"piece.php",type:"GET",data:data,cache:false,success:function(html){$('.loading').slideUp('slow');$('#content-load').html(html);$('#content-load').slideDown('slow')}})}