$(function (){

$('table.cartTable tr:even').not('tr.tableTitle').addClass('alternateRow');

/*$("ul.openmenu").css({ opacity: 0.5 });*/
$("ul.sidemenu").children("li").children("a").prepend('&#171;&nbsp;');

$(".signUpButton").hover(function(){
			$(this).stop().animate({ bottom: "0px" }, 200);
		},function(){
			$(this).stop().animate({ bottom: "-3px" }, 200);
		});

$(".footerHide").hover(function(){
			$(this).stop().animate({ top: "-2px" }, 200);
		},function(){
			$(this).stop().animate({ top: "-5px" }, 200);
		});


$(".topSocial ul li img").hover(function(){
			$(this).stop().animate({ marginTop: "-3px" }, 200);
		},function(){
			$(this).stop().animate({ marginTop: "0px" }, 200);
		});

/*Footer Toggle with Cookie*/
$(".footerHide").click(function(){
	$("#footerToggler").stop(true,true).slideToggle('400',function(){
	var status = $("#footerToggler").is(':hidden') ? 'Closed' : 'Open';
	$.cookie('footToggle', status);
	if (status == 'Closed') {
		$(".footerHideTxt").text('show');
	}
	else{
	$(".footerHideTxt").text('hide');
	}
	});
	
});
if ($.cookie('footToggle') == 'Closed') {
		$("#footerToggler").hide();
		$(".footerHideTxt").text('show');
	}
	
/* Fade In Menu on hover of the li */ 
 $(".sidemenu li").hover(function () {
                $(".openmenu", this).stop(true, true).delay(350).fadeIn('medium');
            }, function () {
                $(".openmenu", this).stop(true, true).delay(350).fadeOut('fast');
            });
 $(".openmenu li").hover(function () {
                $(".openmenu2", this).stop(true, true).delay(350).fadeIn('medium');
            }, function () {
                $(".openmenu2", this).stop(true, true).delay(350).fadeOut('fast');
            });
 $(".menu li").hover(function () {
                $(".mainMenuChildren", this).stop(true, true).delay(350).fadeIn('medium');
            }, function () {
                $(".mainMenuChildren", this).stop(true, true).delay(350).fadeOut('fast');
            });

/*Fix Link problem on the li*/
$(".openmenu li").click(function(){
document.location.href = $(this).children("a").attr('href');
});

$('a.btnSignUp').click(function(){
    $('.signUpRegister').stop(true,true).slideToggle('slow');
     return false;
});

$('a.customLogin').click(function(){
    $('li.customLogin').animate({width: '420px'}, {duration: 300});
    $(this).parent('li').remove();
    return false;
});

$('.openmenu li ul').removeClass('openmenu');
$('.openmenu li ul').addClass('openmenu2');
$('.menu li a:first').addClass('first');

});
