	/*var activeLink="home";*/
	
	$(function() {
		// set opacity to nill on page load
		$("#navi span").css("opacity","0");


		// on mouse over
		$("#navi span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, "normal");
		},
		// on mouse out
		function () {
		// animate opacity to nill
		//currentOne=$(this).parent().get(0).id;
		//currentOne=currentOne.substring(4);
		//if (activeLink != currentOne){
			$(this).stop().animate({
				opacity: 0
			}, "slow");
		//}
		});
	
	
	});
	
	
	
	


//SHARE BUTTON-------------------------------------
$(document).ready(function() {
	$('#menu #addthis').show();
	 			$('#menu #addthis #addthis_center').animate({ width: "100px" }, 300 );
 			$('#menu #addthis #addthis_center .addthis_toolbox').fadeIn(300);
   /* $('#menu #addthis #addthis_center').animate({ width: "0px" }, 0 ); */
    
});
  

//LOGIN-----------------------------------------
$(document).ready(function() {
    $('#menu #login #login_content').show();
	$('#menu #login').show();
	$('#menu #login #login_content').hide();
	$('#menu #login #login_close').hide();
	$('#menu #login #login_open').css('visibility', 'visible' );
});
$(function(){
	$('#menu #login #login_open').click(function(event) {
		$('#menu #login #login_close').css('visibility', 'visible' );
		$('#menu #login #login_content').show(300);
		$('#menu #login #login_close').show(100);
		$('#menu #login #login_open').css('visibility', 'hidden' );
	});
	$('#menu #login #login_close').click(function(event) {
		$('#menu #login #login_content').hide(300);
		$('#menu #login #login_close').hide(100);
		$('#menu #login #login_open').css('visibility', 'visible' );
	});
});


//LOGIN FORM DEFAULT TEXT-------------------------------------------
jQuery.fn.DefaultValue = function(text){
    return this.each(function(){
		//Make sure we're dealing with text-based form fields
		if(this.type != 'text' && this.type != 'password' && this.type != 'textarea')
			return;
		
		//Store field reference
		var fld_current=this;
		
		//Set value initially if none are specified
        if(this.value=='') {
        	$(this).css('color', '#99ddff' );
			this.value=text;
		} else {
			//Other value exists - ignore
			return;
		}
		
		//Remove values on focus
		$(this).focus(function() {
			if(this.value==text || this.value==''){
				$(this).css('color', '#eeeeff' );
				this.value='';
			}
		});
		
		//Place values back on blur
		$(this).blur(function() {
			if(this.value==text || this.value==''){
				this.value=text;
				$(this).css('color', '#99ddff' );
			}
		});
		
		//Capture parent form submission
		//Remove field values that are still default
		$(this).parents("form").each(function() {
			//Bind parent form submit
			$(this).submit(function() {
				if(fld_current.value==text) {
					fld_current.value='';
				}
			});
		});
    });
};

$(document).ready(function() {
	//Assign default value to form field #1
	$("#login #userfield").DefaultValue("username");
	$("#login #passfield").DefaultValue("password");
});


