jQuery(function($){
	$(document).ready(function(){
		$('#navigation ul li:last').addClass('last');
		
		/*$('.jump-to').each(function() {
			i=-1;
			ids = new Array();
			$('.box').each(function() {
				 i++;
				 ids[i] = $(this).attr('id');
			});
			for (i=0; i<ids.length; i++) {
				html = '<a href="#'+ids[i]+'">'+ids[i]+'</a>';
				if (i < ids.length - 1) {
				html = html + ' <span>|</span> ';
				}
				$('.jump-to').append(html);
			}
		});*/

		$("#footer img").hover( function() {
			var new_src=$(this).attr('title');
			$(this).attr('title', $(this).attr('src'));
			$(this).attr('src', new_src);
		}, function() {
		 	var new_src=$(this).attr('title');
		 	$(this).attr('title', $(this).attr('src'));
			$(this).attr('src', new_src);
		});

		$("p").filter( function() {
		 	return $.trim($(this).html()) == '';
		}).remove();

		$('img:not(.slide)').each(function() {
		 	if ($(this).width() >= 780) {
		 		img_src = $(this).attr('src');
		 		img_class = $(this).attr('class');
		 		if (typeof(img_class) == 'undefined') {
		 			img_class = '';
		 		}
		 		$(this).replaceWith('<img class="' + img_class + '" src="' + window.tdir + '/lib/timthumb.php?src=' + img_src + '&w=780&h=0&zc=1" alt="" />');
		 	}
		});

		$('#slideshow ul li').simpleFade({
			speed: 1000, 
			duration: 7000,
			onFade: function (index) { 
				//
			 },
		    onAfterFade: function (index) {
				//
				},
		    	    init: function () {
		        fader = this;
		    }
		});


	});	
});
