").attr("id","iframe-splitter-fix-"+b).addClass("iframe-splitter-fix").css({background:"#fff",width:f.offsetWidth+
-"px",height:f.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css($(this).offset()).appendTo("body")})}function r(f){if(!b.drag_active)return!1;window.clearTimeout(b.ts);b.ts=window.setTimeout(function(){var e=rcube_event.get_mouse_pos(f);if(b.relative){var g=b.parent.offset();e.x-=g.left;e.y-=g.top}b.horizontal?e.y-b.halfsize>b.p1pos.top&&e.y+b.halfsize
b.min&&(b.pos=Math.min(b.pos,b.parent.height()-
+function rcube_splitter(e){function q(f){if(bw.konq||bw.chrome||bw.safari)document.body.style.webkitUserSelect="none";b.p1pos=b.relative?b.p1.position():b.p1.offset();b.p2pos=b.relative?b.p2.position():b.p2.offset();b.drag_active=!0;
+if(f.type=='touchstart')
+$(document).on('touchmove.'+this.id,r).on('touchend.'+this.id,g);
+else if(f.type=='mousedown')
+$(document).on("mousemove."+this.id,r).on("mouseup."+this.id,g);rcmail.message_list&&(rcmail.message_list.drag_active=!0);$("iframe").each(function(b,f){$("").attr("id","iframe-splitter-fix-"+b).addClass("iframe-splitter-fix").css({background:"#fff",width:f.offsetWidth+
+"px",height:f.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css($(this).offset()).appendTo("body")})}function r(f){if(!b.drag_active)return!1;window.clearTimeout(b.ts);b.ts=window.setTimeout(function(){
+var e=(f.type=='touchmove'?rcube_event.get_touch_pos(f):rcube_event.get_mouse_pos(f));
+if(b.relative){var g=b.parent.offset();e.x-=g.left;e.y-=g.top}b.horizontal?e.y-b.halfsize>b.p1pos.top&&e.y+b.halfsizeb.min&&(b.pos=Math.min(b.pos,b.parent.height()-
b.min)),b.resize()):e.x-b.halfsize>b.p1pos.left&&e.x+b.halfsizeb.min&&(b.pos=Math.min(b.pos,b.parent.width()-b.min)),b.resize());b.p1pos=b.relative?b.p1.position():b.p1.offset();b.p2pos=b.relative?b.p2.position():b.p2.offset()},1);return!1}function g(f){if(bw.konq||bw.chrome||bw.safari)document.body.style.webkitUserSelect="auto";$(document).off("."+b.id);b.drag_active=!1;rcmail.message_list&&(rcmail.message_list.drag_active=
!1);$("div.iframe-splitter-fix").remove();b.set_cookie();"function"==typeof b.callback&&b.callback(b);return bw.safari?!0:rcube_event.cancel(f)}function w(f){b.horizontal?(f=parseInt(b.parent.outerHeight(),10)-parseInt(b.p2[0].style.top,10),b.p2.css("height",(0").attr("id",this.id).attr("unselectable",
-"on").attr("role","presentation").addClass("splitter "+(this.horizontal?"splitter-h":"splitter-v")).appendTo(this.parent).mousedown(q);if(this.horizontal){var b=this.p1pos.top+this.p1.outerHeight();this.handle.css({left:"0px",top:b+"px"})}else b=this.p1pos.left+this.p1.outerWidth(),this.handle.css({left:b+"px",top:"0px"});bw.ie&&$(window).resize(w);(b=this.get_cookie())&&!isNaN(b)?(this.pos=parseFloat(b),this.resize()):this.pos&&(this.resize(),this.set_cookie())}};this.resize=function(){if(this.horizontal){if(this.p1.css("height",
+"on").attr("role","presentation").addClass("splitter "+(this.horizontal?"splitter-h":"splitter-v")).appendTo(this.parent)
+.on('touchstart',q)
+.mousedown(q);if(this.horizontal){var b=this.p1pos.top+this.p1.outerHeight();this.handle.css({left:"0px",top:b+"px"})}else b=this.p1pos.left+this.p1.outerWidth(),this.handle.css({left:b+"px",top:"0px"});bw.ie&&$(window).resize(w);(b=this.get_cookie())&&!isNaN(b)?(this.pos=parseFloat(b),this.resize()):this.pos&&(this.resize(),this.set_cookie())}};this.resize=function(){if(this.horizontal){if(this.p1.css("height",
Math.floor(this.pos-this.p1pos.top-Math.floor(this.halfsize))+"px"),this.p2.css("top",Math.ceil(this.pos+Math.ceil(this.halfsize)+2)+"px"),this.handle.css("top",Math.round(this.pos-this.halfsize+this.offset)+"px"),bw.ie){var b=parseInt(this.parent.outerHeight(),10)-parseInt(this.p2.css("top"),10);this.p2.css("height",(0