// JavaScript Document

(function($) {
	$.fn.fadeIn = function(speed, callback) {
		return this.animate({opacity: 'show'}, speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute("filter");
			if(jQuery.isFunction(callback))
				callback();
		});
	};
	$.fn.fadeOut = function(speed, callback) {
		return this.animate({opacity: 'hide'}, speed, function() { 
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute("filter");
			if(jQuery.isFunction(callback))
				callback();
		});
	};
	$.fn.sSlideDown = function(speed, callback) {
		return this.slideDown(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(jQuery.isFunction(callback))
				callback();
		});
	};
})(jQuery);


$(document).ready(function($){
	
	$(document).pngFix();
	
	$("a").click(function(){$(this).blur();});
	$("#proj_content p a").addClass("external");
	$("a.external, #nav a.featured").attr('target','_blank').parent('li').removeAttr('onclick');
	
	// navigation
	$("div#nav ul li").children("ul").addClass("hide");
//	$("div#nav ul li").hover(
//		function() { $(this).children("ul").slideDown(222); },
//		function() { $(this).children("ul").fadeOut(55); });
	$("#nav a").click(function(){this.blur();});
	
	
});
