var tfx_handlers = {}; function tfx_func_swap_idx_by_coru() { this.idx.a = (this.coru=="c")?this.idx.f:this.idx.t; this.idx.b = (this.coru=="c")?this.idx.t:this.idx.f; }; function tfx_func_anim(rec) { var verb = rec["verb"] || this.verb; var dura = rec["dura"] || this.ttime; var delay = rec["delay"] || 0; var easing = this.easing || "ease"; var direction = !this.b_reverse ? "normal" : "reverse"; return { "animation-name":"kf-sshow-tfx-"+verb+"-"+rec["name"], "animation-duration":dura+"s", "animation-timing-function":easing, "animation-direction":direction, "animation-delay":delay+"s", "animation-iteration-count":1, "animation-fill-mode":"both" }; }; function tfx_func_core(pt) { var verb = this.verb_core || this.verb; if ( this.idx[pt] == undefined ) { this.idx[pt] = (pt=="a")?this.idx.f:this.idx.t; } var jqo = CSlideMan.create(this.idx[pt]); if ( this.init[pt] ) { jqo.addClass("init-sshow-tfx-"+verb+"-"+this.init[pt]) } if ( this.kf[pt] ) { jqo.css(tfx_func_anim.call(this,{ verb:verb, name:this.kf[pt] })); } jqo.appendTo(sshow.jqo_slide_w); }; function tfx_func_render() { tfx_func_core.call(this,"a"); tfx_func_core.call(this,"b"); }; tfx_handlers["fade"] = function() { this.kf.a = "f"; this.kf.b = "t"; tfx_func_render.call(this); }; tfx_handlers["zoom"] = function() { tfx_func_swap_idx_by_coru.call(this); this.init.b = "t"; this.kf.b = "t-"+this.coru; tfx_func_render.call(this); }; tfx_handlers["scroll"] = function() { this.kf.a = "f-"+this.dir; this.kf.b = "t-"+this.dir; tfx_func_render.call(this); }; tfx_handlers["turn"] = function() { this.init.a = "f-"+this.dir; this.kf.a = "f-"+this.dir; this.init.b = "t-"+this.dir; this.kf.b = "t-"+this.dir; tfx_func_render.call(this); }; tfx_handlers["cover"] = function() { this.verb_core = "cover"; this.coru = "c"; tfx_func_swap_idx_by_coru.call(this); this.init.b = this.dir; this.kf.b = "t-"+this.coru+"-"+this.dir; tfx_func_render.call(this,"cover"); }; tfx_handlers["uncover"] = function() { this.verb_core = "cover"; this.coru = "u"; tfx_func_swap_idx_by_coru.call(this); this.init.b = this.dir; this.kf.b = "t-"+this.coru+"-"+this.dir; tfx_func_render.call(this,"cover"); }; tfx_handlers["bounce"] = function() { tfx_func_swap_idx_by_coru.call(this); this.init.b = this.dir; this.kf.b = "t-"+this.coru+"-"+this.dir; tfx_func_render.call(this); }; var kenburns_n = -1; tfx_handlers["kenburns"] = function() { if ( this.dir == "random" ) { var n = Math.floor(Math.random() * 5); if ( kenburns_n == n ) { n = ((n + 1) % 5); } kenburns_n = n; switch( n ) { case 0: dir = "cc"; break; case 1: dir = "tl"; break; case 2: dir = "tr"; break; case 3: dir = "br"; break; case 4: dir = "bl"; break; } } else { dir = this.dir; } this.init.a = dir; this.kf.a = "f"; this.init.b = dir; this.kf.b = "t"; tfx_func_render.call(this); }; tfx_handler_slice = function() { var size = sshow.getSlideSize(); tfx_func_swap_idx_by_coru.call(this); CSlideMan.create(this.idx.a).appendTo(sshow.jqo_slide_w); var jqo_b = CSlideMan.create(this.idx.b); var jqo_board = $("