function darkenimage(options){
//options
   var defaults = {
    speed: 150,
    color: "white",
    textposleft: "25%",
    textpostop: "50%",
	direction: "down"
   };
   var options = $.extend(defaults, options);
//end options

//hides
        $(".transdiv").hide();
        $(".imagetext").hide();
//end hides


//mouse on
        $(".imagehover").mouseenter(
          function(){
                $.imgw = $(this).width();
                $.imgh = $(this).height();
                $.imgt = $(this).position().top;
                $.imgl = $(this).position().left;
				$.imgt2	=	$.imgh + $.imgt;
                $.textt =   $.imgh / 2;
                $(".transdiv").css("width", $.imgw);
				//start with 0 height
                $(".transdiv").css("height", "0px");

                //Options
                $(".transdiv").css("text-align", options.textpos);
                $(".transdiv").css("color", options.color);
                //
                $(".transdiv").css("left", $.imgl);
				if(options.direction === "down"){
				$(".transdiv").css("top", $.imgt);
	                $(".transdiv").dequeue().animate({
	                    height : $.imgh,
	                },{ queue:false, duration: options.speed} );
				}else{
					$(".transdiv").css("top", $.imgt2);
	                $(".transdiv").dequeue().animate({
	                    height : $.imgh,
                        top : $.imgt
	                },{ queue:false, duration: options.speed} );
				}
                $(".transdiv").html("<div class='imagetext'></div>");
				$(".imagetext").html($(this).attr("alt"));
				$(".imagetext").css("left", options.textposleft);
				$(".imagetext").css("top", options.textpostop);


          });
//end mouse over

//mouse leave
          $(".transdiv").mouseleave(
          function(){
				$(".transdiv").html("");
                $(".transdiv").dequeue().stop().animate({
                    height : 0,
                    "padding-top" : 0,
                },{ queue:false, duration:0} );
		  		$(".transdiv").hide();
          }

        );
//end mouse leave
}