
$(window).load(function() {
						

$('#slider').nivoSlider({
       startSlide:0,
        effect:'sliceDown', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed:600, // Slide transition speed
        pauseTime:8500, // How long each slide will show
     
        directionNav:false, // Next & Prev navigation
        directionNavHide:true, // Only show on hover
        controlNav:false // 1,2,3... navigation
    });
});

	$(document).ready(function() {
		
		$('#esLoginForm').submit( function() {
			var submitForm = false;
			var errortxt ='';
			var id = $('#ID').val();
			var pass = $('#Password').val();
		//	var rememberMe = $('#rememberMe').attr('checked');
			$.ajax({
				url: '/member.php',
				type: 'POST',
				async: false,
				cache: false,
				data: 'ID='+id+'&Password='+pass+'&rememberMe=true',
				success: function(response) {
					if (response == "pass") {
						submitForm = true;
					}else if(response == "pwfail") {
						var errortxt='<div class="errtext"> Error logging in, please check your Username / Password!</div>';
						$('.errorbox').slideDown('slow').html(errortxt);
					
						submitForm = false;
						$('#ID').focus();
					}else if(response == "deactivate") {
					var	errortxt ='<div class="errtext">You have chosen to remove your account.  Please use the Join form below</div>';
						submitForm = false;
						$('#ID').focus();

					} else {
						//alert(response);
						$('.errorbox').slideDown('slow').html(errortxt);
						//alert('Unknown Error');
						submitForm = false;
						$('#ID').focus();
					}
				}
			});
			return submitForm;
		});
		
		//disable links while animation is running
		$('a').click(function () {
    if ($(':animated').length) {
        return false;
    }
});

		
$('.boxdesc').hide();
 //jQuery.easing.def = 'easeOutBounce';
$('#Anglers_descr').animate(
               { height: "show" }, {
                    duration: '600',
                    easing: 'easeOutBack'
                });
	$('#Anglers').addClass('highlighton');
	//new ellana
	//alert('im in2');	
	$('.linkbox').click(function() {
			//	alert('im in');					 
		var boxid = $(this).attr('id');	
		$('.linkbox').removeClass('highlighton');
		$(this).toggleClass('highlighton');
		
		//console.log(boxid);
		if (!$(".linkbox").is(':animated')){
		$('.boxdesc').hide();
		
		if (boxid == 'College'){
			
		$('#College_descr').animate(
               { height: "show" }, {
                    duration: '600',
                    easing: 'easeOutBack'
                });
		}else if (boxid == 'Guides'){
		$('#Guides_descr').animate(
               { height: "show" }, {
                    duration: '600',
                    easing: 'easeOutBack'
                });
		}else if (boxid == 'Brands'){
		$('#Brands_descr').animate(
               { height: "show" }, {
                    duration: '600',
                    easing: 'easeOutBack'
                });		
		}else {
		$('#Anglers_descr').animate(
               { height: "show" }, {
                    duration: '600',
                    easing: 'easeOutBack'
                });
		} 
		
		};
		});
	
	
$('#ID').each(function() {
    var default_value = this.value;
    $(this).focus(function() {
        if(this.value == default_value) {
            this.value = '';
        }
    });
    $(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
        }
    });
});
		
		
		$('#password-clear').show();
$('#Password').hide();

$('#password-clear').focus(function() {
    $('#password-clear').hide();
    $('#Password').show();
    $('#Password').focus();
});
$('#Password').blur(function() {
    if($('#Password').val() == '') {
        $('#password-clear').show();
        $('#Password').hide();
    }
});
	});
