$(function()
{function filterPath(string){return string.replace(/^\//,'').replace(/(index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,'');}
var locationPath=filterPath(location.pathname);$('a[href*=#]').each(function(){var thisPath=filterPath(this.pathname)||locationPath;if(locationPath==thisPath&&(location.hostname==this.hostname||!this.hostname)&&this.hash.replace(/#/,'')){var $target=$(this.hash),target=this.hash;if(target){var targetOffset=$target.offset().top;$(this).click(function(event){event.preventDefault();$('html, body').animate({scrollTop:targetOffset},400,function(){location.hash=target;});});}}});$('#content > li:last-child').css(($.browser.msie&&$.browser.version<7?'':'min-')+'height',$(window).height()-120+'px');var slideshow={};slideshowStart('#slideshow',4000);function slideshowStart(e,delay)
{$(e).find('p').hide();var id=$(e).attr('id');var s=slideshow[id]={}
s.items=$(e).find('p');s.delay=delay;$(e).find('p').hover(function()
{s.pause=true;},function()
{s.pause=false;slideshowHide(id,$(s.items[s.i]));});slideshowShow(id);}
function slideshowShow(id)
{var s=slideshow[id];if(s.pause)return;(s.i==null||s.i+1>=s.items.length)?s.i=0:s.i++;$(s.items[s.i]).fadeIn().animate({opacity:1.0},s.delay,function()
{if(!s.pause)slideshowHide(id,$(s.items[s.i]));});}
function slideshowHide(id,e)
{var s=slideshow[id];if(s.fade)return;s.fade=true;$(e).fadeOut('',function()
{s.fade=false;(s.pause)?$(e).fadeIn('fast'):slideshowShow(id);});}});