(function($) {
	var isLessThanIE7 = $.browser.msie && $.browser.version.substr(0,1)<7;
	$.fn.customFadeIn = function(speed, callback) {
		if (isLessThanIE7) {
			
			$(this).show();
		}
		else
			{
		
			
			$(this).fadeIn(speed, function() {
				/*	if(jQuery.browser.msie)
					$(this).get(0).style.removeAttribute('filter');
				if(callback != undefined)
					callback(); */
			});
			
			}
	};
	$.fn.customFadeOut = function(speed, callback) {
		if (isLessThanIE7) {
						
				$(this).hide();
			}		
		else
			{
			$(this).fadeOut(speed, function() {
				/* if(jQuery.browser.msie)
					$(this).get(0).style.removeAttribute('filter');
				if(callback != undefined)
					callback(); */
			});
				
		}
	};
})(jQuery);


$(function () {

	var isLessThanIE7 = $.browser.msie && $.browser.version.substr(0,1)<8;


    $("#content-wall").hover('out',
        function () {           
            $("#content-wall .overlay").each(function () {
            	if (isLessThanIE7) {
            		
            		$(this).removeClass('overlay');
            	}
            	else
            		{
            	$(this).removeClass('overlay').animate({
            	    opacity: 1
            	  }, 200);
            		}
            });            
            $(".additional-content-container").customFadeOut(400);
        }
    );
    $("#content-wall .item").hover(
        function () {
      
               $(".additional-content-container",this).customFadeIn(700);
               if (isLessThanIE7) {
            	   
            	   $(".item").not($(this)).addClass('overlay');
               }
               else
            	   {
               
               $(".item").not($(this)).addClass('overlay').animate({
            	    opacity: 0.35
            	  }, 200);
            	   }
         
            if ($(this).hasClass('overlay')) {
            	
            	 if (isLessThanIE7) {
            		 $(this).removeClass('overlay');
            	 }
            	 else
            		 {
                $(this).removeClass('overlay').animate({
            	    opacity: 1
          	  }, 200);
            		 }
            } 
           
          
        		
        },
        function () {
            $(".additional-content-container",this).customFadeOut(400);
        }
     );
});

