OSDN Git Service

Changes to be committed:
[vem/WITs.git] / disuse / lollytin / plugins / hover-animations / hover-animations-1.0.min.js
1 $(window).load(function(){if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){$('[class*="animate-scalein"]').hover(function(){$(this).find("img").stop(true,false).animate({transform:"scale(1.2)"})},function(){$(this).find("img").stop(true,false).animate({transform:"scale(1)"})});$(".animate-scaleout img").animate({transform:"scale(1.2)"},0);$(".animate-scaleout").hover(function(){$(this).find("img").stop(true,false).animate({transform:"scale(1)"})},function(){$(this).find("img").stop(true,false).animate({transform:"scale(1.2)"})});$('[class*="animate-bounce"]').hover(function(){$(this).find("img").stop(true,false).animate({marginTop:"-5px",marginBottom:"5px"},200)},function(){$(this).find("img").stop(true,false).animate({marginTop:"0px",marginBottom:"0px"},200)});function j(){$(".animate-filter").each(function(){$(this).find(".filter").remove();var l="filter-greyscale";var a=[["data-pb-greyscale-opacity","1"]];var o=a.length;var i=$(this).find("img").addClass("unfiltered");i.clone().insertAfter(i).addClass("filter "+l).removeClass("unfiltered");for(f=0;f<o;f++){$(this).find(".filter").attr(a[f][0],a[f][1])}})}j();$(window).resize(function(){if($(".animate-filter .unfiltered").width()>$(".animate-filter .filter").width()){j();processFilters()}});$(".animate-filter").hover(function(){$(this).find(".filter").stop(true,false).animate({opacity:1},200)},function(){$(this).find(".filter").stop(true,false).animate({opacity:0},200)});function p(){$(".animate-filter-reverse").each(function(){$(this).find(".filter").remove();var l="filter-greyscale";var a=[["data-pb-greyscale-opacity","1"]];var o=a.length;var i=$(this).find("img").addClass("unfiltered");i.clone().insertAfter(i).addClass("filter "+l).removeClass("unfiltered");for(f=0;f<o;f++){$(this).find(".filter").attr(a[f][0],a[f][1])}})}p();$(window).resize(function(){if($(".animate-filter-reverse .unfiltered").width()>$(".animate-filter-reverse .filter").width()){p();processFilters()}});$(".animate-filter-reverse").hover(function(){$(this).find(".filter").stop(true,false).animate({opacity:0},200)},function(){$(this).find(".filter").stop(true,false).animate({opacity:1},200)});$(".animate-text").each(function(){$(this).find(".overlay").children().each(function(){$(this).css("position","relative");if($(this).attr("data-animate-effect")){switch($(this).attr("data-animate-effect")){case"left":$(this).animate({left:$(this).outerWidth()*-1},0);break;case"right":$(this).animate({right:$(this).outerWidth()*-1},0);break;case"top":$(this).animate({top:$(this).outerWidth()*-1},0);break;case"bottom":$(this).animate({bottom:$(this).outerWidth()*-1},0);break;case"scale":$(this).animate({transform:"scale(0)"},0);break;case"fade":$(this).animate({opacity:0},0);break}}})});$(".animate-text").hover(function(){$(this).find(".overlay").children().each(function(){if($(this).attr("data-animate-effect")){switch($(this).attr("data-animate-effect")){case"left":$(this).stop(true,false).animate({left:0},400);break;case"right":$(this).stop(true,false).animate({right:0},400);break;case"top":$(this).stop(true,false).animate({top:0},400);break;case"bottom":$(this).stop(true,false).animate({bottom:0},400);break;case"scale":$(this).stop(true,false).animate({transform:"scale(1)"},400);break;case"fade":$(this).delay(200).animate({opacity:1},400);break}}})},function(){$(this).find(".overlay").children().each(function(){if($(this).attr("data-animate-effect")){switch($(this).attr("data-animate-effect")){case"left":$(this).stop(true,false).animate({left:$(this).outerWidth()*-1},300);break;case"right":$(this).stop(true,false).animate({right:$(this).outerWidth()*-1},300);break;case"top":$(this).stop(true,false).animate({top:$(this).outerWidth()*-1},300);break;case"bottom":$(this).stop(true,false).animate({bottom:$(this).outerWidth()*-1},300);break;case"scale":$(this).stop(true,false).animate({transform:"scale(0)"},400);break;case"fade":$(this).animate({opacity:0},400);break}}})});$(".animate-icon .overlay").animate({opacity:0},0);$(".animate-icon").hover(function(){$(this).find(".overlay").stop(true,false).animate({opacity:1},600)},function(){$(this).find(".overlay").stop(true,false).animate({opacity:0})});$("[class*='animate-fadein'] .overlay").animate({opacity:0},0);$("[class*='animate-fadein']").hover(function(){$(this).find(".overlay").stop(true,false).animate({opacity:1},600)},function(){$(this).find(".overlay").stop(true,false).animate({opacity:0})});$("[class*='animate-fadeout']").hover(function(){$(this).find(".overlay").stop(true,false).animate({opacity:0})},function(){$(this).find(".overlay").stop(true,false).animate({opacity:1},600)});$(".animate-zoomin .overlay").animate({transform:"scale(0)",opacity:0},0);$(".animate-zoomin").hover(function(){$(this).find(".overlay").stop(true,false).animate({transform:"scale(1)",opacity:1})},function(){$(this).find(".overlay").stop(true,false).animate({transform:"scale(0)",opacity:0})});$(".animate-zoomout .overlay").animate({transform:"scale(1)",opacity:1},0);$(".animate-zoomout").hover(function(){$(this).find(".overlay").stop(true,false).animate({transform:"scale(0)",opacity:0})},function(){$(this).find(".overlay").stop(true,false).animate({transform:"scale(1)",opacity:1})});var d="100%";function b(){$('[class*="animate-boxin"] > a').each(function(){$(this).find(".mask").remove();$(this).prepend('<span class="mask">');d=$(this).parent().width();if($(this).parent().width()>$(this).parent().height()){d=$(this).parent().width()+$(this).parent().width()/2}else{if($(this).parent().width()<$(this).parent().height()){d=$(this).parent().height()+$(this).parent().height()/2}else{if($(this).parent().width()==$(this).parent().height()){d=$(this).parent().height()+$(this).parent().height()/2}}}$(this).parent().attr("data-maximum",d);$(this).find(".mask").css({width:d,height:d,top:(d-$(this).parent().height())/2*-1,left:(d-$(this).parent().width())/2*-1});if($(this).parent().hasClass("animate-boxin-round")){$(this).find(".mask").css({"border-radius":d/2})}})}b();$(window).resize(function(){b()});$('[class*="animate-boxin"] .overlay').animate({opacity:0,transform:"scale(0)"},0);$('[class*="animate-boxin"]').hover(function(){_borderWidth=$(this).width();d=$(this).attr("data-maximum");$(this).find(".mask").stop(true,false).animate({borderWidth:d});$(this).find(".overlay").delay(100).stop(true,false).animate({opacity:1,transform:"scale(1)"},400)},function(){$(this).find(".mask").stop(true,false).animate({borderWidth:0});$(this).find(".overlay").stop(true,false).animate({opacity:0,transform:"scale(0)"},400)});$('[class*="animate-liftoff"] .overlay').animate({opacity:0},0);$('[class*="animate-liftoff"]').hover(function(){$(this).find(".overlay").stop(true,false).animate({left:10,top:10,opacity:1})},function(){$(this).find(".overlay").stop(true,false).animate({left:0,top:0,opacity:0})});$(".animate-corner .overlay").animate({left:"100%",top:"100%",opacity:0},0);$(".animate-corner").hover(function(){$(this).find(".overlay").stop(true,false).animate({left:0,top:0,opacity:1},600)},function(){$(this).find(".overlay").stop(true,false).animate({left:"100%",top:"100%",opacity:0},400)});function h(){var i=$(".animate-peekaboo .overlay h3").outerHeight(true);var a=$(".animate-peekaboo .overlay").outerHeight(true)-i;$(".animate-peekaboo .overlay").css({top:a});return a}var q=h();$(window).resize(function(){q=h()});$(".animate-peekaboo").hover(function(){$(this).find(".overlay").stop(true,false).animate({top:0},500)},function(){$(this).find(".overlay").stop(true,false).animate({top:q},500)});var c="";function m(){$('[class*="animate-reveal"]').each(function(){c=$(this).find(".overlay").outerHeight();$(this).find(".overlay").attr("data-height",c).css({height:"0px",padding:0}).animate({opacity:0},0)})}m();$('[class*="animate-reveal"]').hover(function(){c=$(this).find(".overlay").attr("data-height");$(this).find(".overlay").stop(true,false).animate({height:c,opacity:1},200);$(this).stop(true,false).animate({outlineWidth:10})},function(){$(this).find(".overlay").stop(true,false).animate({opacity:0,height:0},200);$(this).stop(true,false).animate({outlineWidth:0})});var c=0,k=0;function g(){$('[class*="animate-paraslide"]').each(function(){var i=$(this).find(".overlay h3").height()+20;var a=$(this).find(".overlay").height()-i;$(this).attr("data-height",$(this).height());$(this).find(".overlay").css({top:a})})}g();window.onorientationchange=function(a){g()};$(window).resize(function(){g()});$('[class*="animate-paraslide"]').hover(function(){var i=$(this).find(".overlay h3").height()+20;var a=$(this).find(".overlay p").height()+20;var l=$(this).find(".overlay").height()-i-a;$(this).find(".overlay").stop(true,false).animate({top:l},300)},function(){var i=$(this).find(".overlay h3").height()+20;var a=$(this).find(".overlay").height()-i;$(this).find(".overlay").stop(true,false).animate({top:a},300)});$(".animate-paraslide-image").hover(function(){$(this).find("img").stop(true,false).animate({top:$(this).find("img").height()*-1/3},300)},function(){$(this).find("img").stop(true,false).animate({top:0},300)});$(".animate-slidein-up .overlay").animate({top:"-100%"},0);$(".animate-slidein-up").hover(function(){$(this).find(".overlay").stop(true,false).animate({top:0},800)},function(){$(this).find(".overlay").stop(true,false).animate({top:"-100%"},500)});$(".animate-slidein-down .overlay").css("top","auto").animate({bottom:"-100%"},0);$(".animate-slidein-down").hover(function(){$(this).find(".overlay").stop(true,false).animate({bottom:0},800)},function(){$(this).find(".overlay").stop(true,false).animate({bottom:"-100%"},500)});$(".animate-slidein-left .overlay").animate({left:"-100%"},0);$(".animate-slidein-left").hover(function(){$(this).find(".overlay").stop(true,false).animate({left:0},400)},function(){$(this).find(".overlay").stop(true,false).animate({left:"-100%"},500)});$(".animate-slidein-right .overlay").css("left","auto").animate({right:"-100%"},0);$(".animate-slidein-right").hover(function(){$(this).find(".overlay").stop(true,false).animate({right:0},400)},function(){$(this).find(".overlay").stop(true,false).animate({right:"-100%"},500)});$(".animate-slideout-up .overlay").animate({top:0},0);$(".animate-slideout-up").hover(function(){$(this).find(".overlay").stop(true,false).animate({top:"-100%"},500)},function(){$(this).find(".overlay").stop(true,false).animate({top:0},800)});$(".animate-slideout-down .overlay").css("top","auto").animate({bottom:0},0);$(".animate-slideout-down").hover(function(){$(this).find(".overlay").stop(true,false).animate({bottom:"-100%"},500)},function(){$(this).find(".overlay").stop(true,false).animate({bottom:0},800)});$(".animate-slideout-left .overlay").animate({left:0},0);$(".animate-slideout-left").hover(function(){$(this).find(".overlay").stop(true,false).animate({left:"-100%"},500)},function(){$(this).find(".overlay").stop(true,false).animate({left:0},800)});$(".animate-slideout-right .overlay").css("left","auto").animate({right:0},0);$(".animate-slideout-right").hover(function(){$(this).find(".overlay").stop(true,false).animate({right:"-100%"},500)},function(){$(this).find(".overlay").stop(true,false).animate({right:0},800)});$(".animate-move-up").each(function(){$(this).find(".overlay").css({top:"100%"})});$(".animate-move-up").hover(function(){$(this).css({height:$(this).height()});$(this).find(".overlay").stop(true,false).animate({top:0},200);$(this).find("img").stop(true,false).animate({top:$(this).height()*-1},200)},function(){$(this).css({height:"auto"});$(this).find(".overlay").stop(true,false).animate({top:"100%"},200);$(this).find("img").stop(true,false).animate({top:0},200)});$(".animate-move-down").each(function(){$(this).find(".overlay").css({bottom:"100%",top:"auto"})});$(".animate-move-down").hover(function(){$(this).css({height:$(this).height()});$(this).find(".overlay").stop(true,false).stop(true,false).animate({bottom:"0%"},200);$(this).find("img").stop(true,false).stop(true,false).animate({bottom:$(this).height()*-1},200)},function(){$(this).css({height:"auto"});$(this).find(".overlay").stop(true,false).stop(true,false).animate({bottom:"100%"},200);$(this).find("img").stop(true,false).stop(true,false).animate({bottom:0},200)});$(".animate-move-left").each(function(){$(this).find(".overlay").css({top:0,left:"100%"})});$(".animate-move-left").hover(function(){$(this).find(".overlay").stop(true,false).animate({left:0},200);$(this).find("img").stop(true,false).animate({right:$(this).width()},200)},function(){$(this).find(".overlay").stop(true,false).animate({left:"100%"},200);$(this).find("img").stop(true,false).animate({right:"0%"},200)});$(".animate-move-right").each(function(){$(this).find(".overlay").css({top:0,right:"100%",left:"auto"})});$(".animate-move-right").hover(function(){$(this).find(".overlay").stop(true,false).animate({right:"0%"},200);$(this).find("img").stop(true,false).animate({left:$(this).width()},200)},function(){$(this).find(".overlay").stop(true,false).animate({right:"100%"},200);$(this).find("img").stop(true,false).animate({left:"0%"},200)});$(".animate-flyin-up").each(function(){$(this).find(".overlay").animate({bottom:$(this).parent().parent().height()*-1,opacity:0},0)});$(".animate-flyin-up").hover(function(){$(this).find(".overlay").stop(true,false).animate({bottom:0,opacity:1},400)},function(){$(this).find(".overlay").stop(true,false).animate({bottom:$(this).height()*-1,opacity:0},400)});$(".animate-flyin-down").each(function(){$(this).find(".overlay").animate({bottom:$(this).parent().parent().height(),opacity:0},0)});$(".animate-flyin-down").hover(function(){$(this).find(".overlay").stop(true,false).animate({bottom:0,opacity:1},400)},function(){$(this).find(".overlay").stop(true,false).animate({bottom:$(this).height(),opacity:0},400)});$(".animate-flyin-left").each(function(){$(this).find(".overlay").animate({left:$(this).parent().parent().width()*-1,opacity:0},0)});$(".animate-flyin-left").hover(function(){$(this).find(".overlay").stop(true,false).animate({left:0,opacity:1},400)},function(){$(this).find(".overlay").stop(true,false).animate({left:$(this).width()*-1,opacity:0},400)});$(".animate-flyin-right").each(function(){$(this).find(".overlay").animate({left:$(this).parent().parent().width(),opacity:0},0)});$(".animate-flyin-right").hover(function(){$(this).find(".overlay").stop(true,false).animate({left:0,opacity:1},400)},function(){$(this).find(".overlay").stop(true,false).animate({left:$(this).width(),opacity:0},400)});$('[class*="animate-rotate"]').each(function(){var a=$(this).find(".overlay").width();$(this).find(".overlay").animate({transform:"rotate(90deg) translateX("+a+")",opacity:0},0)});$('[class*="animate-rotate"]').hover(function(){var a=$(this).find(".overlay").width();$(this).find(".overlay").stop(true,false).animate({transform:"rotate(0deg) translateX(0)",opacity:1})},function(){var a=$(this).find(".overlay").width();$(this).find(".overlay").stop(true,false).animate({transform:"rotate(90deg) translateX("+a+")",opacity:0})});$(".animate-rotate-image").hover(function(){$(this).find("img").stop(true,false).animate({transform:"rotate(-90deg)",opacity:1})},function(){$(this).find("img").stop(true,false).animate({transform:"rotate(0deg)",opacity:1})});$('[class*="animate-rotate-imageout"]').hover(function(){var a=$(this).find("img").height();$(this).find("img").stop(true,false).animate({transform:"rotate(-90deg) translateY(-"+a+")"})},function(){$(this).find("img").stop(true,false).animate({transform:"rotate:(0deg) translateY(0)"})});$(".animate-skew .overlay").animate({transform:"skewX(-45deg)",opacity:0,left:"100%"},0);$(".animate-skew ").hover(function(){$(this).find(".overlay").stop(true,false).animate({transform:"skewX(0deg)",opacity:1,left:"0%"})},function(){$(this).find(".overlay").stop(true,false).animate({transform:"skewX(-45deg)",opacity:0,left:"100%"})});$(".animate-skewup .overlay").animate({transform:"skewY(45deg)",opacity:0,top:"100%"},0);$(".animate-skewup ").hover(function(){$(this).find(".overlay").stop(true,false).animate({transform:"skewY(0deg)",opacity:1,top:"0%"})},function(){$(this).find(".overlay").stop(true,false).animate({transform:"skewY(45deg)",opacity:0,top:"100%"})})}});