setup: function(e){
if (t.hasClass(klass) && t.parent().hasClass(overlay_klass)) return;
set(_options_, opt);
var
attr= {
src: t.attr(_src_),
width: t.attr(_width_) || null,
height: t.attr(_height_) || null,
style: t.attr(_style_) || null,
'class': t.attr(_class_) || null
},
src= t.attr(opt.attr).attr(_src_),
id= set(_id_, t.attr(_id_) || t.attr(_id_, klass+'-'+(+new Date())).attr(_id_)),
data= $.extend({}, t.data()),
images= set(_images_, opt.images || []),
stitched= set(_stitched_, opt.stitched),
is_sprite= !images.length || stitched,
responsive= set(_responsive_, opt.responsive && (knows_background_size ? true : !is_sprite)),
truescale= set(_truescale_, {}),
loops= opt.loops,
orbital= opt.orbital,
revolution= opt.revolution,
rows= opt.rows,
footage= set(_footage_, min(opt.footage, opt.frames)),
spacing= set(_spacing_, opt.spacing),
width= set(_width_, +t.attr(_width_) || t.width()),
height= set(_height_, +t.attr(_height_) || t.height()),
shy= set(_shy_, opt.shy),
frames= set(_frames_, orbital && footage || rows <= 1 && images.length || opt.frames),
multirow= rows > 1 || orbital,
revolution_x= set(_revolution_, axis('x', revolution) || stitched / 2 || width * 2),
revolution_y= set(_revolution_y_, !multirow ? 0 : (axis('y', revolution) || (rows > 3 ? height : height / (5 - rows)))),
rows= stitched ? 1 : ceil(frames / footage),
stitched_travel= set(_stitched_travel_, stitched - (loops ? 0 : width)),
stitched_shift= set(_stitched_shift_, 0),
stage_id= hash(id+opt.suffix),
img_class= t.attr(_class_),
classes= !img_class ? __ : img_class+___,
$overlay= $(tag(_div_), { id: stage_id.substr(1), 'class': classes+___+overlay_klass+___+frame_klass+'0' }),
$instance= t.wrap($overlay.addClass(opt.klass)).addClass(klass),
instances_count= instances.push(add_instance($instance)[0]),
$overlay= $instance.parent().bind(on.instance)
set(_image_, images.length ? __ : opt.image || src.replace(reel.re.image, '$1' + opt.suffix + '.$2'));
set(_cache_, $(tag(_div_), { 'class': cache_klass }).appendTo('body'));
set(_area_, $()),
set(_cached_, []);
set(_frame_, null);
set(_fraction_, null);
set(_row_, opt.row);
set(_tier_, 0);
set(_rows_, rows);
set(_rowlock_, opt.rowlock);
set(_framelock_, opt.framelock);
set(_departure_, set(_destination_, set(_distance_, 0)));
set(_bit_, 1 / frames);
set(_stage_, stage_id);
set(_backwards_, set(_speed_, opt.speed) < 0);
set(_loading_, false);
set(_velocity_, 0);
set(_vertical_, opt.vertical);
set(_preloaded_, 0);
set(_cwish_, negative_when(1, !opt.cw && !stitched));
set(_clicked_location_, {});
set(_clicked_, false);
set(_clicked_on_, set(_clicked_tier_, 0));
set(_lo_, set(_hi_, 0));
set(_reeling_, false);
set(_reeled_, false);
set(_opening_, false);
set(_brake_, opt.brake);
set(_center_, !!orbital);
set(_tempo_, opt.tempo / (reel.lazy? opt.laziness : 1));
set(_opening_ticks_, -1);
set(_ticks_, -1);
set(_annotations_, opt.annotations || $overlay.unbind(dot(_annotations_)) && {});
set(_ratio_, 1);
set(_backup_, {
attr: attr,
data: data
});
opt.steppable || $overlay.unbind('up.steppable');
opt.indicator || $overlay.unbind('.indicator');
css(__, { overflow: _hidden_, position: 'relative' });
responsive || css(__, { width: width, height: height });
responsive && $.each(responsive_keys, function(i, key){ truescale[key]= get(key) });
css(____+___+dot(klass), { display: _block_ });
css(dot(cache_klass), { position: 'fixed', left: px(-100), top: px(-100) }, true);
css(dot(cache_klass)+___+_img_, { position: _absolute_, width: 10, height: 10 }, true);
pool.bind(on.pool);
t.trigger(shy ? 'prepare' : 'setup')
},