﻿
var mouseX, mouseY = 0;

jQuery(document).ready(function()
{
	
	
        jQuery().mousemove(function(e){
          mouseX = e.pageX;
          mouseY = e.pageY;
       });
       
        loadEffects();
        
        jQuery("input[type='text'], input[type='password']").addClass("text_input");
        
        jQuery(window).resize(function(){
            jQuery("#popin_coverDiv").height(jQuery(window).height());
	        jQuery("#popin_coverDiv").width(jQuery(window).width());
	        jQuery("#popin_coverDiv").height(jQuery(document).height());
	        jQuery("#popin_coverDiv").width(jQuery(document).width());
        });

        jQuery("input[idjQuery=fileProfilePhoto]").change(function()
        {

            jQuery("[idjQuery=btnUpload]").click();
            jQuery("#uploadFileForm").fadeOut(300);
        });
		


			jQuery("#st1").click(function () {
			jQuery("#tCon1").slideDown("slow");
		
	});
	
		jQuery("#st2").click(function () {
			jQuery("#tCon2").slideToggle("slow");
		
	});
		
		

	

});


function loadEffects()
{
            jQuery(".ui-fade-rollover").each(function(){
	            if(jQuery(this).attr("effect_loaded") == "true") return;
	            jQuery(this).attr("effect_loaded", "true"); 
                if(jQuery(this).attr("alt") != null && curNavSection != "" && jQuery(this).attr("alt").indexOf(curNavSection) != -1)
                {
                    jQuery(this).attr("src", jQuery(this).attr("src").replace("_off", "_over"));
                }
	            var wrapper = "<div style='display: block; height: auto; width: auto; background-repeat: no-repeat; background-image: url(" + jQuery(this).attr("src").replace("_off", "_over") + ")'></div>";
	            if(jQuery(this).parent().get(0).tagName == "A")
	            {
		            jQuery(this).parent().wrap(wrapper);
	            }
	            else
	            {
		            jQuery(this).wrap(wrapper);
	            }
	            
	            jQuery(this).bind("mouseenter", function(e){
	                jQuery(this).stop().animate({opacity: 0}, 300);
	            });
	            jQuery(this).bind("mouseleave", function(e){
	                jQuery(this).stop().animate({opacity: 1}, 300);
	            });


           
            
            
            });
            
                jQuery('img.swapImage').hover(function() {
                    jQuery(this).attr("src", jQuery(this).attr("src").replace("_off", "_over"));
					if(jQuery(this).attr("oSrc") != null)
					{
						jQuery(this).attr("src", jQuery(this).attr("oSrc").replace("_off", "_over"));
					}
                },
                
                function() {
                    jQuery(this).attr("src", jQuery(this).attr("src").replace("_over", "_off"));
					if(jQuery(this).attr("oSrc") != null)
					{
						jQuery(this).attr("src", jQuery(this).attr("oSrc").replace("_over", "_off"));
					}
                });
            

            
}

