PageSourceSearch

https://www.goldmidwifery.com/components/com_roksprocket/layouts/features/assets/js/features.js

js goldmidwifery.com collected 2026-10-08 16:00:56 UTC 7,984 bytes, 43 lines download raw bytes

1/*
2 * @version   $Id: features.js 10889 2013-05-30 07:48:35Z btowles $
3 * @author    RocketTheme http://www.rockettheme.com
4 * @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
5 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
6 */
7((function(){if(typeof this.RokSprocket=="undefined"){this.RokSprocket={};
8}else{Object.merge(this.RokSprocket,{Features:null});}Element.implement({styles:function(){var c=moofx(this),b=c.style.apply(c,arguments);if(arguments.length==1&&typeof arguments[0]=="string"){return b;
9}return this;},moofx:function(){var b=moofx(this);b.animate.apply(b,arguments);return this;}});var a=new Class({Implements:[Options,Events],animations:{},options:{data:"features",settings:{}},initialize:function(b){this.setOptions(b);
10this.data=this.options.data;this.features=document.getElements("[data-"+this.data+"]");this.settings={};this.timers={};this.statuses={};},attach:function(b,c){b=typeOf(b)=="number"?document.getElements("[data-"+this.data+"="+this.getID(b)+"]"):b;
11c=typeOf(c)=="string"?JSON.decode(c):c;var d=(b?new Elements([b]).flatten():this.features);d.each(function(e){e.store("roksprocket:"+this.data+":attached",true);
12this.setSettings(e,c,"restore");var f={mouseenter:e.retrieve("roksprocket:"+this.data+":mouseenter",function(g){this.stopTimer.call(this,e);this.pause.call(this,e);
13}.bind(this)),mouseleave:e.retrieve("roksprocket:"+this.data+":mouseleave",function(g){this.resume.call(this,e);this.startTimer.call(this,e);}.bind(this)),pagination:e.retrieve("roksprocket:"+this.data+":relay",function(g,h){this.toPane.call(this,g,e,h);
14}.bind(this)),next:e.retrieve("roksprocket:"+this.data+":next",function(h,g){this.direction.call(this,h,e,g,"next");}.bind(this)),previous:e.retrieve("roksprocket:"+this.data+":previous",function(h,g){this.direction.call(this,h,e,g,"previous");
15}.bind(this)),swipe:e.retrieve("roksprocket:"+this.data+":swipe",function(h,g){h.preventDefault();this.direction.call(this,h,e,g,(h.direction=="right"?"previous":"next"));
16}.bind(this))};["mouseenter","mouseleave"].each(function(g){e.addEvent(g,f[g]);});["pagination","next","previous"].each(function(g,h){var j="[data-"+this.data+"-"+g+"]";
17if(h>0){j+=", [data-"+g+"]";}e.addEvent("click:relay("+j+")",f[g]);},this);if(Browser.Features.Touch){e.addEvent("swipe",f.swipe);}if(this.getSettings(e).autoplay&&this.getSettings(e).autoplay.toInt()){this.startTimer(e);
18}},this);},detach:function(b){b=typeOf(b)=="number"?document.getElements("[data-"+this.data+"="+this.getID(b)+"]"):b;var c=(b?new Elements([b]).flatten():this.features);
19c.each(function(d){d.store("roksprocket:"+this.data+":attached",false);var e={mouseenter:d.retrieve("roksprocket:"+this.data+":mouseenter"),mouseleave:d.retrieve("roksprocket:"+this.data+":mouseleave"),pagination:d.retrieve("roksprocket:"+this.data+":relay"),next:d.retrieve("roksprocket:"+this.data+":next"),previous:d.retrieve("roksprocket:"+this.data+":previous")};
20["mouseenter","mouseleave"].each(function(f){d.removeEvent(f,e[f]);});["pagination","next","previous"].each(function(f,g){var h="[data-"+this.data+"-"+f+"]";
21if(g>0){h+=", [data-"+f+"]";}d.removeEvent("click:relay("+h+")",e[f]);},this);if(Browser.Features.Touch){d.removeEvent("swipe",e.swipe);}},this);},setSettings:function(b,e,d){var f=this.getID(b),c=Object.clone(this.options.settings);
22if(!d||!this.settings["id-"+f]){this.settings["id-"+f]=Object.merge(c,e||c);}},getSettings:function(b){var c=this.getID(b);return this.settings["id-"+c];
23},getContainer:function(b){if(!b){b=document.getElements("[data-"+this.data+"]");}if(typeOf(b)=="number"){b=document.getElement("[data-"+this.data+"="+b+"]");
24}if(typeOf(b)=="string"){b=document.getElement(b);}return b;},getID:function(b){if(typeOf(b)=="number"){b=document.getElement("[data-"+this.data+"="+b+"]");
25}if(typeOf(b)=="string"){b=document.getElement(b);}return !b?b:b.get("data-"+this.data);},getRandom:function(){var c=Number.random(0,Object.getLength(this.animations)-1),b=Object.keys(this.animations);
26return this.animations[b[c]];},toPosition:function(c,b){c=this.getContainer(c);if(!c.retrieve("roksprocket:"+this.data+":attached")){return;}this.stopTimer(c);
27var d=c.getElements("[data-"+this.data+"-pagination]"),e=c.getElement("[data-"+this.data+"-pagination][class=active]");if(!d.length){return;}if(d[b]&&d[b].hasClass("active")){return;
28}if(b>d.length-1){b=0;}if(b<0){b=d.length-1;}if(d.length){d.removeClass("active");d[b].addClass("active");}this.animate(c,e.get("data-"+this.data+"-pagination")-1,b);
29},toPane:function(e,c,f){if(e){e.preventDefault();}c=this.getContainer(c);if(!c.retrieve("roksprocket:"+this.data+":attached")){return;}var d=c.getElements("[data-"+this.data+"-pagination]"),b=f.get("data-"+this.data+"-pagination")-1;
30if(b==-1){throw new Error("RokSprocket Feature ["+this.data+']: Instance ID "'+c.get("data-"+this.data)+'", index not found.');}this.toPosition(c,b);},direction:function(e,b,d,c){if(e){e.preventDefault();
31}c=c||"next";this[c](b,d);},next:function(d,e){d=this.getContainer(d);if(!d.retrieve("roksprocket:"+this.data+":attached")){return;}if(typeOf(d)=="elements"){return this.nextAll(d,e);
32}var c=d.getElements("[data-"+this.data+"-pagination]");if(!c.length){return;}var g=c.filter(function(h){return h.hasClass("active");}),b=c.indexOf(g.length?g[0]:"")||0,f=b+1;
33if(f>c.length-1){f=0;}this.toPosition(d,f);},nextAll:function(c,b){c=this.getContainer(c);if(typeOf(c)=="element"){return this.next(c,b);}c.each(function(d){this.next(d,b);
34},this);},previous:function(d,e){d=this.getContainer(d);if(!d.retrieve("roksprocket:"+this.data+":attached")){return;}if(typeOf(d)=="elements"){return this.previousAll(d,e);
35}var c=d.getElements("[data-"+this.data+"-pagination]");if(!c.length){return;}var g=c.filter(function(h){return h.hasClass("active");}),b=c.indexOf(g.length?g[0]:"")||0,f=b-1;
36if(f<0){f=c.length-1;}this.toPosition(d,f);},previousAll:function(c,b){c=this.getContainer(c);if(typeOf(c)=="element"){return this.previous(c,b);}c.each(function(d){this.previous(d,b);
37},this);},startTimer:function(c){c=this.getContainer(c);if(!c.retrieve("roksprocket:"+this.data+":attached")){return;}var e=this.getSettings(c),g=this.getID(c),b=this.statuses["id-"+g],f=e.autoplay.toInt(),d=(e.delay.toInt())*1000;
38clearTimeout(this.timers["id-"+g]);if(f&&b!="pause"){this.timers["id-"+g]=this.next.delay(d,this,c);}},stopTimer:function(b){b=this.getContainer(b);var c=this.getID(b);
39clearTimeout(this.timers["id-"+c]);},pause:function(b){b=this.getContainer(b);var c=this.getID(b);this.statuses["id-"+c]="pause";},resume:function(b){b=this.getContainer(b);
40var c=this.getID(b);this.statuses["id-"+c]="play";},animate:function(b,h,i){var c=b.getElements("[data-"+this.data+"-content]"),g=b.getElements("[data-"+this.data+"-image]"),d=this.getSettings(b),j={content:{show:{display:"block","z-index":2},hide:{display:"none","z-index":1}},image:{show:{display:"block",position:"relative","z-index":2},hide:{display:"none",position:"absolute","z-index":1}}},f={content:c[h],image:g[h]},e={content:c[i],image:g[i]};
41Object.each(f,function(l,k){f[k].style(j[k].hide);e[k].style(j[k].show);},this);if(d.autoplay&&d.autoplay.toInt()){this.startTimer(b);}},addAnimations:function(b){Object.merge(this.animations,b);
42}});a.prototype.addAnimations({crossfade:{from:{opacity:0}
42,to:{opacity:1}},fromTop:{from:{opacity:0,top:"-50%"},to:{opacity:1,top:"0%"}},fromTopLeft:{from:{opacity:0,top:"-50%",left:"-50%"},to:{opacity:1,top:"0%",left:"0%"}},fromTopRight:{from:{opacity:0,top:"-50%",right:"-50%"},to:{opacity:1,top:"0%",right:"0%"}},fromBottom:{from:{opacity:0,top:"50%"},to:{opacity:1,top:"0%"}},fromBottomLeft:{from:{opacity:0,top:"75%",left:"-75%"},to:{opacity:1,top:"0%",left:"0%"}},fromBottomRight:{from:{opacity:0,right:"-50%",top:"50%"},to:{opacity:1,right:"0%",top:"0%"}},fromLeft:{from:{opacity:0,left:"-50%"},to:{opacity:1,left:"0%"}},fromRight:{from:{opacity:0,right:"-50%"},to:{opacity:1,right:"0%"}}});
43this.RokSprocket.Features=a;})());

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.