$(function() {
// OPACITY OF BUTTON SET TO 50%
$(".imagetitle1").css("opacity","0.4");
 
// ON MOUSE OVER
$(".imagetitle1").hover(function () {
 
// SET OPACITY TO 100%
$(this).stop().animate({
opacity: 0.75
}, "fast");
},
 
// ON MOUSE OUT
function () {
 
// SET OPACITY BACK TO 50%
$(this).stop().animate({
opacity: 0.4
}, "slow");
});
});


// trying a plugin
(function( $ ){

  $.fn.myxPlugin = function() {
	$(this).css("opacity","0.4");
    this.hover(function () {
		// SET OPACITY TO 100%
		$(this).stop().animate({
		opacity: 0.75
		}, "fast");
		},
		 
		// ON MOUSE OUT
		function () {
		 
		// SET OPACITY BACK TO 50%
		$(this).stop().animate({
		opacity: 0.4
		}, "slow");
		});
  };
})( jQuery );


(function( $ ){

  $.fn.myFade = function( settings ) {
  
   var config = {
        'initialopacity': 0.4,
        'finalopacity': 1.0
    };
    if (settings){$.extend(config, settings);}

	$(this).css("opacity",config.initialopacity);
    this.hover(function () {
		// SET OPACITY TO 100%
		$(this).stop().animate({
		opacity: config.finalopacity
		}, "fast");
		},
		 
		// ON MOUSE OUT
		function () {
		 
		// SET OPACITY BACK TO 50%
		$(this).stop().animate({
		opacity: config.initialopacity
		}, "slow");
		});
  };
})( jQuery );
