// JavaScript Document for Fade in Out effect

jQuery(document).ready(function () {

if (jQuery.browser.msie && jQuery.browser.version < 7) return; // Don't execute code if it's IE6 or below cause it doesn't support it.

// Main Page Hover Tiltes to effect the Images on top too.
jQuery(function(){
	
	jQuery('.featbox1').hover(function() {
		jQuery(".hovericon1").stop().animate({top:'-5px'},200);
	},function(){
		jQuery(".hovericon1").stop().animate({top:0},200);	
	});
	
	jQuery('.featbox2').hover(function() {
		jQuery(".hovericon2").stop().animate({top:'-5px'},200);
	},function(){
		jQuery(".hovericon2").stop().animate({top:0},200);	
	});
	
	jQuery('.featbox3').hover(function() {
		jQuery(".hovericon3").stop().animate({top:'-5px'},200);
	},function(){
		jQuery(".hovericon3").stop().animate({top:0},200);	
	});
	
});


  jQuery(".fade").fadeTo(1, 1);
  jQuery(".fade").hover(
    function () {
      jQuery(this).stop().fadeTo("fast", 0.2);
    },
    function () {
      jQuery(this).stop().fadeTo("fast", 1);
    }
  );
  
  jQuery(".fadebutton").stop().fadeTo("fast", 1);
  jQuery(".fadebutton").hover(
    function () {
      jQuery(this).stop().fadeTo("fast", 0.8);
    },
    function () {
      jQuery(this).stop().fadeTo("fast", 1);
    }
  );
  
  jQuery(".overlay").fadeTo(1, 0.5);

  jQuery(".captionfade").fadeTo(1, 0.8);
  jQuery(".captionfade").hover(
    function () {
      jQuery(this).fadeTo("fast", 0.9);
    },
    function () {
      jQuery(this).fadeTo("slow", 0.8);
    }
  );
  
  jQuery(".invfade").fadeTo(1, 0.5);
  jQuery(".invfade").hover(
    function () {
      jQuery(this).fadeTo("fast", 1);
    },
    function () {
      jQuery(this).fadeTo("slow", 0.5);
    }
  );
  
  jQuery(".photofade").fadeTo(1, 1);
  jQuery(".photofade").hover(
    function () {
      jQuery(this).fadeTo("fast", 0.88);
    },
    function () {
      jQuery(this).fadeTo("fast", 1);
    }
  );
  
});

