1+ /**
2+ * NoFlash Responsive Slideshow jQuery Plugin
3+ * version 2.0.0
4+ * https://github.com/foo123/jquery-plugins
5+ **/
16/*
27Documentation
38
@@ -885,13 +890,13 @@ function NoFlash( el, options )
885890ind [ i ] = i ;
886891if ( self . options . controls )
887892{
888- var anc = $ ( "<a class='bullet' href='#" + i + "'></a>" ) ;
893+ var anc = $ ( "<a class='bullet' href='#" + i + "' title=\"" + ( i + 1 ) + "\" ></a>") ;
889894controls . find ( ".bullets" ) . append ( anc ) ;
890895}
891896}
892897if ( self . options . controls )
893898{
894- controls . find ( ".controls" ) . append ( "<a class='prev' href='#" ) ;
899+ controls . find ( ".controls" ) . append ( "<a class='prev' href='#"Previous\" ></a><a class='play-pause' href='#"Play/Pause\"></a><a class='next' href='#"Next\"></a>") ;
895900controls . find ( ".bullet" ) . click ( function ( ) {
896901if ( paused ) return ;
897902if ( ! mutex ) self . doTransition ( String ( parseInt ( $ ( this ) . attr ( "rel" ) , 10 ) ) ) ;
@@ -943,13 +948,13 @@ function NoFlash( el, options )
943948} ;
944949
945950self . init = function init ( ) {
946- W = self . el . width ( ) ; H = stdMath . ceil ( W / self . options . aspectRatio ) ;
951+ W = stdMath . round ( self . el . width ( ) ) ; H = stdMath . round ( W / self . options . aspectRatio ) ;
947952holder = $ ( "<div class=\"noflash-holder\"></div>" ) ;
948953holder . css ( { margin :"0px" , padding :"0px" , border :'0' , overflow :"hidden" , position :"relative" , top :"0px" , left :"0px" , width :String ( W ) + 'px' , height :String ( H ) + 'px' , "background-color" :self . options . backColor || 0 } ) ;
949954
950955// resize handler
951956handlers [ self . id ] = function ( evt ) {
952- W = self . el . width ( ) ; H = stdMath . ceil ( W / self . options . aspectRatio ) ;
957+ W = stdMath . round ( self . el . width ( ) ) ; H = stdMath . round ( W / self . options . aspectRatio ) ;
953958holder . css ( { width :String ( W ) + 'px' , height :String ( H ) + 'px' } ) ;
954959thisimg . css ( { 'background-size' :String ( W ) + 'px auto' } ) ;
955960nextimg . css ( { 'background-size' :String ( W ) + 'px auto' } ) ;
@@ -958,7 +963,7 @@ function NoFlash( el, options )
958963// parse dom data
959964self . el . children ( "div" ) . each ( function ( ) {
960965imgs . push ( $ ( this ) . children ( "img" ) . filter ( ":first" ) . css ( { position :"absolute" , width :'100%' , height :'auto' } ) ) ;
961- captions . push ( $ ( this ) . children ( "span " ) . filter ( ":first" ) . html ( ) ) ;
966+ captions . push ( $ ( this ) . children ( "div " ) . filter ( ":first" ) . html ( ) ) ;
962967var thisfx = { } ;
963968thisfx . transition = self . options . transition ;
964969thisfx . delay = self . options . delay ;
@@ -1071,7 +1076,7 @@ function NoFlash( el, options )
10711076} ;
10721077
10731078self . doTransition = function doTransition ( dir ) {
1074- var i , dd , fxi , ord , r , c , temp , ordobj , ngroups , d , o , sd , odd , animateoptions ;
1079+ var i , dd , fxi , ord , r , c , temp , ordobj , ngroups , d , o , sd , del , odd , max , evtCarrier = null , animateoptions ;
10751080
10761081clearTimeout ( timer ) ;
10771082
@@ -1216,9 +1221,19 @@ function NoFlash( el, options )
12161221d = 1000 * fxi . duration / ( ngroups - ( ngroups - 1 ) * fxi . overlap ) ;
12171222o = d * fxi . overlap ;
12181223sd = d - o ;
1224+ max = 0 ;
12191225odd = false ;
12201226animation_in_progress = true ;
12211227for ( i = 0 ; i < numpiec ; i ++ )
1228+ {
1229+ del = ordobj . delays [ i ] * sd ;
1230+ if ( null == evtCarrier || max <= del )
1231+ {
1232+ evtCarrier = i ;
1233+ max = del ;
1234+ }
1235+ }
1236+ for ( i = 0 ; i < numpiec ; i ++ )
12221237{
12231238temp = $ . extend ( true , { } , $ . noflashCore . transitions [ fxi . transition ] ) ;
12241239if ( temp . start1 && temp . start2 )
@@ -1232,7 +1247,7 @@ function NoFlash( el, options )
12321247translate ( temp . animate , p [ i ] ) ;
12331248
12341249animateoptions = { duration :d , easing :fxi . easing } ;
1235- if ( i == p . length - 1 )
1250+ if ( i === evtCarrier )
12361251animateoptions . complete = function ( ) { endTransition ( ) ; } ;
12371252
12381253if ( fxi . transition == "zoom-fade" )