(function($) {
	$.fn.customFadeIn = function(speed, callback) {
		$(this).animate({opacity:1},speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).animate({opacity:0},speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);


/////////////////////////////  category button roll over effect /////////////////////


$(document).ready(function() { 
	 var tabContainers = $('#tabs > div');
	 $(tabContainers).not(':first').hide();

	 $('.category_bar li a img').mouseover(function(){
		$(this).stop().animate({opacity:.75},100).css({'background-color' : 'white'});
		$(this).css({'cursor' : 'pointer'});
		return false;
	 });

	 $('.category_bar li a img').mouseout(function(){
		$(this).stop().animate({opacity:1},400).css({'background-color' : 'white'});
		return false;
	});
});

///////////////////////////// tab transition effect /////////////////////

function nextTab(id) {
	var tabContainers = $('#tabs > div');
	$(tabContainers).hide(0).filter(id).show(0).animate({ opacity:0}, 0).customFadeIn('400');
}