$(function(){
				$("#top_pickup img,#side_ph img").imageBorder();
			});
 $.fn.imageBorder = function(){  
     return this.each(function(){ 
		 $(this).fadeTo(200, 0.50);
         $(this).addClass("jqImageBorder");  
         $(this).hover(  
             function(){  
                 $(this).fadeTo(200,1.0);  
                 $(this).toggleClass("jqIBRotate");  
             },  
             function(){  
                 $(this).fadeTo(200,0.50);  
                 $(this).toggleClass("jqIBRotate");  
             }  
         );  
     });  
 }  
 $(function(){
				$("#index_ichiran img,#photo_side img,#page a.hi").mageBorder();
			});
 $.fn.mageBorder = function(){  
     return this.each(function(){ 
		 $(this).fadeTo(200, 1.0);
         $(this).addClass("jqmageBorder");  
         $(this).hover(  
             function(){  
                 $(this).fadeTo(200,0.65);  
                 $(this).toggleClass("jqBRotate");  
             },  
             function(){  
                 $(this).fadeTo(200,1.0);  
                 $(this).toggleClass("jqBRotate");  
             }  
         );  
     });  
 }  
 
 $(function(){
	$("#photo_side a").click(function(){
		$("#photo_main img").before("<img src='"+$(this).attr("href")+"' alt=''>");
		$("#photo_main img:last").fadeOut("fast",function(){
			$(this).remove();
		});
		return false;
	});
	$("img.next").click(function(){
		$("#photo_side .pageWrap").animate({
			marginLeft : parseInt($("#side .pageWrap").css("margin-left"))-140+"px"
		},"fast");
	});
	$("img.prev").click(function(){
		$("#photo_side .pageWrap").animate({
			marginLeft : parseInt($("#side .pageWrap").css("margin-left"))+140+"px"
		},"fast");
	});
});
 
//ここからギャラリーマキノ分です
$(function(){
    $("#side_ph a").click(function(){
        $("#main_ph img").before("<img src='"+$(this).attr("href")+"' alt=''>");
        $("#main_ph img:last").fadeOut("fast",function(){
            $(this).remove()
        });
        return false;
    })
	$("img.next").click(function(){
    $("#side_ph .pageWrap").animate({
        marginLeft : parseInt($("#side_ph .pageWrap").css("margin-left"))-170+"px"
    },"fast")
	})
	$("img.prev").click(function(){
    $("#side_ph .pageWrap").animate({
        marginLeft : parseInt($("#side_ph .pageWrap").css("margin-left"))+170+"px"
    	},"fast")
	})

})
















// JavaScript Document
 
