/* JavaScript Document*/
$(document).ready(function(){
						   
 $("a.profileAvatarEdit, div.editIcon").mouseover(function(){
	//mouse over and show edit icon							 
		$("div.editIcon").show("");
		});
 $("a.profileAvatarEdit").mouseout(function(){
	//mouse over and show edit icon	
		$("div.editIcon").hide("");
		});
 
 $("#profileAvatarPopup a.closeButton").click(function(){
		$("div.profileAvatarPopup").slideToggle("fast");							 
										 });
    $("a.profileAvatarEdit, div.editIcon").click(function(){
		$("div.profileAvatarPopup").slideToggle("fast");
	});
			
	//account info
	$('a.changePass').toggle(function(){
		$(this).addClass('open');
		$('.section.password').show();
	},function(){
		$(this).removeClass('open');
		$('.section.password').hide();
	});
		 
	//more emails
	$('a.moreEmailsLink').toggle(function(){
		$(this).children('span').removeClass('icn_small_plus').addClass('icn_small_minus');
		$('.moreEmailAdresses').show();
	},function(){
		$(this).children('span').removeClass('icn_small_minus').addClass('icn_small_plus');
		$('.moreEmailAdresses').hide();
		});
  
	//Saved Addresses
	$('a.addAnotherAddress').toggle(function(){
		$(this).children('span').removeClass('icn_small_plus').addClass('icn_small_minus');
		$('#AddressBookForm').show();
	},function(){
		$(this).children('span').removeClass('icn_small_minus').addClass('icn_small_plus');
		$('#AddressBookForm').hide();
	});  

	//Saved payment method
	$('a.addAnotherCC').toggle(function(){
		$(this).children('span').removeClass('icn_small_plus').addClass('icn_small_minus');
		$('#PaymentTypeForm').show();
	},function(){
		$(this).children('span').removeClass('icn_small_minus').addClass('icn_small_plus');
		$('#PaymentTypeForm').hide();
});

	//Preferred Stores
	$("a.sizeChartLink").click(function(){
		window.open(this.href,this.target,'width=800,toolbar=no,scrollbars=no,status=yes,resizable=yes,menubar=no,location=yes,top=150,left=150');
		return false;
	});
	$("#pref_sizes_selection input.save").click(function(){
	$("#pref_sizes_selection p.messageBox").show();	
	return false;
	});
 });//on ready



