/* <meta content="charset=UTF-8" /> */

var imgGalleryL = "#leargeimg a img";

(function($){
	$.fn.imgGallery = function(options) {

		$imgGalleryL = $(imgGalleryL);

		this.each(function() {
			$(this).hover(function(){
				var imgTsrc = $(this).attr("src");
				var imgTsrc2 = imgTsrc.replace(".thumbnail", "");
				var imgLsrc = $imgGalleryL.attr("src");
				if( imgTsrc2 != imgLsrc ) {
					$imgGalleryL.hide();
					$imgGalleryL.fadeOut("normal",function() {
						$imgGalleryL.attr("src",imgTsrc2);
						$imgGalleryL.fadeIn("fast",function() {
							$imgGalleryL.attr("src",imgTsrc2);
						});
					});
				}
			}, function(){
			});
        });

		return this;
	};
})(jQuery);

/*========== imgGallery ==========*/
$(document).ready(function(){
    $("#list .gallery_img a img").imgGallery();
    $("#singlePostWrap .gallery_img a img").imgGallery();
});

(function($){
	$.fn.imgGalleryLearge = function(options) {

		$imgGalleryL = $(imgGalleryL);

		this.each(function() {
			$(this).hover(function(){
				var imgTtitle = $(this).attr("title");
				var imgTtitle2 = "http://capture.cssclip.com/" + imgTtitle + ".jpg";
				var imgLsrc = $imgGalleryL.attr("src");
				if( imgTtitle2 != imgLsrc ) {
					$imgGalleryL.hide();
					$imgGalleryL.fadeOut("normal",function() {
						$imgGalleryL.attr("src",imgTtitle2);
						$imgGalleryL.fadeIn("fast",function() {
							$imgGalleryL.attr("src",imgTtitle2);
						});
					});
				}
			}, function(){
			});
        });

		return this;
	};
})(jQuery);

$(document).ready(function(){
    $("#leargeimg a img").imgGalleryLearge();
});

