$(function () {

	$.preloadCssImages();
	$('#menu li:first').css('background', 'none');
	$('a[rel="lightbox"]').lightBox();			
		
	// Effect on the images in the portfolio index
	$('.project a img').hover(
		function() { $(this).stop().fadeTo("fast", 0.60); },
		function() { $(this).stop().fadeTo("slow", 1)}
	);
	
	// Slideshow navigation
	$('#slidenav').hide().append('<a href="#" class="prev"><span>prev</span></a> <a href="#" class="next"><span>next</span></a>').fadeIn(600);
	$('#slidenav a').click(function() { return false; });
	
	// Slideshow setup
	$('#slideshow').innerFade({ 
		animationType: 'fade', 
		speed: 'slow', 
		easing: 'swing',
		timeout: '5000', 
		containerHeight: '300px',
		prevLink: '.prev',
		nextLink: '.next'
	});
	
	
	// Clears the value when clicked
	$('#pagehead form input.text').click(function() {
		$(this).attr('value', '');
	});
	
	
	// Tipsy settins - for fancy tooltips
	$(".paggination .pages a, #footer .right a").tipsy({gravity: 's', fade: true});
	$("#footer .right a img").removeAttr('alt');
	$("#main h2 a[title]").tipsy({gravity: 'w', fade: true});
	
	// IE6 PNG fix
	$(document).pngFix();
		
});