$(document).ready(function(){

		/* CLear out Text Fields dynamically */
		if ($('.focus-blur').length > 0){
			$.getScript('js/jquery.valueFx.js',function(){ 
				// Execute this function once the plugin is loaded
				$('.focus-blur').valueFx();
			});
		}
		
		/* Making Last Nav Item have a class of Last */
		$('#navigation li:first').addClass('first');
		$('#navigation li:last').addClass('last');
		
		/* Safe Mailto Script */
		$('.email').mailto();
		
		/* FadeIn Script for Alerts */
		$('p.notification').hide();
		$("p.notification").fadeIn(1300);

		$('p.error').hide();
		$("p.error").fadeIn(1300);
		
		/* Hide an Alert when the Hide link is clicked */
		$('a.close-alert').click(function(){
			$('div.dashboard-alert').fadeOut('fast');
			return false;
		});
		
		/* Script to Change Navigation Font to Futura */
		Cufon.replace('#navigation');

		/* Change the class of the Sidebar Selectors on Click */
		$('a.selections').click(function(){
			$(this).toggleClass('active');
		return false;
		});
		
		/* Change the class of the Sidebar Selectors on Click */
		$('a.individual-accounts').click(function(){
			$(this).toggleClass('selected');
		return false;
		});
		
		$('a.individual-institutions').click(function(){
			$(this).toggleClass('active');
		return false;
		});

		/* Show-Hide script for Saving a New Portfolio in the Sidebar */
		if ($('a.new-portfolio').length > 0){
		// hide div with a class of hidden
		$('div.save-portfolio').hide();
		// slide effect
		$('a.new-portfolio').click(function(){
			$('div.save-portfolio').fadeIn('fast');
			return false;
			});
		}

		/* Script to Switch the Password Text Field in the Login Bar to an Actual Password Field */
		$('#example-password-clear').show();
		$('#example-password-password').hide();
	
		$('#example-password-clear').focus(function() {
		$('#example-password-clear').hide();
		$('#example-password-password').show();
		$('#example-password-password').focus();
		});
		
		$('#example-password-password').blur(function() {
		if($('#example-password-password').val() == '') {
			$('#example-password-clear').show();
			$('#example-password-password').hide();
		}
	});
	$('.example-default-value').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;
	        	}
	    	});
		});
		
});