$(document).ready(function(){$("header h1").click(function(){$("#portfolio li img").animate({opacity:1.0});$("header h1").css('cursor','default');});$("nav a").click(function(){$("header h1").css('cursor','pointer');var group=$(this).attr('href').substr(1);$("nav a.active").removeClass('active');$(this).addClass('active');$("#portfolio li[class!="+group+"] img").animate({opacity:0.1});$("#portfolio li[class="+group+"] img").animate({opacity:1.0});});$("#portfolio a").click(function(){$(this).prepend('<div class="loading"><img src="http://images.mkuplens.com/ajax-loader.gif" style="height:32px;width:32px"></img>');project=$(this).attr('href').substr(1);_gaq.push(['_trackEvent','Portfolio','View',project]);$.get('full/'+project+'.html',function(content){$.modal(content,{width:700,minHeight:700,opacity:20,onShow:function(){$(".loading").remove();},onClose:function(){$.modal.close();window.location.hash='';}});});});if(window.location.hash){selector="a[href="+window.location.hash+"]";$(selector).click();}});
