$(function(){
	$('#top_categories ul li').hover(
		function () {
				$(this).find('a span').stop(true, true).animate({bottom:-100}, 500, function() {});
			    },
		function () {
				$(this).find('a span').animate({bottom:0});
			    })		
	});
$(function(){
	$('#top_categories ul li').hover(
		function () {
				$(this).find('a i').stop(true, true).animate({bottom:85}, 400, function() {});
		 	    },
		function () {
				$(this).find('a i').animate({bottom:0});
		 })
});

$(document).ready(function() {
        $("#faded").faded();

	$('#tree_menu ul li:has("div")').find('a:first').addClass('closed');
	/* $('#tree_menu ul li:has("div")').find('div').hide(); */
	$('#tree_menu li:has("div")').find('a:first').click (function (){ 
		$(this).parent('li').find('span:first').toggleClass('opened');
		$(this).parent('li').find('div:first').slideToggle();
	});

	$('a[rel*=lightbox]').lightBox();
});

function newCAPTCHA() {
	document.getElementById('captcha').src += '?c='+ Math.round(Math.random()*100000);
}

function popupStockAlert(url) {
	newwindow=window.open(url,'name','resizable=1,scrollbars=1,location=0,height=500,width=440');
	if(window.focus) {newwindow.focus()}
	return false;
}

function popupTellFriend(url) {
	newwindow=window.open(url,'name','resizable=1,scrollbars=1,location=0,height=500,width=450');
	if(window.focus) {newwindow.focus()}
	return false;
}
