$(function(){ // Coin Slider / http://workshop.rs/projects/coin-slider Thank you !! $("#coinslider").coinslider( { width:600, height:300 }); $("#waterwheel-carousel-default").waterwheelCarousel({ startingItem: 2, startingItemSeparation: 100, startingWaveSeparation: 0, autoPlay: 7000, }); jsHover ( "bkhover" , "alphabk" , [50,200] , 0.2 ); jsHover ( "whhover" , "alphawh" , [50,50] , 0.4 ); /* fixedSize = $("#fixed").height(); $(window).scroll( function() { check = $("html").height() - ( $(window).scrollTop() + $("#fixed").height() + 10 ); check2 = $("html").height() - ( $("#fixed").height() + 334 ); fixpos = $("#fixed").position(); if ( check < 192 ) { $("#fixed") .css("position","absolute") .css("top",check2); } else if ( $(window).scrollTop() > 134 ) { $("#fixed") .css("position","fixed") .css("top","10px"); } else if ( $(window).scrollTop() < 134 ) { $("#fixed").removeAttr("style"); } }); */ }); // Hover処理 function jsHover( targetClass, overlayClass , fadeTime , opacity , display ) { if ( !display ) { display = "inline-block"; } for(var i=0; i < $("a." + targetClass + " > img").length; i++){ var selected = $("a." + targetClass + " > img").eq(i) var selWidth = selected.outerWidth(); var selHeight= selected.outerHeight(); selected.parent().width(selWidth); selected.parent().height(selHeight); selected.parent().prepend('
') .find("div") .addClass( overlayClass ) .addClass( "jshover" ) .css("z-index","1") .css("position","absolute") .css("width",selWidth) .css("height",selHeight) .css("opacity",0); } $("a." + targetClass).hover( function() { $(this).find("div.jshover").fadeTo( fadeTime[0] , opacity ); }, function() { $(this).find(".jshover").stop().fadeOut(fadeTime[1]); } ); $("a." + targetClass).css("position","relative") .css("display", display ) .find("img") .css("position","absolute") .css("z-index","0") .css("display","block"); }