1/* 2 SP AniMove Plugin 3*/ 4(function($, window, document, undefined){ 5 var spmtscr=0 6 ,func = function(){ 7 $('.move').each(function(){ 8 var t=$(this),wih=$(window).height(),w2=spmtscr+wih,p1=t.offset().top,p2=t.offset().top+t.height(),cf=t.attr('cf'),dr=t.attr('dr'),crd=0,wid=$(window).width(),ofs=0,enani=true;//,curt='',st=0; 9 ofs=t.attr('ofm'); 10 if (wid>=768) { 11 ofs=t.attr('oft'); 12 } 13 if (wid>=1200) { 14 ofs=t.attr('ofd'); 15 } 16 ofs = Number(ofs); 17 if (isNaN(ofs)) ofs=0; 18 if (isNaN(cf)) cf=0; 19 crd = ( (wih+t.height()) - (p2-spmtscr) )*cf, max=(wih+t.height())*cf; 20 if (crd<0) crd=0; 21 if (crd>max) crd=max; 22 crd=crd+ofs; 23 max=max+ofs; 24 if (t.hasClass('an')) enani=false; 25 if (t.hasClass('nomovedp') && (wid>1199)) enani=false; 26 if (t.hasClass('nomovetp') && (wid>=768) && (wid<1200) ) enani = false; 27 if (t.hasClass('nomovemp') && (wid<768)) enani = false; 28 if (enani) { 29 if ((p2>spmtscr)&&(w2>p1)) { 30 if (dr=='v+') t.css('transform','translateY('+crd+'px)'); 31 if (dr=='v-') t.css('transform','translateY(-'+crd+'px)'); 32 if (dr=='h+') t.css('transform','translateX('+crd+'px)'); 33 if (dr=='h-') t.css('transform','translateX(-'+crd+'px)'); 34 } else { 35 if (w2<=p1) { 36 t.css('transform',''); 37 } 38 if (spmtscr>=p2) { 39 if (dr=='v+') t.css('transform','translateY('+max+'px)'); 40 if (dr=='v-') t.css('transform','translateY(-'+max+'px)'); 41 if (dr=='h+') t.css('transform','translateX('+max+'px)'); 42 if (dr=='h-') t.css('transform','translateX(-'+max+'px)'); 43 } 44 } 45 } else t.css('transform',''); 46 }); 47 } 48 ,actions = { 49 init: function(params){ 50 //return this.each(function(){ 51 $(window).scroll(function(){ 52 func(); 53 spmtscr=window.pageYOffset; 54 }); 55 setTimeout(func(),1000); 56 //}); 57 } 58 }; 59 $.fn.spanimotion = function(action){ 60 if (typeof actions === 'object' || !actions) { 61 return actions.init.apply(this, arguments); 62 } 63 }; 64})(jQuery, window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.