rambling-slider-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ (function(){
2
+ /*!
3
+ * jQuery Rambling Slider
4
+ * http://github.com/egonzalez0787/rambling.slider
5
+ * http://ramblinglabs.com
6
+ *
7
+ * Copyright 2011-2012, Rambling Labs
8
+ * Released under the MIT license.
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ *
11
+ * January 2012
12
+ *
13
+ * Based on jQuery Nivo Slider by Gilbert Pellegrom
14
+ */
15
+ var g,f,e,b,a;var d=Array.prototype.indexOf||function(m){for(var k=0,j=this.length;k<j;k++){if(this[k]===m){return k}}return -1},c=function(i,j){return function(){return i.apply(j,arguments)}},h=Array.prototype.slice;Array.prototype.shuffle=function(){var l,k,m,n;for(l=m=this.length;m<=1?l<=1:l>=1;m<=1?l++:l--){k=parseInt(Math.random()*l);n=[this[k],this[--l]],this[l]=n[0],this[k]=n[1]}return this};Array.prototype.contains=function(i){return d.call(this,i)>=0};Array.prototype.where=function(i){var l,m,k,j;j=[];for(m=0,k=this.length;m<k;m++){l=this[m];if(i(l)){j.push(l)}}return j};Array.prototype.first=function(i){var j;if(!i){i=(function(k){return true})}return((function(){var m,l,k;k=[];for(m=0,l=this.length;m<l;m++){j=this[m];if(i(j)){k.push(j)}}return k}).call(this))[0]};Array.prototype.map=function(m){var k,l,j,i;if(!m){m=(function(n){return n})}i=[];for(l=0,j=this.length;l<j;l++){k=this[l];i.push(m(k))}return i};Array.prototype.random=function(){return this[Math.floor(Math.random()*this.length)]};Array.prototype.fromObject=function(i,l){var j,k,m;if(!l){l=(function(n,o){return o})}m=c(function(n,o){return this.push(l(n,o))},this);for(j in i){k=i[j];m(j,k)}return this};Array.prototype.sortOutIn=function(){var m,k,l,j,n;j=[];l=this.length;m=Math.floor(l/2);n=c(function(o){j.push(this[o]);return j.push(this[l-o-1])},this);for(k=0;0<=m?k<m:k>m;0<=m?k++:k--){n(k)}if(l%2){j.push(this[m])}return j};(function(i){i.fn.reverse=[].reverse;i.fn.shuffle=[].shuffle;i.fn.sortOutIn=function(){return i(Array.prototype.sortOutIn.apply(this))};i.fn.sortInOut=function(){return this.sortOutIn().reverse()};i.fn.as2dArray=function(j){var k,l,m;m=0;l=0;k=i("");k[m]=i("");this.each(function(){k[m][l]=i(this);l++;if(l===j){m++;l=0;return k[m]=i("")}});return k};i.fn.containsFlash=function(){return this.find("object,embed").length};return i.fn.equals=function(k){var j;j=true;j=this.length===k.length;this.each(function(l,m){return j=j&&m===k.get(l)});return j}})(jQuery);g=(function(){function i(k,j,l){this.slider=k;this.settings=j;this.vars=l;this.boxer=new f(this.slider)}i.prototype.createBoxes=function(k,j){var l,o,m,n,p;if(k==null){k=this.settings.boxCols}if(j==null){j=this.settings.boxRows}m=Math.round(this.slider.width()/k);o=Math.round(this.slider.height()/j);l=this.slider.find("#rambling-animation");p=c(function(s){var r,q;q=[];for(r=0;0<=k?r<k:r>k;0<=k?r++:r--){q.push(c(function(t){return l.append(this.boxer.getRamblingBox(m,o,s,t,this.settings,this.vars))},this)(r))}return q},this);for(n=0;0<=j?n<j:n>j;0<=j?n++:n--){p(n)}return this.slider.find(".rambling-box")};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingBoxGenerator=g;f=(function(){function i(j){this.slider=j}i.prototype.getBox=function(m,o,n,l,k){var j;j={opacity:0,left:m*l,top:o*n,width:l===(k.boxCols-1)?this.slider.width()-(m*l):m,height:o,overflow:"hidden"};return $('<div class="rambling-box"></div>').css(j)};i.prototype.getRamblingBox=function(o,q,s,l,m,p){var j,n,k,r;n=this.getBox(o,q,s,l,m);j=m.alignBottom?q*(m.boxRows-(s+1)):"auto";r=m.alignBottom?"auto":s*q;k={display:"block",width:this.slider.width(),left:-(l*o),top:m.alignBottom?"auto":-r,bottom:m.alignBottom?-j:"auto"};n.css({top:r,bottom:j});n.append("<span><img src='"+(p.currentSlideElement.attr("src")||p.currentSlideElement.find("img").attr("src"))+"' alt=''/></span>");n.find("img").css(k);return n};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingBoxer=f;e=(function(){function i(k,j,l){this.slider=k;this.settings=j;this.vars=l;this.slicer=new b(this.slider)}i.prototype.getOneSlice=function(j){if(j==null){j=this.vars.currentSlideElement}return this.createSlices(1,j)};i.prototype.createSlices=function(m,o){var k,j,l,n;if(m==null){m=this.settings.slices}if(o==null){o=this.vars.currentSlideElement}l=Math.round(this.slider.width()/m);k=this.slider.find("#rambling-animation");n=c(function(p){return k.append(this.slicer.getRamblingSlice(l,p,m,o,this.settings))},this);for(j=0;0<=m?j<m:j>m;0<=m?j++:j--){n(j)}return this.slider.find(".rambling-slice")};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingSliceGenerator=e;b=(function(){function i(j){this.slider=j}i.prototype.getSlice=function(l,j,k){var m;m={left:l*j,width:j===(k-1)?this.slider.width()-(l*j):l,height:0,opacity:0,overflow:"hidden"};return $('<div class="rambling-slice"></div>').css(m)};i.prototype.getRamblingSlice=function(o,j,n,p,m){var l,k;l=this.getSlice(o,j,n);l.append('<span><img src="'+(p.attr("src")||p.find("img").attr("src"))+'" alt=""/></span>');k={display:"block",width:this.slider.width(),left:-j*o,bottom:m.alignBottom?0:"auto",top:m.alignBottom?"auto":0};l.find("img").css(k);return l};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingSlicer=b;(function(k){var l,j,i;i=["stop","start","option","effect","destroy","previousSlide","nextSlide","slide","theme"];k.fn.ramblingSlider=function(){var r,s,n,m,o,p,q;n=arguments[0],o=2<=arguments.length?h.call(arguments,1):[];s=d.call(i,n)>=0;m=typeof n==="string";p=this.data("rambling:slider");r=function(t,u){return !u.length||(t==="option"&&u.length===1&&typeof u[0]==="string")};if(p){if(s){q=p[n].apply(p,o);if(r(n,o)){return q}else{return this}}else{if(m){return k.error("Method '"+n+"' not found.")}else{return k.error("Slider already initialized.")}}}else{if(s||m){return k.error("Tried to call method '"+n+"' on element without slider.")}}return this.each(function(u,v){var t;t=k(this);if(t.data("rambling:slider")){return}p=new l(this,n);t.data("rambling:slider",p);p.initialize();return p.run()})};k.fn.ramblingSlider.defaults={slices:15,boxCols:8,boxRows:4,speed:500,pauseTime:4500,manualAdvance:false,captionOpacity:0.8,theme:"default",alignBottom:false,effect:"random",startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",adaptImages:false,useLargerImage:true,keyboardNav:true,pauseOnHover:true,prevText:"Prev",nextText:"Next",imageTransitions:null,flashTransitions:null,imageFlashTransitions:null,transitionGroups:[],transitionGroupSuffixes:[],beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};j=["startSlide","directionNav","directionNavHide","controlNav","controlNavThumbs","controlNavThumbsFromRel","controlNavThumbsSearch","controlNavThumbsReplace","adaptImages","useLargerImage","keyboardNav","pauseOnHover","prevText","nextText","imageTransitions","flashTransitions","imageFlashTransitions","transitionGroups","transitionGroupSuffixes","afterLoad"];return l=function(B,K){var y,U,S,H,al,ak,x,r,ag,F,w,ab,D,Q,ae,p,T,v,N,G,af,z,o,Y,V,I,ai,A,P,M,aj,Z,C,u,ac,t,X,R,ah,ad,J,n,aa,q,s,O,L,E,m,W;s=k(B);F=s.children(":not(#rambling-animation)");ad=k.extend({},k.fn.ramblingSlider.defaults,K);O=0;ag=0;o=null;z=null;Q=null;E=[];L=[];W={currentSlide:0,currentSlideElement:"",previousSlideElement:"",totalSlides:0,running:false,paused:false,stopped:false};s.data("rambling:vars",W);C=new e(s,ad,W);aj=new g(s,ad,W);this.stop=function(){W.stopped=true;return s};this.start=function(){W.stopped=false;return s};this.previousSlide=function(){n("prev");return s};this.nextSlide=function(){n("next");return s};this.slide=function(){var am,an;an=1<=arguments.length?h.call(arguments,0):[];if(!an.length){return W.currentSlide}am=an[0]%W.totalSlides;if(!(W.running||W.totalSlides===1)){W.currentSlide=am-1;Z(s,F,ad,"control")}return s};this.destroy=function(){s.find("#rambling-animation,.rambling-slice,.rambling-box,.rambling-caption,.rambling-directionNav,.rambling-controlNav").remove();s.removeClass("ramblingSlider adaptingSlider");s.removeAttr("style");s.data("rambling:vars",null);s.data("rambling:slider",null);s.unbind("rambling:finished");s.unbind("hover");u();s.children().show().children().show();return s};this.option=c(function(){var ao,an,am,ap;am=1<=arguments.length?h.call(arguments,0):[];if(!am.length){return ad}ao=am[0],ap=am[1];an=typeof ao==="object";if(ao==="effect"){return this.effect.apply(this,ap?[ap]:void 0)}if(ao==="theme"){return this.theme.apply(this,ap?[ap]:void 0)}if(an){return k.extend(ad,ao)}else{if(ap!=null){if(d.call(j,ao)>=0){return k.error("Slider already running. Option '"+ao+"' cannot be changed.")}return ad[ao]=ap}else{return ad[ao]}}},this);this.effect=function(){var am;am=1<=arguments.length?h.call(arguments,0):[];if(!am.length){return ad.effect}ad.effect=am[0];return s};this.theme=function(){var ao,an,am;am=1<=arguments.length?h.call(arguments,0):[];if(!am.length){return ad.theme}an=ad.theme;ad.theme=am[0];ao=["theme-"+an,"theme-"+k.fn.ramblingSlider.defaults.theme];s.parents(ao.map(function(ap){return"."+ap}).join(",")).removeClass(ao.join(" ")).addClass("theme-"+ad.theme);return s};this.initialize=function(){R();W.currentSlide=ad.startSlide=ad.startSlide%W.totalSlides;t(F);X();y();S();U(F);H();if(ad.pauseOnHover){s.hover(Y,m)}ac();return w()};this.run=function(){if(!ad.manualAdvance&&W.totalSlides>1){return O=window.setInterval((function(){return Z(s,F,ad,false)}),ad.pauseTime)}};ah=function(){o=k.extend({},k.fn.ramblingSlider.defaults.imageTransitions,ad.imageTransitions);z=k.extend({},k.fn.ramblingSlider.defaults.imageFlashTransitions,ad.imageFlashTransitions);Q=k.extend({},k.fn.ramblingSlider.defaults.flashTransitions,ad.flashTransitions);E=G("transitionGroups");return L=G("transitionGroupSuffixes")};G=function(am){var an;an=[];k.each(k.fn.ramblingSlider.defaults[am],function(ao,ap){return an.push(ap)});k.each(ad[am],function(ao,ap){return an.push(ap)});return an};R=c(function(){this.effect(ad.effect);this.theme(ad.theme);ah();s.css({position:"relative"});s.addClass("ramblingSlider");W.totalSlides=F.length;I();if(ad.adaptImages){V()}return ai()},this);I=function(){return s.prepend(k('<div id="rambling-animation"></div>').css({width:s.width(),height:s.height(),overflow:"hidden"}))};V=function(){return s.addClass("adaptingSlider")};ai=function(){var an,am;am=s.find("#rambling-animation");F.each(function(){var ap,ao;ap=k(this);ap.css({display:"none"});ao=ap.clone().addClass("slideElement");if(ao.containsFlash()){if(!ao.find("param[name=wmode]").length){ao.find("object").prepend('<param name="wmode" value="opaque" />')}ao.find("embed").attr({wmode:"opaque"})}return am.append(ao)});F=am.children();F.each(function(){var at,ao,ap,ar,aq;at=k(this);ar=null;if(at.is("a")&&!at.containsFlash()){ar=at.addClass("rambling-imageLink");at=at.find("img:first")}ap=at.width()||at.attr("width");ao=at.height()||at.attr("height");if(ap>s.width()&&ad.useLargerImage){s.width(ap)}if(ao>s.height()&&(ad.useLargerImage||!ad.adaptImages)){s.height(ao)}aq=at.find("object,embed");aq.height(s.height());aq.width(s.width());if(ar){ar.css({display:"none"})}return at.css({display:"none"})});an=t(F);if(an.is("a")){return an.css({display:"block"})}};y=function(){s.append(k('<div class="rambling-caption"><p></p></div>').css({display:"none",opacity:ad.captionOpacity}));return A(ad)};S=function(){var am;if(ad.directionNav&&W.totalSlides>1){am=k("<div class='rambling-directionNav'><a class='rambling-prevNav'>"+ad.prevText+"</a><a class='rambling-nextNav'>"+ad.nextText+"</a></div>");s.append(am);if(ad.directionNavHide){am.hide();s.hover((function(){return am.show()}),(function(){return am.hide()}))}s.find("a.rambling-prevNav").live("click",function(){return n("prev")});return s.find("a.rambling-nextNav").live("click",function(){return n("next")})}};U=c(function(){var ao,an,ap,am,ar,aq;am=this;if(ad.controlNav){ap=k('<div class="rambling-controlNav"></div>');s.append(ap);ar=function(at){var au;if(ad.controlNavThumbs){au=F.eq(at);if(!au.is("img")){au=au.find("img:first")}if(ad.controlNavThumbsFromRel){return ap.append("<a class='rambling-control' rel='"+at+"'><img src='"+(au.attr("rel"))+"' alt='' /></a>")}else{return ap.append("<a class='rambling-control' rel='"+at+"'><img src='"+(au.attr("src").replace(ad.controlNavThumbsSearch,ad.controlNavThumbsReplace))+"' alt='' /></a>")}}else{return ap.append("<a class='rambling-control' rel='"+at+"'>"+(at+1)+"'</a>")}};for(an=0,aq=F.length;0<=aq?an<aq:an>aq;0<=aq?an++:an--){ar(an)}ao=s.find(".rambling-controlNav a");ao.filter(":eq("+W.currentSlide+")").addClass("active");return ao.live("click",function(){if(W.running){return false}if(k(this).hasClass("active")){return false}u();X();return am.slide(k(this).attr("rel"))})}},this);H=function(){if(ad.keyboardNav){return k(window).keypress(function(am){if(am.keyCode===37){n("prev")}if(am.keyCode===39){return n("next")}})}};ac=c(function(){var am;am=this;return s.bind("rambling:finished",function(){var an;W.running=false;an=k(F.get(W.currentSlide));an.siblings().css({display:"none"});if(an.is("a")){an.css({display:"block"})}if(O===""&&!W.paused){am.run()}X();s.find(".rambling-slice,.rambling-box").remove();return ad.afterChange.call(this)})},this);w=function(){if(ad.imageTransitions){k.extend(o,ad.imageTransitions)}if(ad.imageFlashTransitions){k.extend(z,ad.imageFlashTransitions)}if(ad.flashTransitions){return k.extend(Q,ad.flashTransitions)}};A=function(an){var am,ao;am=s.find(".rambling-caption");ao=W.currentSlideElement.attr("title");if(ao){if(ao.startsWith("#")){ao=k(ao).html()}if(am.css("display")==="block"){am.find("p").fadeOut(an.speed,function(){var ap;ap=k(this);ap.html(ao);return ap.fadeIn(an.speed)})}else{am.find("p").html(ao)}return am.fadeIn(an.speed)}else{return am.fadeOut(an.speed)}};t=function(am){var an;an=k(am.get(W.currentSlide));W.previousSlideElement=W.currentSlideElement;W.currentSlideElement=an;if(an.is("a")&&!an.containsFlash()){W.currentSlideElement=an.find("img:first")}return an};u=function(){window.clearInterval(O);return O=""};Y=function(){W.paused=true;return u()};m=c(function(){W.paused=false;if(O===""){return this.run()}},this);n=function(am){if(W.running||W.totalSlides===1){return false}u();if(am==="prev"){W.currentSlide-=2}return Z(s,F,ad,am)};X=function(){var am;am=s.find(".currentSlideElement");if(am.equals(W.currentSlideElement)){return}am.removeClass("currentSlideElement alignTop alignBottom").css({display:"none","z-index":0});am=W.currentSlideElement;am.siblings(".slideElement").css({display:"none"});am.addClass("currentSlideElement").addClass(ad.alignBottom?"alignBottom":"alignTop");am.css({display:"block","z-index":0});return am.find("img").css({display:"block"})};v=function(){var am;am=ad.effect.split(",");k.each(E,function(an,ap){var ao;if(am.contains(ap)){ao=[am.indexOf(ap),1];k.each(L,function(aq,ar){return ao.push(""+ap+ar)});return am.splice.apply(am,ao)}});return am};T=function(){var ap,an,am,ao;ao=[];am=[];if(W.currentSlideElement.containsFlash()){if(W.previousSlideElement.containsFlash()){am=Q;an=Q.slideInRight}else{am=z;an=z.fadeOut}}else{am=o;an=o.fadeIn}ap=v();ao=[].fromObject(am,function(aq,ar){return aq});if(ad.effect!=="random"){ao=ao.where(function(aq){return ap.contains(aq)})}ao=ao.map(function(aq){return am[aq]});ao["default"]=an;return ao};N=function(){var am;am=T();return am.random()||am["default"]};M=function(){return s.trigger("rambling:finished")};x=function(am){var an;an=C.getOneSlice();an.css({top:(ad.alignBottom?"auto":0),bottom:(ad.alignBottom?0:"auto")});return an.animate(am.apply(an,[s,k.extend({},ad)])||{width:s.width()},ad.speed*2,"",function(){if(ad.afterChange){ad.afterChange.apply(an)}return M()})};r=function(am,ao){var an;an=C.createSlices();ag=0;if(ao){an=ao.apply(an)}return an.each(function(ap,ar){var aq,at;at=k(ar);if(ap===ad.slices-1){aq=M}window.setTimeout((function(){return at.animate(am.apply(at,[ap,ar])||{},ad.speed,"",aq)}),100+ag);return ag+=50})};al=function(am,ao){var an;an=aj.createBoxes();ag=0;if(ao){an=ao.apply(an)}return am.apply(an,[M])};ak=function(am,an){return al(function(ar){var aq,at,ap,av,au,ao;aq=this;av=ad.boxCols*ad.boxRows;ap=0;ao=[];for(at=0,au=ad.boxCols*2;0<=au?at<au:at>au;0<=au?at++:at--){ao.push((function(ax){var ay,az,aw;aw=[];for(ay=0,az=ad.boxRows;0<=az?ay<az:ay>az;0<=az?ay++:ay--){aw.push((function(aB){var aA,aC;if(ax>=0&&ax<ad.boxCols){aA=k(aq[aB][ax]);if(ap===av-1){aC=ar}window.setTimeout((function(){return aA.animate(am.apply(aA),ad.speed/1.3,"",aC)}),100+ag);ap++;ag+=20}return ax--})(ay))}return aw})(at))}return ao},function(){var ao;ao=this;if(an){ao=an.call(this)}return ao.as2dArray(ad.boxCols)})};J=function(am){return r((function(an,ao){this.css({top:0});return{height:s.height(),opacity:"1"}}),am)};q=function(am){return r((function(an,ao){this.css({bottom:0});return{height:s.height(),opacity:"1"}}),am)};aa=function(am){return r((function(an,ao){this.css((an%2?{bottom:0}:{top:0}));return{height:s.height(),opacity:"1"}}),am)};ae=function(am){return r((function(ao,ap){var an,aq;aq=k(ap);an={width:aq.width(),opacity:"1"};aq.css({top:0,height:"100%",width:0});return an}),am)};D=function(am){return r((function(an,ao){this.css({height:s.height()});return{opacity:"1"}}),am)};ab=function(am){return al(function(an){var ao;ao=this.length;ag=0;return this.each(function(ap){var aq,ar;aq=k(this);if(ap===ao-1){ar=an}window.setTimeout((function(){return aq.animate({opacity:"1"},ad.speed,"",ar)}),100+ag);return ag+=20})},am)};P=function(am){return ak((function(){return{opacity:"1"}}),am)};af=function(am){return ak((function(){var an,ao;ao=this.width();an=this.height();this.css({width:0,height:0});return{opacity:"1",width:ao,height:an}}),am)};p=function(){var am;return am={setSliderBackground:X,currentSlideElement:W.currentSlideElement,previousSlideElement:W.previousSlideElement,raiseAnimationFinished:M,settings:k.extend({},ad),createSlices:function(ao,an){return C.createSlices(ao,an)},createBoxes:function(ao,an){return aj.createBoxes(ao,an)},getOneSlice:function(an){return C.getOneSlice(an)},animateFullImage:x,animateSlices:r,animateBoxes:al,animateBoxesIn2d:ak,slideUpSlices:q,slideDownSlices:J,slideUpDownSlices:aa,foldSlices:ae,fadeSlices:D,fadeBoxes:ab,rainBoxes:P,growBoxes:af}};Z=function(ap,an,ao,am){if(W.currentSlide===W.totalSlides-1){ao.lastSlide.call(this)}if(W.stopped&&!am){return false}ao.beforeChange.call(this);W.currentSlide=(W.currentSlide+1)%W.totalSlides;if(W.currentSlide===0){ao.slideshowEnd.call(this)}if(W.currentSlide<0){W.currentSlide=W.totalSlides+W.currentSlide}t(an);if(ao.controlNav){ap.find(".rambling-controlNav a").removeClass("active").filter(":eq("+W.currentSlide+")").addClass("active")}A(ao);W.running=true;return N().call(p())};ad.afterLoad.call(this);return this}})(jQuery);(function(n){var l,j,r,m,o,i,p,q,k;l=[{name:"sliceUp",helper:"slideUpSlices"},{name:"sliceDown",helper:"slideDownSlices"},{name:"sliceUpDown",helper:"slideUpDownSlices"},{name:"sliceFade",helper:"fadeSlices"},{name:"fold",helper:"foldSlices"}];l.suffixes=[{name:"Right",sorter:void 0},{name:"Left",sorter:n.fn.reverse},{name:"OutIn",sorter:n.fn.sortOutIn},{name:"InOut",sorter:n.fn.sortInOut},{name:"Random",sorter:n.fn.shuffle}];r=[{name:"boxRain",helper:"rainBoxes"},{name:"boxGrow",helper:"growBoxes"}];r.suffixes=[{name:"Forward",sorter:void 0},{name:"Reverse",sorter:n.fn.reverse},{name:"OutIn",sorter:n.fn.sortOutIn},{name:"InOut",sorter:n.fn.sortInOut},{name:"Random",sorter:n.fn.shuffle}];p=[l,r];j={fadeIn:function(s){this.css({height:"100%",width:s.width(),position:"absolute",top:0,left:0});return{opacity:"1"}},fadeOut:function(s){this.css({height:"100%",width:s.width(),position:"absolute",top:0,left:0});return{opacity:"1"}},rolloverRight:function(){this.css({height:"100%",width:0,opacity:"1"})},rolloverLeft:function(t,s){this.css({height:"100%",width:0,opacity:"1",left:"auto",right:0});this.find("img").css({left:-t.width()}).animate({left:0},s.speed*2);return{width:t.width()}},slideInRight:function(t,s){this.css({height:"100%",width:0,opacity:"1"});this.find("img").css({left:-t.width()}).animate({left:0},s.speed*2);return{width:t.width()}},slideInLeft:function(s){var t;this.css({height:"100%",width:0,opacity:"1",left:"auto",right:0});t=c(function(){this.css({left:0,right:"auto"});return s.unbind("rambling:finished",t)},this);s.bind("rambling:finished",t)}};o=function(t,s,u){this.currentSlideElement.css(t);return window.setTimeout((c(function(){return this.currentSlideElement.animate(s,this.settings.speed*2,this.raiseAnimationFinished)},this)),this.settings.speed*2)};m=function(s){var u,t;t={top:(this.settings.alignBottom?"auto":0),bottom:(this.settings.alignBottom?0:"auto"),left:s,position:"absolute",display:"block"};u={top:"auto",left:"auto",position:"relative"};return o.apply(this,[t,{left:0},u])};n.fn.ramblingSlider.defaults.imageTransitions={};n.each(p,function(s,t){return n.each(t,function(u,v){return n.each(t.suffixes,function(w,x){return n.fn.ramblingSlider.defaults.imageTransitions[""+v.name+x.name]=function(){return this[v.helper](x.sorter)}})})});k=function(s,t){return n.fn.ramblingSlider.defaults.imageTransitions[s]=function(){return this.animateFullImage(t)}};for(i in j){q=j[i];k(i,q)}n.fn.ramblingSlider.defaults.imageFlashTransitions={fadeOut:function(){var s,t;t=this.getOneSlice(this.previousSlideElement);t.css({height:"100%",width:t.parents(".ramblingSlider").width(),position:"absolute",top:0,left:0,opacity:"1"});this.setSliderBackground();s=this;return t.animate({opacity:"0"},this.settings.speed*2,"",function(){t.css({display:"none"});return s.raiseAnimationFinished()})}};n.fn.ramblingSlider.defaults.flashTransitions={slideInRight:function(){return m.apply(this,[-this.currentSlideElement.parents(".ramblingSlider").width()])},slideInLeft:function(){return m.apply(this,[this.currentSlideElement.parents(".ramblingSlider").width()])}};n.extend(n.fn.ramblingSlider.defaults.imageFlashTransitions,n.fn.ramblingSlider.defaults.flashTransitions);n.fn.ramblingSlider.defaults.transitionGroups=["fade","rollover","slideIn"];n.each(p,function(s,t){return n.each(t,function(u,v){return n.fn.ramblingSlider.defaults.transitionGroups.push(v.name)})});return n.fn.ramblingSlider.defaults.transitionGroupSuffixes=["Right","Left","OutIn","InOut","Random","Forward","Reverse","In","Out"]})(jQuery);String.prototype.contains=function(i){return this.indexOf(i)!==-1};String.prototype.decapitalize=function(){var j,i;j=this.slice(0,1);i=this.slice(1);return""+(j.toLowerCase())+i};String.prototype.startsWith=function(i){return this.substring(0,i.length)===i};String.prototype.endsWith=function(i){return this.substring(this.length-i.length,this.length)===i}}).call(this);
@@ -0,0 +1,175 @@
1
+ /*
2
+ * jQuery Rambling Slider
3
+ * http://github.com/egonzalez0787/rambling.slider
4
+ *
5
+ * Copyright 2011-2012, Rambling Labs
6
+ * Released under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ *
9
+ * January 2012
10
+ *
11
+ * Based on jQuery Nivo Slider by Gilbert Pellegrom
12
+ */
13
+
14
+ @mixin absolute {
15
+ position: absolute;
16
+ }
17
+
18
+ @mixin absolute-top-left {
19
+ @include absolute;
20
+ top: 0;
21
+ left: 0;
22
+ }
23
+
24
+ @mixin absolute-bottom-left {
25
+ @include absolute;
26
+ bottom: 0;
27
+ left: 0;
28
+ }
29
+
30
+ @mixin absolute-bottom-right {
31
+ @include absolute;
32
+ bottom: 0;
33
+ right: 0;
34
+ }
35
+
36
+ @mixin transition-piece {
37
+ @include absolute;
38
+ display: block;
39
+ z-index: 5;
40
+ }
41
+
42
+ .ramblingSlider {
43
+ position: relative
44
+ img {
45
+ @include absolute-top-left;
46
+ }
47
+
48
+ a.rambling-imageLink {
49
+ @include absolute-top-left;
50
+ width: 100%;
51
+ height: 100%;
52
+ border: 0;
53
+ padding: 0;
54
+ margin: 0;
55
+ display: none;
56
+ }
57
+
58
+ .rambling-slice {
59
+ @include transition-piece;
60
+ height: 100%;
61
+ }
62
+
63
+ .rambling-box {
64
+ @include transition-piece;
65
+ }
66
+
67
+ .rambling-caption {
68
+ @include absolute-bottom-left;
69
+ background: #000000;
70
+ color: #ffffff;
71
+ opacity: 0.8;
72
+ width: 100%;
73
+ z-index: 8;
74
+ }
75
+
76
+ p {
77
+ padding: 5px;
78
+ margin: 0;
79
+ }
80
+
81
+ a {
82
+ display: inline !important;
83
+ }
84
+
85
+ .rambling-directionNav a {
86
+ @include absolute;
87
+ top: 45%;
88
+ z-index: 9;
89
+ cursor: pointer;
90
+ }
91
+
92
+ .rambling-prevNav {
93
+ left: 0px;
94
+ }
95
+
96
+ .rambling-nextNav {
97
+ right: 0px;
98
+ }
99
+
100
+ .rambling-controlNav a {
101
+ position: relative;
102
+ z-index: 9;
103
+ cursor: pointer;
104
+
105
+ &.active {
106
+ font-weight: bold;
107
+ }
108
+ }
109
+
110
+ #rambling-animation {
111
+ @include absolute-top-left;
112
+ overflow: hidden;
113
+ }
114
+
115
+ object {
116
+ display: none;
117
+ }
118
+
119
+ .slideElement,
120
+ .slideElement object {
121
+ display: block;
122
+ }
123
+ }
124
+
125
+ .rambling-html-caption {
126
+ display: none;
127
+ }
128
+
129
+ .adaptingSlider {
130
+ .currentSlideElement img,
131
+ img.currentSlideElement {
132
+ @include absolute;
133
+ display: block;
134
+ width: 100%;
135
+ }
136
+
137
+ img.currentSlideElement.alignBottom {
138
+ @include absolute-bottom-right;
139
+ top: auto;
140
+ left: auto;
141
+ }
142
+
143
+ .rambling-box, .rambling-slice {
144
+ span {
145
+ position: relative;
146
+ display: block;
147
+ height: 100%;
148
+ }
149
+
150
+ img {
151
+ display: block;
152
+ @include absolute-bottom-right;
153
+ }
154
+ }
155
+ }
156
+
157
+ .theme-default #slider {
158
+ margin: 100px auto 0 auto;
159
+ width: 618px;
160
+ height: 246px;
161
+
162
+ &.adaptingSlider {
163
+ width: 750px;
164
+ height: 299px;
165
+ }
166
+ }
167
+
168
+ .theme-pascal.slider-wrapper,
169
+ .theme-orman.slider-wrapper {
170
+ margin-top: 150px;
171
+ }
172
+
173
+ @import "themes/default";
174
+ @import "themes/orman";
175
+ @import "themes/pascal";
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Skin Name: Rambling Slider Default Theme
3
+ * Skin Type: flexible
4
+ * Description: The default skin for the Rambling Slider.
5
+ * Version: 1.0
6
+ * Author: Edgar Gonzalez (originally by Gilbert Pellegrom)
7
+ * Author URI: http://ramblinglabs.com
8
+ */
9
+
10
+ .theme-default {
11
+ .ramblingSlider {
12
+ position: relative;
13
+ background: #ffffff url(/assets/themes/default/loading.gif) no-repeat 50% 50%;
14
+ margin-bottom: 50px;
15
+ -webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
16
+ -moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
17
+ box-shadow: 0px 1px 5px 0px #4a4a4a;
18
+
19
+ img {
20
+ position: absolute;
21
+ top: 0px;
22
+ left: 0px;
23
+ display: none;
24
+ }
25
+
26
+ a {
27
+ border: 0;
28
+ display: block;
29
+ }
30
+
31
+ .rambling-controlNav {
32
+ position: absolute;
33
+ left: 50%;
34
+ bottom: -42px;
35
+ margin-left: -40px; /* Tweak this to center bullets */
36
+
37
+ a {
38
+ display: block;
39
+ width: 22px;
40
+ height: 22px;
41
+ background: url(/assets/themes/default/bullets.png) no-repeat;
42
+ text-indent: -9999px;
43
+ border: 0;
44
+ margin-right: 3px;
45
+ float: left;
46
+ &.active {
47
+ background-position: 0 -22px;
48
+ }
49
+ }
50
+ }
51
+
52
+ .rambling-directionNav a {
53
+ display: block;
54
+ width: 30px;
55
+ height: 30px;
56
+ background: url(/assets/themes/default/arrows.png) no-repeat;
57
+ text-indent: -9999px;
58
+ border: 0;
59
+ }
60
+
61
+ a.rambling-nextNav {
62
+ background-position: -30px 0;
63
+ right: 15px;
64
+ }
65
+
66
+ a.rambling-prevNav {
67
+ left: 15px;
68
+ }
69
+
70
+ .rambling-caption {
71
+ font-family: Helvetica, Arial, sans-serif;
72
+
73
+ a {
74
+ color: #ffffff;
75
+ border-bottom: 1px dotted #ffffff;
76
+
77
+ &:hover {
78
+ color: #ffffff;
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Skin Name: Orman Theme
3
+ * Skin Type: fixed
4
+ * Image Width: 568
5
+ * Image Height: 268
6
+ * Description: A light and green skin for the Nivo Slider.
7
+ * Version: 1.0
8
+ * Author: Edgar Gonzalez (originally by Gilbert Pellegrom & Orman Clark)
9
+ * Author URI: http://ramblinglabs.com
10
+ */
11
+
12
+ .theme-orman.slider-wrapper {
13
+ background: url(/assets/themes/orman/slider.png) no-repeat;
14
+ width: 722px;
15
+ height: 337px;
16
+ margin: 0 auto;
17
+ padding-top: 18px;
18
+ position: relative;
19
+ }
20
+
21
+ .theme-orman {
22
+ .ramblingSlider {
23
+ position: relative;
24
+ width: 568px;
25
+ height: 268px;
26
+ margin-left: 77px;
27
+ background: url(/assets/themes/orman/loading.gif) no-repeat 50% 50%;
28
+
29
+ img {
30
+ position: absolute;
31
+ top: 0px;
32
+ left: 0px;
33
+ display: none;
34
+ width: 568px;
35
+ height: 268px;
36
+ }
37
+
38
+ a {
39
+ border: 0;
40
+ display: block;
41
+ }
42
+
43
+ .rambling-controlNav {
44
+ position: absolute;
45
+ left: 50%;
46
+ bottom: -60px;
47
+ margin-left: -30px;
48
+
49
+ a {
50
+ display: block;
51
+ width: 10px;
52
+ height: 10px;
53
+ background: url(/assets/themes/orman/bullets.png) no-repeat;
54
+ text-indent: -9999px;
55
+ border: 0;
56
+ margin-right: 7px;
57
+ float: left;
58
+
59
+ &.active {
60
+ background-position: 0 -10px;
61
+ }
62
+ }
63
+ }
64
+
65
+ .rambling-directionNav a {
66
+ display: block;
67
+ width: 25px;
68
+ height: 200px;
69
+ background: url(/assets/themes/orman/arrows.png) no-repeat 0% 50%;
70
+ text-indent: -9999px;
71
+ border: 0;
72
+ top: 40px;
73
+ }
74
+
75
+ a.rambling-nextNav {
76
+ background-position: 100% 50%;
77
+ right: -40px;
78
+ padding-right: 20px;
79
+ }
80
+
81
+ a.rambling-prevNav {
82
+ left: -40px;
83
+ padding-left: 20px;
84
+ }
85
+
86
+ .rambling-caption {
87
+ font-family: Helvetica, Arial, sans-serif;
88
+
89
+ a {
90
+ color: #ffffff;
91
+ border-bottom: 1px dotted #ffffff;
92
+
93
+ &:hover {
94
+ color: #ffffff;
95
+ }
96
+ }
97
+ }
98
+ }
99
+
100
+ .ribbon {
101
+ background: url(/assets/themes/orman/ribbon.png) no-repeat;
102
+ width: 111px;
103
+ height: 111px;
104
+ position: absolute;
105
+ top: -3px;
106
+ left: 56px;
107
+ z-index: 300;
108
+ }
109
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Skin Name: Pascal Theme
3
+ * Skin Type: fixed
4
+ * Image Width: 630
5
+ * Image Height: 235
6
+ * Description: A nice, light skin for the Nivo Slider.
7
+ * Version: 1.0
8
+ * Author: Edgar Gonzalez (originally by Gilbert Pellegrom & Pascal Gartner)
9
+ * Author URI: http://dev7studios.com
10
+ */
11
+
12
+ .theme-pascal.slider-wrapper {
13
+ background: url(/assets/themes/pascal/slider.png) no-repeat;
14
+ width: 668px;
15
+ height: 299px;
16
+ margin: 0 auto;
17
+ padding-top: 17px;
18
+ position: relative;
19
+ }
20
+
21
+ .theme-pascal {
22
+ .ramblingSlider {
23
+ position: relative;
24
+ width: 630px;
25
+ height: 235px;
26
+ margin-left: 19px;
27
+ background: url(/assets/themes/pascal/loading.gif) no-repeat 50% 50%;
28
+
29
+ img {
30
+ position: absolute;
31
+ top: 0px;
32
+ left: 0px;
33
+ display: none;
34
+ width: 630px; /* Make sure your images are the same size */
35
+ height: 235px; /* Make sure your images are the same size */
36
+ }
37
+
38
+ a {
39
+ border: 0;
40
+ display: block;
41
+ }
42
+
43
+ .rambling-controlNav {
44
+ background: url(/assets/themes/pascal/controlnav.png) no-repeat;
45
+ width: 251px;
46
+ height: 40px;
47
+ position: absolute;
48
+ left: 200px; /* Tweak this to center bullets */
49
+ bottom: -42px;
50
+ padding: 8px 0 0 82px;
51
+ z-index: 20;
52
+
53
+ a {
54
+ display: block;
55
+ width: 22px;
56
+ height: 22px;
57
+ background: url(/assets/themes/pascal/bullets.png) no-repeat;
58
+ text-indent: -9999px;
59
+ border: 0;
60
+ margin-right: 3px;
61
+ float: left;
62
+
63
+ &.active {
64
+ background-position: 0 -22px;
65
+ }
66
+ }
67
+ }
68
+
69
+ .rambling-directionNav a {
70
+ display: none;
71
+ }
72
+
73
+ .rambling-caption {
74
+ bottom: 40%;
75
+ left: auto;
76
+ right: 0px;
77
+ width: auto;
78
+ max-width: 630px;
79
+ overflow: hidden;
80
+ background: #fff;
81
+ text-shadow: none;
82
+ font-family: arial, serif;
83
+ color: #4c4b4b;
84
+
85
+ p {
86
+ padding: 5px 15px;
87
+ color: #333;
88
+ font-weight: bold;
89
+ font-size: 27px;
90
+ text-transform: uppercase;
91
+ }
92
+
93
+ a {
94
+ color: #333;
95
+ font-weight: bold;
96
+ font-size: 27px;
97
+ text-transform: uppercase;
98
+ }
99
+ }
100
+ }
101
+
102
+ .ribbon {
103
+ background: url(/assets/themes/pascal/ribbon.png) no-repeat;
104
+ width: 111px;
105
+ height: 111px;
106
+ position: absolute;
107
+ top: -8px;
108
+ left: -8px;
109
+ z-index: 300;
110
+ }
111
+ }