$(document).ready(function(){   
	$('#loadingDiv')
	    .hide()  // hide it initially
	    .ajaxStart(function() {
		        $(this).show();
		    })
	    .ajaxStop(function() {
		        $(this).hide();
		    });

    //animation for the info panel
	$(".info-tip").fadeOut(800).fadeIn(1000);
	
	$("a.close").click(function() {
		$(this).parent().parent().animate({opacity: 0.7}, 500).fadeOut(1000);
		return false;
	});
	
	function toggleBlindEffect(elt){
		var selectedEffect = 'blind';
		//most effect types need no options passed by default
		var options = {};
		//check if it's scale, transfer, or size - they need options explicitly set
		//run the effect
		$(elt).toggle(selectedEffect,options,500);
	};

	$(".toggle-disactivated").focus(function() {
		$(this).removeClass("disabled");
		$(this).css("color: black");
		$(this).val("");
	});
	$('.btn_hover_paypal, .btn_hover_form_50').css({  'backgroundPosition': '0 0' })
 	.hover(function () {
     	$(this).css({  'backgroundPosition': '0 -50px' });
 	},
      function(){
 		$(this).css({  'backgroundPosition': '0 0px' });
 	});
	$('.btn_hover_paypal_25, .btn_hover_form_25').css({  'backgroundPosition': '0 0' })
 	.hover(function () {
     	$(this).css({  'backgroundPosition': '0 -25px' });
 	},
      function(){
 		$(this).css({  'backgroundPosition': '0 0px' });
 	});
	
	$('.btn_hover a')
	    .css({  'backgroundPosition': '0 0' })
	    .hover(
	      function(){
	        $(this)
	          .stop()
	          .animate({
	            'opacity': 0
	          }, 650);
	      },
	      function(){
	        $(this)
	          .stop()
	          .animate({
	            'opacity': 1
	          }, 650);
	      }
	    );
});
/* empties textarea upon focus on a textarea that had a default value */
function textareaFocus(obj)
{
	obj.className = "textareaFocus";
	obj.value = "";
}

function highlightOn(obj)
{
	obj.style.background = "#ebf3fb";
}

function highlightOff(obj)
{
	obj.style.background = "white";
}
