$(function() {
	
	$('body.home div#content h1').sifr({ strSWF: 'flash/myriad-pro.swf', strColor: '#ffffff', strWmode: 'transparent', strCase: 'upper' },{ expressInstall: true });
	$('div#content h1').sifr({ strSWF: 'flash/myriad-pro.swf', strColor: '#bc2d25', strWmode: 'transparent', strCase: 'upper' },{ expressInstall: true });	   
	$('div#push h3').sifr({ strSWF: 'flash/myriad-pro.swf', strColor: '#bc2d25', strWmode: 'transparent' },{ expressInstall: true });	 
	$('div#home-push h3').sifr({ strSWF: 'flash/myriad-pro.swf', strColor: '#bc2d25', strWmode: 'transparent' },{ expressInstall: true });	 	
	$('div#content h3.photo-header').sifr({ strSWF: 'flash/myriad-pro.swf', strColor: '#bc2d25', strWmode: 'transparent', strCase: 'upper' },{ expressInstall: true });	   
	
	
    
    
	$('.scroll-pane').jScrollPane({showArrows:true, scrollbarWidth:16});
	
	$('div.fave-select-wrapper').each(function(){
		var $needcur = true;
		var nexthref;
		var prevhref;
		/*$('div.fave-tn-wrapper').each(function() {
			if ( $(this).attr('class') == 'fave-tn-wrapper current'){
				$needcur = false;
				nexthref = $(this).next().children().children('a').attr('href');
				prevhref = $(this).prev().children().children('a').attr('href');
			}
		});*/
		var curid = $('div#photo-content').attr('class');
		curid = parseInt(curid.substring(4));
		nextid = curid+1;
		previd = curid-1;
		
		nexthref = '/photo-gallery.php?image='+nextid;
		prevhref = '/photo-gallery.php?image='+previd;

		/*if ($needcur == true) {
			var currentimg = $('div.photo-wrapper img').attr('src');
			var curimgid = currentimg.substring(currentimg.lastIndexOf('/')+1);
			curimgid = curimgid.substring(0,curimgid.length-4);
			$('div#tn-'+curimgid).addClass('current');	
			nexthref = $('div#tn-'+curimgid).next().children().children('a').attr('href');
			prevhref = $('div#tn-'+curimgid).prev().children().children('a').attr('href');
		}*/
		//$('a#btn-next').attr('href',nexthref);
		//$('a#btn-last').attr('href',prevhref);
	});
	
    var url = window.location;
    var pieces = url.toString().split('#');
    if(pieces.length>1){
        if($('#'+pieces[1])){
            $.scrollTo('#'+pieces[1]);
        }        
    }
	
});
