$(document).ready(function(){LoadMain("home",function(responseText,textStatus,XMLHttpRequest){if(textStatus=="success"||textStatus=="notmodified")if(ss){$(".portfolio-view:gt(0)").hide();$("#portfolio-selector").delegate(".portfolio-grid-item","click",function(event){$(".portfolio-view").hide();$(".portfolio-view").each(function(i,e){if($(this).attr("data-item")==$(event.currentTarget).attr("href").substr(1)){var PI=$(this).show();$("#portfolio-selector figure.selected img").replaceWith(PI.find("figure img").clone())}});
event.preventDefault();return false})}else{$("#portfolio-viewer").scrollable({circular:true,onSeek:function(event,i){$("#main").removeClass("no-info")}});$("#hide-info").click(function(e){$("#main").addClass("no-info");e.preventDefault();return false});$("#show-info").click(function(e){$("#main").removeClass("no-info");e.preventDefault();return false});$("#show-grid").click(function(e){$("#grid-view").show();e.preventDefault();return false});$("#grid-view").delegate(".portfolio-grid-item","click",
function(e){$("#grid-view").hide();PortfolioJump($(this).attr("href").substr(1));e.preventDefault();return false})}else alert("There was an error loading the content. Please try again.")})});function PortfolioJump(name){var index=0;$(".portfolio-view").each(function(i,e){if($(this).attr("data-item")==name){index=i;return false}});var scroller=$("#portfolio-viewer").data("scrollable");scroller.seekTo(index-1,0)};
