diff --git a/README.md b/README.md
new file mode 100644
index 0000000..64cda01
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+iView
+=====
+
+iView is easy to use jQuery image slider with animated captions, responsive layout and HTML Elements like (Video, iFrame) slider. Easily add unlimited number of slides and captions. Use it as image slider, image gallery, banner rotator, banner ads, or even presentation.
+
diff --git a/js/iview.js b/js/iview.js
index 5cef83a..75708c3 100644
--- a/js/iview.js
+++ b/js/iview.js
@@ -271,7 +271,7 @@
}
//Play/Pause action
- iv.iviewTimer.live('click', function () {
+ iv.iviewTimer.on('click', function () {
if (iv.iviewTimer.hasClass('paused')) {
iv.playSlider();
} else {
@@ -424,14 +424,14 @@
}, 300);
});
- $('a.iview-prevNav', iv.sliderContent).live('click', function () {
+ $('a.iview-prevNav', iv.sliderContent).on('click', function () {
if (iv.defs.lock) return false;
iv.cleanTimer();
iv.defs.slide -= 2;
iv.goTo('prev');
});
- $('a.iview-nextNav', iv.sliderContent).live('click', function () {
+ $('a.iview-nextNav', iv.sliderContent).on('click', function () {
if (iv.defs.lock) return false;
iv.cleanTimer();
iv.goTo('next');
@@ -468,20 +468,20 @@
//Set initial active link
$('.iview-controlNav a.iview-control:eq(' + iv.defs.slide + ')', iv.sliderContent).addClass('active');
- $('a.iview-controlPrevNav', iv.sliderContent).live('click', function () {
+ $('a.iview-controlPrevNav', iv.sliderContent).on('click', function () {
if (iv.defs.lock) return false;
iv.cleanTimer();
iv.defs.slide -= 2;
iv.goTo('prev');
});
- $('a.iview-controlNextNav', iv.sliderContent).live('click', function () {
+ $('a.iview-controlNextNav', iv.sliderContent).on('click', function () {
if (iv.defs.lock) return false;
iv.cleanTimer();
iv.goTo('next');
});
- $('.iview-controlNav a.iview-control', iv.sliderContent).live('click', function () {
+ $('.iview-controlNav a.iview-control', iv.sliderContent).on('click', function () {
if (iv.defs.lock) return false;
if ($(this).hasClass('active')) return false;
iv.cleanTimer();
@@ -1744,4 +1744,4 @@
};
});
-})(jQuery, this);
\ No newline at end of file
+})(jQuery, this);
diff --git a/js/iview.min.js b/js/iview.min.js
index edeeda1..bdda15c 100644
--- a/js/iview.min.js
+++ b/js/iview.min.js
@@ -8,59 +8,4 @@
* http://iprodev.com/
*
*/
-(function(d,v,q){function y(){z=v[s](function(){o.each(function(){var a=d(this),b=a.width(),c=a.height(),f=d.data(this,u);if(b!==f.w||c!==f.h)a.trigger(w,[f.w=b,f.h=c])});y()},p[A])}var B=function(a,b){var c=this;c.options=b;c.sliderContent=a;c.sliderInner=c.sliderContent.html();c.sliderContent.html("
"+c.sliderInner+"
");c.slider=d(".iviewSlider",c.sliderContent);c.slider.css("position","relative");c.defs={slide:0,total:0,image:"",images:[],width:c.sliderContent.width(),
-height:c.sliderContent.height(),timer:b.timer.toLowerCase(),lock:!1,paused:b.autoAdvance?!1:!0,time:b.pauseTime,easing:b.easing};c.disableSelection(c.slider[0]);c.slides=c.slider.children();c.slides.each(function(){var a=d(this);c.defs.images.push(a.data("iview:image"));a.data("iview:thumbnail")&&c.defs.images.push(a.data("iview:thumbnail"));a.css("display","none");if("video"==a.data("iview:type")){var f=a.children().eq(0),e=d('');a.append(e);f.appendTo(d("div.iview-video-container",e));e.css({width:c.defs.width,height:c.defs.height,top:"-"+c.defs.height+"px"}).hide();a.addClass("iview-video").css({cursor:"pointer"})}c.defs.total++}).css({width:c.defs.width,height:c.defs.height});c.sliderContent.append('');var f=d("#iview-preloader",c.sliderContent),e=d("div",f);f.css({top:c.defs.height/2-f.height()/2+"px",left:c.defs.width/2-f.width()/2+"px"});
-c.sliderContent.append('');c.iviewTimer=d("#iview-timer",c.sliderContent);c.iviewTimer.hide();d(".iview-caption",c.slider).each(function(){var a=d(this);a.html(''+a.html()+"
")});b.startSlide=b.randomStart?Math.floor(Math.random()*c.defs.total):b.startSlide;b.startSlide=0=c.defs.total?c.defs.total-1:b.startSlide;c.defs.slide=b.startSlide;c.defs.image=c.slides.eq(c.defs.slide);c.defs.time=c.defs.image.data("iview:pausetime")?
-c.defs.image.data("iview:pausetime"):b.pauseTime;c.defs.easing=c.defs.image.data("iview:easing")?c.defs.image.data("iview:easing"):b.easing;c.pieDegree=0;var g=b.timerPadding,k=b.timerDiameter,h=b.timerStroke;if(1'+a.options.previousLabel+''+a.options.nextLabel+""),d(".iview-directionNav",a.sliderContent).css({opacity:a.options.directionNavHoverOpacity}),
-a.sliderContent.hover(function(){d(".iview-directionNav",a.sliderContent).stop().animate({opacity:1},300)},function(){d(".iview-directionNav",a.sliderContent).stop().animate({opacity:a.options.directionNavHoverOpacity},300)}),d("a.iview-prevNav",a.sliderContent).live("click",function(){if(a.defs.lock)return false;a.cleanTimer();a.defs.slide=a.defs.slide-2;a.goTo("prev")}),d("a.iview-nextNav",a.sliderContent).live("click",function(){if(a.defs.lock)return false;a.cleanTimer();a.goTo("next")}));if(a.options.controlNav){var b=
-'',c="";!a.options.directionNav&&a.options.controlNavNextPrev&&(b+='
'+a.options.previousLabel+"");for(var b=b+'
',f=0;f";a.options.controlNavThumbs?(e=e.data("iview:thumbnail")?e.data("iview:thumbnail"):e.data("iview:image"),b+='
'):(e=e.data("iview:thumbnail")?e.data("iview:thumbnail"):
-e.data("iview:image"),b+=''+(f+1)+"",a.options.controlNavTooltip&&(c+=''));b+=""}b+="
";!a.options.directionNav&&a.options.controlNavNextPrev&&(b+='
'+a.options.nextLabel+"");b+="
";!a.options.controlNavThumbs&&a.options.controlNavTooltip&&(b+='");
-a.sliderContent.append(b);d(".iview-controlNav a.iview-control:eq("+a.defs.slide+")",a.sliderContent).addClass("active");d("a.iview-controlPrevNav",a.sliderContent).live("click",function(){if(a.defs.lock)return false;a.cleanTimer();a.defs.slide=a.defs.slide-2;a.goTo("prev")});d("a.iview-controlNextNav",a.sliderContent).live("click",function(){if(a.defs.lock)return false;a.cleanTimer();a.goTo("next")});d(".iview-controlNav a.iview-control",a.sliderContent).live("click",function(){if(a.defs.lock||d(this).hasClass("active"))return false;
-a.cleanTimer();a.slider.css("background",'url("'+a.defs.image.data("iview:image")+'") no-repeat');a.defs.slide=d(this).attr("rel")-1;a.goTo("control")});d(".iview-controlNav",a.sliderContent).css({opacity:a.options.controlNavHoverOpacity});a.sliderContent.hover(function(){d(".iview-controlNav",a.sliderContent).stop().animate({opacity:1},300);a.sliderContent.addClass("iview-hover")},function(){d(".iview-controlNav",a.sliderContent).stop().animate({opacity:a.options.controlNavHoverOpacity},300);a.sliderContent.removeClass("iview-hover")});
-var g=null;d(".iview-controlNav a.iview-control",a.sliderContent).hover(function(){var b=d(this),c=b.attr("rel"),f=d("#iview-tooltip",a.sliderContent),e=d("div.holder",f),l=b.offset().left-a.sliderContent.offset().left-f.outerWidth()/2+a.options.tooltipX,b=b.offset().top-a.sliderContent.offset().top-f.outerHeight()+a.options.tooltipY,n=d("div[rel="+c+"]");scrollLeft=c*n.width();f.stop().animate({left:l,top:b,opacity:1},300);f.not(":visible")&&f.fadeIn(300);e.stop().animate({scrollLeft:scrollLeft},
-300);clearTimeout(g)},function(){var b=d("#iview-tooltip",a.sliderContent);g=setTimeout(function(){b.animate({opacity:0},300,function(){b.hide()})},200)})}a.sliderContent.bind("mouseover.iView mousemove.iView",function(){a.options.pauseOnHover&&!a.defs.paused&&a.cleanTimer();a.sliderContent.addClass("iview-hover")}).bind("mouseout.iView",function(){a.options.pauseOnHover&&(!a.defs.paused&&a.timer==null&&a.pieDegree<=359&&a.options.autoAdvance)&&a.setTimer();a.sliderContent.removeClass("iview-hover")})},
-setCaption:function(){var a=this,b=a.slides.eq(a.defs.slide),c=0;d(".iview-caption",b).each(function(){var b=d(this),e=b.data("transition")?d.trim(b.data("transition").toLowerCase()):"fade",g=b.data("speed")?b.data("speed"):a.options.captionSpeed,k=b.data("easing")?b.data("easing"):a.options.captionEasing,h="undefined"!=b.data("x")?b.data("x"):"center",i="undefined"!=b.data("y")?b.data("y"):"center",j=b.data("width")?b.data("width"):b.width(),l=b.data("height")?b.data("height"):b.height(),n=b.outerWidth(),
-o=b.outerHeight();"center"==h&&(h=a.defs.width/2-n/2);"center"==i&&(i=a.defs.height/2-o/2);var m=d(".caption-contain",b);b.css({opacity:0});m.css({opacity:0,position:"relative",width:j,height:l});switch(e){case "wipedown":b.css({top:i-l,left:h});m.css({top:l+3*l,left:0});break;case "wipeup":b.css({top:i+l,left:h});m.css({top:l-3*l,left:0});break;case "wiperight":b.css({top:i,left:h-j});m.css({top:0,left:j+2*j});break;case "wipeleft":b.css({top:i,left:h+j});m.css({top:0,left:j-2*j});break;case "fade":b.css({top:i,
-left:h});m.css({top:0,left:0});break;case "expanddown":b.css({top:i,left:h,height:0});m.css({top:l+3*l,left:0});break;case "expandup":b.css({top:i+l,left:h,height:0});m.css({top:l-3*l,left:0});break;case "expandright":b.css({top:i,left:h,width:0});m.css({top:0,left:j+2*j});break;case "expandleft":b.css({top:i,left:h+j,width:0}),m.css({top:0,left:j-2*j})}setTimeout(function(){b.animate({opacity:a.options.captionOpacity,top:i,left:h,width:j,height:l},g,k,function(){})},c);setTimeout(function(){m.animate({opacity:a.options.captionOpacity,
-top:0,left:0},g,k)},c+100);c+=250})},processTimer:function(){if("360bar"==this.defs.timer){var a=0==this.pieDegree?0:this.pieDegree+0.9;this.timerPath.attr({arc:[a,this.R]})}else"pie"==this.defs.timer?(a=0==this.pieDegree?0:this.pieDegree+0.9,this.pieTimer.attr({segment:[a,this.R]})):this.barTimer.css({width:100*(this.pieDegree/360)+"%"});this.pieDegree+=3},transitionEnd:function(a){a.options.onAfterChange.call(this);a.defs.lock=!1;a.slides.css("display","none");a.slides.eq(a.defs.slide).show();a.slider.css("background",
-'url("'+a.defs.image.data("iview:image")+'") no-repeat');d(".iview-strip, .iview-block",a.slider).remove();a.defs.time=a.defs.image.data("iview:pausetime")?a.defs.image.data("iview:pausetime"):a.options.pauseTime;a.iviewTimer.animate({opacity:a.options.timerOpacity});a.pieDegree=0;a.processTimer();a.setCaption(a.options);null==a.timer&&!a.defs.paused&&(a.timer=setInterval(function(){a.timerCall(a)},a.defs.time/120))},addStrips:function(a,b){for(var b=b?b:this.options,c=0;c').css({width:f,height:e,top:k,left:h,background:'url("'+this.defs.image.data("iview:image")+'") no-repeat '+g,opacity:0});this.slider.append(g)}},addBlocks:function(){for(var a=Math.round(this.slider.width()/
-this.options.blockCols),b=Math.round(this.slider.height()/this.options.blockRows),c=0;c').css({width:a+"px",height:b+"px",top:c*b+"px",left:f*a+"px",background:'url("'+this.defs.image.data("iview:image")+'") no-repeat '+e,opacity:0});this.slider.append(e)}},runTransition:function(a){var b=this;switch(a){case "strip-up-right":case "strip-up-left":b.addStrips();
-var c=0,f=0,e=d(".iview-strip",b.slider);"strip-up-left"==a&&(e=d(".iview-strip",b.slider).reverse());e.each(function(){var a=d(this);a.css({top:"",bottom:"0px"});setTimeout(function(){a.animate({height:"100%",opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){f==b.options.strips-1&&b.transitionEnd(b);f++})},100+c);c+=50});break;case "strip-down":case "strip-down-right":case "strip-down-left":b.addStrips();var f=c=0,e=d(".iview-strip",b.slider);"strip-down-left"==a&&(e=d(".iview-strip",
-b.slider).reverse());e.each(function(){var a=d(this);a.css({bottom:"",top:"0px"});setTimeout(function(){a.animate({height:"100%",opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){f==b.options.strips-1&&b.transitionEnd(b);f++})},100+c);c+=50});break;case "strip-left-right":case "strip-left-right-up":case "strip-left-right-down":b.addStrips(!0);var g=f=c=0,e=d(".iview-strip",b.slider);"strip-left-right-down"==a&&(e=d(".iview-strip",b.slider).reverse());e.each(function(){var a=d(this);
-0==f?(a.css({right:"",left:"0px"}),f++):(a.css({left:"",right:"0px"}),f=0);setTimeout(function(){a.animate({width:"100%",opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){g==b.options.strips-1&&b.transitionEnd(b);g++})},100+c);c+=50});break;case "strip-up-down":case "strip-up-down-right":case "strip-up-down-left":b.addStrips();g=f=c=0;e=d(".iview-strip",b.slider);"strip-up-down-left"==a&&(e=d(".iview-strip",b.slider).reverse());e.each(function(){var a=d(this);0==f?(a.css({bottom:"",
-top:"0px"}),f++):(a.css({top:"",bottom:"0px"}),f=0);setTimeout(function(){a.animate({height:"100%",opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){g==b.options.strips-1&&b.transitionEnd(b);g++})},100+c);c+=50});break;case "left-curtain":case "right-curtain":case "top-curtain":case "bottom-curtain":"left-curtain"==a||"right-curtain"==a?b.addStrips():b.addStrips(!0);f=c=0;e=d(".iview-strip",b.slider);if("right-curtain"==a||"bottom-curtain"==a)e=d(".iview-strip",b.slider).reverse();
-e.each(function(){var e=d(this),g=e.width(),h=e.height();"left-curtain"==a||"right-curtain"==a?e.css({top:"0px",height:"100%",width:"0px"}):e.css({left:"0px",height:"0px",width:"100%"});setTimeout(function(){"left-curtain"==a||"right-curtain"==a?e.animate({width:g,opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){f==b.options.strips-1&&b.transitionEnd(b);f++}):e.animate({height:h,opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){f==b.options.strips-1&&b.transitionEnd(b);
-f++})},100+c);c+=50});break;case "strip-up-right":case "strip-up-left":b.addStrips();f=c=0;e=d(".iview-strip",b.slider);"strip-up-left"==a&&(e=d(".iview-strip",b.slider).reverse());e.each(function(){var a=d(this);a.css({bottom:"0px"});setTimeout(function(){a.animate({height:"100%",opacity:"1.0"},b.options.animationSpeed,b.defs.easing,function(){f==b.options.strips-1&&b.transitionEnd(b);f++})},100+c);c+=50});break;case "strip-left-fade":case "strip-right-fade":case "strip-top-fade":case "strip-bottom-fade":"strip-left-fade"==
-a||"strip-right-fade"==a?b.addStrips():b.addStrips(!0);f=c=0;e=d(".iview-strip",b.slider);if("strip-right-fade"==a||"strip-bottom-fade"==a)e=d(".iview-strip",b.slider).reverse();e.each(function(){var e=d(this),g=e.width(),h=e.height();"strip-left-fade"==a||"strip-right-fade"==a?e.css({top:"0px",height:"100%",width:g}):e.css({left:"0px",height:h,width:"100%"});setTimeout(function(){e.animate({opacity:"1.0"},1.7*b.options.animationSpeed,b.defs.easing,function(){f==b.options.strips-1&&b.transitionEnd(b);
-f++})},100+c);c+=35});break;case "slide-in-up":case "slide-in-down":opts={strips:1};b.addStrips(!1,opts);var e=d(".iview-strip:first",b.slider),k=0,k="slide-in-up"==a?"-"+b.defs.height+"px":b.defs.height+"px";e.css({top:k,height:"100%",width:b.defs.width});e.animate({top:"0px",opacity:1},2*b.options.animationSpeed,b.defs.easing,function(){b.transitionEnd(b)});break;case "zigzag-top":case "zigzag-bottom":case "zigzag-grow-top":case "zigzag-grow-bottom":case "zigzag-drop-top":case "zigzag-drop-bottom":b.addBlocks();
-for(var h=b.options.blockCols*b.options.blockRows,c=0,i=[],e=d(".iview-block",b.slider),j=0;j=k;n--)i.push(d(e[n]));else for(n=k;nthis.defs.slide&&(this.defs.slide=this.defs.total-1);this.defs.image=this.slides.eq(this.defs.slide);this.options.controlNav&&(d(".iview-controlNav a.iview-control",this.sliderContent).removeClass("active"),d(".iview-controlNav a.iview-control:eq("+this.defs.slide+")",this.sliderContent).addClass("active"));a=this.options.fx;"random"==this.options.fx.toLowerCase()&&(a="left-curtain right-curtain top-curtain bottom-curtain strip-down-right strip-down-left strip-up-right strip-up-left strip-up-down strip-up-down-left strip-left-right strip-left-right-down slide-in-right slide-in-left slide-in-up slide-in-down fade block-random block-fade block-fade-reverse block-expand block-expand-reverse block-expand-random zigzag-top zigzag-bottom zigzag-grow-top zigzag-grow-bottom zigzag-drop-top zigzag-drop-bottom strip-left-fade strip-right-fade strip-top-fade strip-bottom-fade block-drop-random".split(" "),
-a=a[Math.floor(Math.random()*(a.length+1))],a==q&&(a="fade"),a=d.trim(a.toLowerCase()));-1!=this.options.fx.indexOf(",")&&(a=this.options.fx.split(","),a=a[Math.floor(Math.random()*a.length)],a==q&&(a="fade"),a=d.trim(a.toLowerCase()));this.defs.image.data("iview:transition")&&(a=this.defs.image.data("iview:transition").split(","),a=a[Math.floor(Math.random()*a.length)],a=d.trim(a.toLowerCase()));this.defs.easing=this.defs.image.data("iview:easing")?this.defs.image.data("iview:easing"):this.options.easing;
-this.defs.lock=!0;this.runTransition(a)},playSlider:function(){null==this.timer&&this.defs.paused&&(this.iviewTimer.removeClass("paused").attr("title",this.options.pauseLabel),this.setTimer(),this.defs.paused=!1,this.options.onPlay.call(this))},stopSlider:function(){this.iviewTimer.addClass("paused").attr("title",this.options.playLabel);this.cleanTimer();this.defs.paused=!0;this.options.onPause.call(this)},setTimerPosition:function(){for(var a=this.options.timerPosition.toLowerCase().split("-"),b=
-0;bd.event.special.swipe.scrollSupressionThreshold&&a.preventDefault()}}var f=b.originalEvent.touches?
-b.originalEvent.touches[0]:b,e={time:(new Date).getTime(),coords:[f.pageX,f.pageY],origin:d(b.target)},g;a.bind(C,c).one(F,function(){a.unbind(C,c);e&&g&&g.time-e.timed.event.special.swipe.horizontalDistanceThreshold&&Math.abs(e.coords[1]-g.coords[1])g.coords[0]?"swipeleft":"swiperight");e=g=q})})}};d.each({swipeleft:"swipe",
-swiperight:"swipe"},function(a,b){d.event.special[a]={setup:function(){d(this).bind(b,d.noop)}}})})(jQuery,this);
\ No newline at end of file
+(function($,window,undefined){var iView=function(el,options){var iv=this;iv.options=options;iv.sliderContent=el,iv.sliderInner=iv.sliderContent.html();iv.sliderContent.html(""+iv.sliderInner+"
");iv.slider=$('.iviewSlider',iv.sliderContent);iv.slider.css('position','relative');iv.defs={slide:0,total:0,image:'',images:[],width:iv.sliderContent.width(),height:iv.sliderContent.height(),timer:options.timer.toLowerCase(),lock:false,paused:(options.autoAdvance)?false:true,time:options.pauseTime,easing:options.easing};iv.disableSelection(iv.slider[0]);iv.slides=iv.slider.children();iv.slides.each(function(i){var slide=$(this);iv.defs.images.push(slide.data("iview:image"));if(slide.data("iview:thumbnail"))iv.defs.images.push(slide.data("iview:thumbnail"));slide.css('display','none');if(slide.data("iview:type")=="video"){var element=slide.children().eq(0),video=$('');slide.append(video);element.appendTo($('div.iview-video-container',video));video.css({width:iv.defs.width,height:iv.defs.height,top:'-'+iv.defs.height+'px'}).hide();slide.addClass('iview-video').css({'cursor':'pointer'})}iv.defs.total++}).css({width:iv.defs.width,height:iv.defs.height});iv.sliderContent.append('');var iviewPreloader=$('#iview-preloader',iv.sliderContent);var preloaderBar=$('div',iviewPreloader);iviewPreloader.css({top:((iv.defs.height/2)-(iviewPreloader.height()/2))+'px',left:((iv.defs.width/2)-(iviewPreloader.width()/2))+'px'});iv.sliderContent.append('');iv.iviewTimer=$('#iview-timer',iv.sliderContent);iv.iviewTimer.hide();$('.iview-caption',iv.slider).each(function(i){var caption=$(this);caption.html(''+caption.html()+'
')});options.startSlide=(options.randomStart)?Math.floor(Math.random()*iv.defs.total):options.startSlide;options.startSlide=(options.startSlide>0&&options.startSlide>=iv.defs.total)?iv.defs.total-1:options.startSlide;iv.defs.slide=options.startSlide;iv.defs.image=iv.slides.eq(iv.defs.slide);iv.defs.time=(iv.defs.image.data('iview:pausetime'))?iv.defs.image.data('iview:pausetime'):options.pauseTime;iv.defs.easing=(iv.defs.image.data('iview:easing'))?iv.defs.image.data('iview:easing'):options.easing;iv.pieDegree=0;var padding=options.timerPadding,diameter=options.timerDiameter,stroke=options.timerStroke;if(iv.defs.total>1&&iv.defs.timer!="bar"){stroke=(iv.defs.timer=="360bar")?options.timerStroke:0;var width=(diameter+(padding*2)+(stroke*2)),height=width,r=Raphael(iv.iviewTimer[0],width,height);iv.R=(diameter/2);var param={stroke:options.timerBg,"stroke-width":(stroke+(padding*2))},param2={stroke:options.timerColor,"stroke-width":stroke,"stroke-linecap":"round"},param3={fill:options.timerColor,stroke:'none',"stroke-width":0},bgParam={fill:options.timerBg,stroke:'none',"stroke-width":0};r.customAttributes.arc=function(value,R){var total=360,alpha=360/total*value,a=(90-alpha)*Math.PI/180,cx=((diameter/2)+padding+stroke),cy=((diameter/2)+padding+stroke),x=cx+R*Math.cos(a),y=cy-R*Math.sin(a),path;if(total==value){path=[["M",cx,cy-R],["A",R,R,0,1,1,299.99,cy-R]]}else{path=[["M",cx,cy-R],["A",R,R,0,+(alpha>180),1,x,y]]}return{path:path}};r.customAttributes.segment=function(angle,R){var a1=-90;R=R-1;angle=(a1+angle);var flag=(angle-a1)>180,x=((diameter/2)+padding),y=((diameter/2)+padding);a1=(a1%360)*Math.PI/180;angle=(angle%360)*Math.PI/180;return{path:[["M",x,y],["l",R*Math.cos(a1),R*Math.sin(a1)],["A",R,R,0,+flag,1,x+R*Math.cos(angle),y+R*Math.sin(angle)],["z"]]}};if(iv.defs.total>1&&iv.defs.timer=="pie"){r.circle(iv.R+padding,iv.R+padding,iv.R+padding-1).attr(bgParam)}iv.timerBgPath=r.path().attr(param),iv.timerPath=r.path().attr(param2),iv.pieTimer=r.path().attr(param3)}iv.barTimer=$('div',iv.iviewTimer);if(iv.defs.total>1&&iv.defs.timer=="360bar"){iv.timerBgPath.attr({arc:[359.9,iv.R]})}if(iv.defs.timer=="bar"){iv.iviewTimer.css({opacity:options.timerOpacity,width:diameter,height:stroke,border:options.timerBarStroke+'px '+options.timerBarStrokeColor+' '+options.timerBarStrokeStyle,padding:padding,background:options.timerBg});iv.barTimer.css({width:0,height:stroke,background:options.timerColor,'float':'left'})}else{iv.iviewTimer.css({opacity:options.timerOpacity,width:width,height:height})}iv.setTimerPosition();new ImagePreload(iv.defs.images,function(i){var percent=(i*10);preloaderBar.stop().animate({width:percent+'%'})},function(){preloaderBar.stop().animate({width:'100%'},function(){iviewPreloader.remove();iv.startSlider();options.onAfterLoad.call(this)})});iv.sliderContent.bind('swipeleft',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.goTo('next')}).bind('swiperight',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});if(options.keyboardNav){$(document).bind('keyup.iView',function(event){if(event.keyCode=='37'){if(iv.defs.lock)return false;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')}if(event.keyCode=='39'){if(iv.defs.lock)return false;iv.cleanTimer();iv.goTo('next')}})}iv.iviewTimer.on('click',function(){if(iv.iviewTimer.hasClass('paused')){iv.playSlider()}else{iv.stopSlider()}});iv.sliderContent.bind('iView:pause',function(){iv.stopSlider()});iv.sliderContent.bind('iView:play',function(){iv.playSlider()});iv.sliderContent.bind('iView:previous',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});iv.sliderContent.bind('iView:next',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.goTo('next')});iv.sliderContent.bind('iView:goSlide',function(event,slide){if(iv.defs.lock||iv.defs.slide==slide)return false;if($(this).hasClass('active'))return false;iv.cleanTimer();iv.slider.css('background','url("'+iv.defs.image.data('iview:image')+'") no-repeat');iv.defs.slide=slide-1;iv.goTo('control')});iv.sliderContent.bind('resize',function(){t=$(this),tW=t.width(),tH=t.height(),width=iv.slider.width(),height=iv.slider.height();if(iv.defs.width!=tW){var ratio=(tW/width),newHeight=Math.round(iv.defs.height*ratio);iv.slider.css({'-webkit-transform-origin':'0 0','-moz-transform-origin':'0 0','-o-transform-origin':'0 0','-ms-transform-origin':'0 0','transform-origin':'0 0','-webkit-transform':'scale('+ratio+')','-moz-transform':'scale('+ratio+')','-o-transform':'scale('+ratio+')','-ms-transform':'scale('+ratio+')','transform':'scale('+ratio+')'});t.css({height:newHeight});iv.defs.width=tW;iv.setTimerPosition()}});$('.iview-video',iv.slider).click(function(e){var t=$(this),video=$('.iview-video-show',t);if(!$(e.target).hasClass('iview-video-close')&&!$(e.target).hasClass('iview-caption')&&!$(e.target).parents().hasClass('iview-caption')){video.show().animate({top:0},1000,'easeOutBounce');iv.sliderContent.trigger('iView:pause')}});$('.iview-video-close',iv.slider).click(function(){var video=$(this).parents('.iview-video-show'),iframe=$('iframe',video),src=iframe.attr('src');iframe.removeAttr('src').attr('src',src);video.animate({top:'-'+iv.defs.height+'px'},1000,'easeOutBounce',function(){video.hide();iv.sliderContent.trigger('iView:play')})})};iView.prototype={timer:null,startSlider:function(){var iv=this;var img=new Image();img.src=iv.slides.eq(0).data('iview:image');imgWidth=img.width;if(imgWidth!=iv.defs.width){iv.defs.width=imgWidth;iv.sliderContent.trigger('resize')}iv.iviewTimer.show();iv.slides.eq(iv.defs.slide).css('display','block');iv.slider.css('background','url("'+iv.defs.image.data('iview:image')+'") no-repeat');iv.setCaption(iv.options);iv.iviewTimer.addClass('paused').attr('title',iv.options.playLabel);if(iv.options.autoAdvance&&iv.defs.total>1){iv.iviewTimer.removeClass('paused').attr('title',iv.options.pauseLabel);iv.setTimer()}if(iv.options.directionNav){iv.sliderContent.append('');$('.iview-directionNav',iv.sliderContent).css({opacity:iv.options.directionNavHoverOpacity});iv.sliderContent.hover(function(){$('.iview-directionNav',iv.sliderContent).stop().animate({opacity:1},300)},function(){$('.iview-directionNav',iv.sliderContent).stop().animate({opacity:iv.options.directionNavHoverOpacity},300)});$('a.iview-prevNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});$('a.iview-nextNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.goTo('next')})}if(iv.options.controlNav){var iviewControl='',iviewTooltip='';if(!iv.options.directionNav&&iv.options.controlNavNextPrev)iviewControl+='
'+iv.options.previousLabel+'';iviewControl+='
';for(var i=0;i';if(iv.options.controlNavThumbs){var thumb=(slide.data('iview:thumbnail'))?slide.data('iview:thumbnail'):slide.data('iview:image');iviewControl+='
'}else{var thumb=(slide.data('iview:thumbnail'))?slide.data('iview:thumbnail'):slide.data('iview:image');iviewControl+=''+(i+1)+'';if(iv.options.controlNavTooltip)iviewTooltip+=''}iviewControl+=''}iviewControl+='
';if(!iv.options.directionNav&&iv.options.controlNavNextPrev)iviewControl+='
'+iv.options.nextLabel+'';iviewControl+='
';if(!iv.options.controlNavThumbs&&iv.options.controlNavTooltip)iviewControl+='';iv.sliderContent.append(iviewControl);$('.iview-controlNav a.iview-control:eq('+iv.defs.slide+')',iv.sliderContent).addClass('active');$('a.iview-controlPrevNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});$('a.iview-controlNextNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return false;iv.cleanTimer();iv.goTo('next')});$('.iview-controlNav a.iview-control',iv.sliderContent).on('click',function(){if(iv.defs.lock)return false;if($(this).hasClass('active'))return false;iv.cleanTimer();iv.slider.css('background','url("'+iv.defs.image.data('iview:image')+'") no-repeat');iv.defs.slide=$(this).attr('rel')-1;iv.goTo('control')});$('.iview-controlNav',iv.sliderContent).css({opacity:iv.options.controlNavHoverOpacity});iv.sliderContent.hover(function(){$('.iview-controlNav',iv.sliderContent).stop().animate({opacity:1},300);iv.sliderContent.addClass('iview-hover')},function(){$('.iview-controlNav',iv.sliderContent).stop().animate({opacity:iv.options.controlNavHoverOpacity},300);iv.sliderContent.removeClass('iview-hover')});var tooltipTimer=null;$('.iview-controlNav a.iview-control',iv.sliderContent).hover(function(e){var t=$(this),i=t.attr('rel'),tooltip=$('#iview-tooltip',iv.sliderContent),holder=$('div.holder',tooltip),x=t.offset().left-iv.sliderContent.offset().left-(tooltip.outerWidth()/2)+iv.options.tooltipX,y=t.offset().top-iv.sliderContent.offset().top-tooltip.outerHeight()+iv.options.tooltipY,imD=$('div[rel='+i+']')scrollLeft=(i*imD.width());tooltip.stop().animate({left:x,top:y,opacity:1},300);if(tooltip.not(':visible'))tooltip.fadeIn(300);holder.stop().animate({scrollLeft:scrollLeft},300);clearTimeout(tooltipTimer)},function(e){var tooltip=$('#iview-tooltip',iv.sliderContent);tooltipTimer=setTimeout(function(){tooltip.animate({opacity:0},300,function(){tooltip.hide()})},200)})}iv.sliderContent.bind('mouseover.iView mousemove.iView',function(){if(iv.options.pauseOnHover&&!iv.defs.paused)iv.cleanTimer();iv.sliderContent.addClass('iview-hover')}).bind('mouseout.iView',function(){if(iv.options.pauseOnHover&&!iv.defs.paused&&iv.timer==null&&iv.pieDegree<=359&&iv.options.autoAdvance)iv.setTimer();iv.sliderContent.removeClass('iview-hover')})},setCaption:function(){var iv=this,slide=iv.slides.eq(iv.defs.slide),captions=$('.iview-caption',slide),timeEx=0;captions.each(function(i){var caption=$(this),fx=(caption.data('transition'))?$.trim(caption.data('transition').toLowerCase()):"fade",speed=(caption.data('speed'))?caption.data('speed'):iv.options.captionSpeed,easing=(caption.data('easing'))?caption.data('easing'):iv.options.captionEasing,x=(caption.data('x')!="undefined")?caption.data('x'):"center",y=(caption.data('y')!="undefined")?caption.data('y'):"center",w=(caption.data('width'))?caption.data('width'):caption.width(),h=(caption.data('height'))?caption.data('height'):caption.height(),oW=caption.outerWidth(),oH=caption.outerHeight();if(x=="center")x=((iv.defs.width/2)-(oW/2));if(y=="center")y=((iv.defs.height/2)-(oH/2));var captionContain=$('.caption-contain',caption);caption.css({opacity:0});captionContain.css({opacity:0,position:'relative',width:w,height:h});switch(fx){case"wipedown":caption.css({top:(y-h),left:x});captionContain.css({top:(h+(h*3)),left:0});break;case"wipeup":caption.css({top:(y+h),left:x});captionContain.css({top:(h-(h*3)),left:0});break;case"wiperight":caption.css({top:y,left:(x-w)});captionContain.css({top:0,left:(w+(w*2))});break;case"wipeleft":caption.css({top:y,left:(x+w)});captionContain.css({top:0,left:(w-(w*2))});break;case"fade":caption.css({top:y,left:x});captionContain.css({top:0,left:0});break;case"expanddown":caption.css({top:y,left:x,height:0});captionContain.css({top:(h+(h*3)),left:0});break;case"expandup":caption.css({top:(y+h),left:x,height:0});captionContain.css({top:(h-(h*3)),left:0});break;case"expandright":caption.css({top:y,left:x,width:0});captionContain.css({top:0,left:(w+(w*2))});break;case"expandleft":caption.css({top:y,left:(x+w),width:0});captionContain.css({top:0,left:(w-(w*2))});break}setTimeout(function(){caption.animate({opacity:iv.options.captionOpacity,top:y,left:x,width:w,height:h},speed,easing,function(){})},timeEx);setTimeout(function(){captionContain.animate({opacity:iv.options.captionOpacity,top:0,left:0},speed,easing)},(timeEx+100));timeEx+=250})},processTimer:function(){var iv=this;if(iv.defs.timer=="360bar"){var degree=(iv.pieDegree==0)?0:iv.pieDegree+.9;iv.timerPath.attr({arc:[degree,iv.R]})}else if(iv.defs.timer=="pie"){var degree=(iv.pieDegree==0)?0:iv.pieDegree+.9;iv.pieTimer.attr({segment:[degree,iv.R]})}else{iv.barTimer.css({width:((iv.pieDegree/360)*100)+'%'})}iv.pieDegree+=3},transitionEnd:function(iv){iv.options.onAfterChange.call(this);iv.defs.lock=false;iv.slides.css('display','none');iv.slides.eq(iv.defs.slide).show();iv.slider.css('background','url("'+iv.defs.image.data('iview:image')+'") no-repeat');$('.iview-strip, .iview-block',iv.slider).remove();iv.defs.time=(iv.defs.image.data('iview:pausetime'))?iv.defs.image.data('iview:pausetime'):iv.options.pauseTime;iv.iviewTimer.animate({opacity:iv.options.timerOpacity});iv.pieDegree=0;iv.processTimer();iv.setCaption(iv.options);if(iv.timer==null&&!iv.defs.paused)iv.timer=setInterval(function(){iv.timerCall(iv)},(iv.defs.time/120))},addStrips:function(vertical,opts){var iv=this;opts=(opts)?opts:iv.options;for(var i=0;i').css({width:width,height:height,top:top,left:left,background:'url("'+iv.defs.image.data('iview:image')+'") no-repeat '+bgPosition,opacity:0});iv.slider.append(strip)}},addBlocks:function(){var iv=this,blockWidth=Math.round(iv.slider.width()/iv.options.blockCols),blockHeight=Math.round(iv.slider.height()/iv.options.blockRows);for(var rows=0;rows').css({width:blockWidth+'px',height:blockHeight+'px',top:(rows*blockHeight)+'px',left:(columns*blockWidth)+'px',background:'url("'+iv.defs.image.data('iview:image')+'") no-repeat '+bgPosition,opacity:0});iv.slider.append(block)}}},runTransition:function(fx){var iv=this;switch(fx){case'strip-up-right':case'strip-up-left':iv.addStrips();var timeDelay=0;i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({top:'',bottom:'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case'strip-down':case'strip-down-right':case'strip-down-left':iv.addStrips();var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-down-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({bottom:'',top:'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case'strip-left-right':case'strip-left-right-up':case'strip-left-right-down':iv.addStrips(true);var timeDelay=0,i=0,v=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-left-right-down')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);if(i==0){strip.css({right:'',left:'0px'});i++}else{strip.css({left:'',right:'0px'});i=0}setTimeout(function(){strip.animate({width:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(v==iv.options.strips-1)iv.transitionEnd(iv);v++})},(100+timeDelay));timeDelay+=50});break;case'strip-up-down':case'strip-up-down-right':case'strip-up-down-left':iv.addStrips();var timeDelay=0,i=0,v=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-down-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);if(i==0){strip.css({bottom:'',top:'0px'});i++}else{strip.css({top:'',bottom:'0px'});i=0}setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(v==iv.options.strips-1)iv.transitionEnd(iv);v++})},(100+timeDelay));timeDelay+=50});break;case'left-curtain':case'right-curtain':case'top-curtain':case'bottom-curtain':if(fx=='left-curtain'||fx=='right-curtain')iv.addStrips();else iv.addStrips(true);var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='right-curtain'||fx=='bottom-curtain')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);var width=strip.width();var height=strip.height();if(fx=='left-curtain'||fx=='right-curtain')strip.css({top:'0px',height:'100%',width:'0px'});else strip.css({left:'0px',height:'0px',width:'100%'});setTimeout(function(){if(fx=='left-curtain'||fx=='right-curtain')strip.animate({width:width,opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++});else strip.animate({height:height,opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case'strip-up-right':case'strip-up-left':iv.addStrips();var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({'bottom':'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case'strip-left-fade':case'strip-right-fade':case'strip-top-fade':case'strip-bottom-fade':if(fx=='strip-left-fade'||fx=='strip-right-fade')iv.addStrips();else iv.addStrips(true);var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-right-fade'||fx=='strip-bottom-fade')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);var width=strip.width();var height=strip.height();if(fx=='strip-left-fade'||fx=='strip-right-fade')strip.css({top:'0px',height:'100%',width:width});else strip.css({left:'0px',height:height,width:'100%'});setTimeout(function(){strip.animate({opacity:'1.0'},iv.options.animationSpeed*1.7,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=35});break;case'slide-in-up':case'slide-in-down':opts={strips:1};iv.addStrips(false,opts);var strip=$('.iview-strip:first',iv.slider),top=0;if(fx=='slide-in-up')top='-'+iv.defs.height+'px';else top=iv.defs.height+'px';strip.css({top:top,'height':'100%','width':iv.defs.width});strip.animate({'top':'0px',opacity:1},(iv.options.animationSpeed*2),iv.defs.easing,function(){iv.transitionEnd(iv)});break;case'zigzag-top':case'zigzag-bottom':case'zigzag-grow-top':case'zigzag-grow-bottom':case'zigzag-drop-top':case'zigzag-drop-bottom':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),timeDelay=0,blockToArr=new Array(),blocks=$('.iview-block',iv.slider);for(var rows=0;rows=start;columns--){blockToArr.push($(blocks[columns]))}}else{for(var columns=start;columns=0&&Col=360){iv.cleanTimer();iv.goTo(false)}},setTimer:function(){var iv=this;iv.timer=setInterval(function(){iv.timerCall(iv)},(iv.defs.time/120))},cleanTimer:function(){var iv=this;clearInterval(iv.timer);iv.timer=null},goTo:function(action){var iv=this;if(iv.defs&&(iv.defs.slide==iv.defs.total-1)){iv.options.onLastSlide.call(this)}iv.cleanTimer();iv.iviewTimer.animate({opacity:0});iv.options.onBeforeChange.call(this);if(!action){iv.slider.css('background','url("'+iv.defs.image.data('iview:image')+'") no-repeat')}else{if(action=='prev'||action=='next'){iv.slider.css('background','url("'+iv.defs.image.data('iview:image')+'") no-repeat')}}iv.defs.slide++;if(iv.defs.slide==iv.defs.total){iv.defs.slide=0;iv.options.onSlideShowEnd.call(this)}if(iv.defs.slide<0)iv.defs.slide=(iv.defs.total-1);iv.defs.image=iv.slides.eq(iv.defs.slide);if(iv.options.controlNav){$('.iview-controlNav a.iview-control',iv.sliderContent).removeClass('active');$('.iview-controlNav a.iview-control:eq('+iv.defs.slide+')',iv.sliderContent).addClass('active')}var fx=iv.options.fx;if(iv.options.fx.toLowerCase()=='random'){var transitions=new Array('left-curtain','right-curtain','top-curtain','bottom-curtain','strip-down-right','strip-down-left','strip-up-right','strip-up-left','strip-up-down','strip-up-down-left','strip-left-right','strip-left-right-down','slide-in-right','slide-in-left','slide-in-up','slide-in-down','fade','block-random','block-fade','block-fade-reverse','block-expand','block-expand-reverse','block-expand-random','zigzag-top','zigzag-bottom','zigzag-grow-top','zigzag-grow-bottom','zigzag-drop-top','zigzag-drop-bottom','strip-left-fade','strip-right-fade','strip-top-fade','strip-bottom-fade','block-drop-random');fx=transitions[Math.floor(Math.random()*(transitions.length+1))];if(fx==undefined)fx='fade';fx=$.trim(fx.toLowerCase())}if(iv.options.fx.indexOf(',')!=-1){var transitions=iv.options.fx.split(',');fx=transitions[Math.floor(Math.random()*(transitions.length))];if(fx==undefined)fx='fade';fx=$.trim(fx.toLowerCase())}if(iv.defs.image.data('iview:transition')){var transitions=iv.defs.image.data('iview:transition').split(',');fx=transitions[Math.floor(Math.random()*(transitions.length))];fx=$.trim(fx.toLowerCase())}iv.defs.easing=(iv.defs.image.data('iview:easing'))?iv.defs.image.data('iview:easing'):iv.options.easing;iv.defs.lock=true;iv.runTransition(fx)},playSlider:function(){var iv=this;if(iv.timer==null&&iv.defs.paused){iv.iviewTimer.removeClass('paused').attr('title',iv.options.pauseLabel);iv.setTimer();iv.defs.paused=false;iv.options.onPlay.call(this)}},stopSlider:function(){var iv=this;iv.iviewTimer.addClass('paused').attr('title',iv.options.playLabel);iv.cleanTimer();iv.defs.paused=true;iv.options.onPause.call(this)},setTimerPosition:function(){var iv=this,position=iv.options.timerPosition.toLowerCase().split('-');for(var i=0;i$.event.special.swipe.scrollSupressionThreshold){event.preventDefault()}}$this.bind(touchMoveEvent,moveHandler).one(touchStopEvent,function(event){$this.unbind(touchMoveEvent,moveHandler);if(start&&stop){if(stop.time-start.time<$.event.special.swipe.durationThreshold&&Math.abs(start.coords[0]-stop.coords[0])>$.event.special.swipe.horizontalDistanceThreshold&&Math.abs(start.coords[1]-stop.coords[1])<$.event.special.swipe.verticalDistanceThreshold){start.origin.trigger("swipe").trigger(start.coords[0]>stop.coords[0]?"swipeleft":"swiperight")}}start=stop=undefined})})}};$.each({swipeleft:"swipe",swiperight:"swipe"},function(event,sourceEvent){$.event.special[event]={setup:function(){$(this).bind(sourceEvent,$.noop)}}})})(jQuery,this);