(function(a){a.Typecho={insertFileToEditor:function(c,b,d){},editorResize:function(c,b){$("#"+c).resizeable({minHeight:100,afterResize:function(d){$.post(b,{size:d})}})},uploadComplete:function(b){}}})(window);(function(a){a.fn.dropdownMenu=function(b){this.each(function(){var d=this,c=a.extend({menuEl:null,btnEl:null},b);a(c.btnEl,d).click(function(){var e=a(this);e.toggleClass("active");a(c.menuEl,d).toggle();return false})})};a.fn.resizeable=function(b){var c=a.extend({minHeight:100,afterResize:null},b);return this.each(function(){var d=a('').insertAfter(this),j,g=0,e=c.minHeight,l=this;function f(m){textarea=a(m.data.el);textarea.blur();g=k(m).y;j=textarea.height()-g;textarea.css("opacity",0.25);a(document).mousemove(i).mouseup(h);return false}function i(o){var m=k(o).y,n=j+m;if(g>=(m)){n-=5}g=m;n=Math.max(e,n);textarea.height(n+"px");if(n=0&&"checkbox"!=g.attr("type")){h.stopPropagation()}else{b(this)}});a(d.selectAllEl).click(function(){var f=a(this),g=f.prop("checked");if(g){a(d.rowEl,e).each(function(){var h=a(this),i=a(d.checkEl,this).prop("checked",true);if(i.length>0){h.addClass("checked")}})}else{a(d.rowEl,e).each(function(){var h=a(this),i=a(d.checkEl,this).prop("checked",false);if(i.length>0){h.removeClass("checked")}})}});a(d.actionEl).click(function(){var f=a(this),g=f.attr("lang");if(!g||confirm(g)){e.parents("form").attr("action",f.attr("href")).submit()}return false})}})($);(function(a){a.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(b){b=b||{};this.each(function(){this.tableDnDConfig={onDragStyle:b.onDragStyle,onDropStyle:b.onDropStyle,onDragClass:b.onDragClass?b.onDragClass:"tDnD_whileDrag",onDrop:b.onDrop,onDragStart:b.onDragStart,scrollAmount:b.scrollAmount?b.scrollAmount:5};a.tableDnD.makeDraggable(this);if(0==$("tfoot",this).length&&0<$("thead",this).length){var d=$("thead",this),e=$("th",d).length,i=$('').insertAfter(d),c=$("tr:last",this);if(c.parent().prop("tagName").toLowerCase()!="tfoot"){var j=$("td",c),g=j.height();j.height(g-i.outerHeight())}}});a(document).bind("mousemove",a.tableDnD.mousemove).bind("mouseup",a.tableDnD.mouseup);return this},makeDraggable:function(e){var f=e.rows;var c=e.tableDnDConfig;for(var d=0;da.tableDnD.oldY;a.tableDnD.oldY=g;if(c.onDragClass){e.addClass(c.onDragClass)}else{e.css(c.onDragStyle)}var i=a.tableDnD.findDropTargetRow(e,g);if(i){if(f&&a.tableDnD.dragObject!=i){a.tableDnD.dragObject.parentNode.insertBefore(a.tableDnD.dragObject,i.nextSibling)}else{if(!f&&a.tableDnD.dragObject!=i){a.tableDnD.dragObject.parentNode.insertBefore(a.tableDnD.dragObject,i)}}}}return false},findDropTargetRow:function(g,h){var k=a.tableDnD.currentTable.rows;for(var f=0;fc-b)&&(h<(c+b))){if(j==g){return null}var d=a.tableDnD.currentTable.tableDnDConfig;if(d.onAllowDrop){if(d.onAllowDrop(g,j)){return j}else{return null}}else{var e=$(j).hasClass("nodrop");if(!e){return j}else{return null}}return j}}return null},mouseup:function(d){if(a.tableDnD.currentTable&&a.tableDnD.dragObject){var c=a.tableDnD.dragObject;var b=a.tableDnD.currentTable.tableDnDConfig;if(b.onDragClass){a(c).removeClass(b.onDragClass)}else{a(c).css(b.onDropStyle)}a.tableDnD.dragObject=null;if(b.onDrop){b.onDrop(a.tableDnD.currentTable,c)}a.tableDnD.currentTable=null}},serialize:function(){if(a.tableDnD.currentTable){var b="";var d=a.tableDnD.currentTable.id;var e=a.tableDnD.currentTable.rows;for(var c=0;c0){b+="&"}b+=d+"[]="+e[c].id}return b}else{return"Error: No Table id set, you need to set an id on your table and every row"}}};a.fn.extend({tableDnD:a.tableDnD.build})})($);(function(e){function g(){var i=document.createElement("input"),h="onpaste";i.setAttribute(h,"");return(typeof i[h]==="function")?"paste":"input"}var b=g()+".mask",d=navigator.userAgent,c=/iphone/i.test(d),a=/android/i.test(d),f;e.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_",};e.fn.extend({caret:function(j,h){var i;if(this.length===0||this.is(":hidden")){return}if(typeof j=="number"){h=(typeof h==="number")?h:j;return this.each(function(){if(this.setSelectionRange){this.setSelectionRange(j,h)}else{if(this.createTextRange){i=this.createTextRange();i.collapse(true);i.moveEnd("character",h);i.moveStart("character",j);i.select()}}})}else{if(this[0].setSelectionRange){j=this[0].selectionStart;h=this[0].selectionEnd}else{if(document.selection&&document.selection.createRange){i=document.selection.createRange();j=0-i.duplicate().moveStart("character",-100000);h=j+i.text.length}}return{begin:j,end:h}}},unmask:function(){return this.trigger("unmask")},mask:function(j,n){var k,i,m,o,l,h;if(!j&&this.length>0){k=e(this[0]);return k.data(e.mask.dataName)()}n=e.extend({placeholder:e.mask.placeholder,completed:null},n);i=e.mask.definitions;m=[];o=h=j.length;l=null;e.each(j.split(""),function(p,q){if(q=="?"){h--;o=p}else{if(i[q]){m.push(new RegExp(i[q]));if(l===null){l=m.length-1}}else{m.push(null)}}});return this.trigger("unmask").each(function(){var y=e(this),t=e.map(j.split(""),function(C,B){if(C!="?"){return i[C]?n.placeholder:C}}),A=y.val();function x(B){while(++B=0&&!m[B]){}return B}function s(E,B){var D,C;if(E<0){return}for(D=E,C=x(B);D=h){n.completed.call(y)}}}E.preventDefault()}}}function q(D,B){var C;for(C=D;CF.length){break}}else{if(t[B]===F.charAt(pos)&&B!==o){pos++;E=B}}}if(C){w()}else{if(E+11&&String(e)!=="[object Object]"){b=jQuery.extend({},b);if(e===null||e===undefined){b.expires=-1}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g)}e=String(e);return(document.cookie=[encodeURIComponent(d),"=",b.raw?e:encodeURIComponent(e),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=e||{};var a,f=b.raw?function(h){return h}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null}; /* * jQuery.ScrollTo * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 4/09/2012 * * @projectDescription Easy element scrolling using jQuery. * http://flesler.blogspot.com/2007/10/jqueryscrollto.html * @author Ariel Flesler * @version 1.4.3.1 * * @id jQuery.scrollTo * @id jQuery.fn.scrollTo * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. * The different options for target are: * - A number position (will be applied to all axes). * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes * - A jQuery/DOM element ( logically, child of the element to scroll ) * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. * - A percentage of the container's dimension/s, for example: 50% to go to the middle. * - The string 'max' for go-to-end. * @param {Number, Function} duration The OVERALL length of the animation, this argument can be the settings object instead. * @param {Object,Function} settings Optional set of settings or the onAfter callback. * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. * @option {Number, Function} duration The OVERALL length of the animation. * @option {String} easing The easing method for the animation. * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. * @option {Function} onAfter Function to be called after the scrolling ends. * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. * @return {jQuery} Returns the same jQuery object, for chaining. * * @desc Scroll to a fixed position * @example $('div').scrollTo( 340 ); * * @desc Scroll relatively to the actual position * @example $('div').scrollTo( '+=340px', { axis:'y' } ); * * @desc Scroll using a selector (relative to the scrolled element) * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); * * @desc Scroll to a DOM element (same for jQuery object) * @example var second_child = document.getElementById('container').firstChild.nextSibling; * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ * alert('scrolled!!'); * }}); * * @desc Scroll on both axes, to different values * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); */ (function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1,limit:true};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return/webkit/i.test(navigator.userAgent)||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){if(f==null){return}var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);if(!k.length){return}case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(d.limit&&/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);jQuery.fn.css2=jQuery.fn.css;jQuery.fn.css=function(){if(arguments.length){return jQuery.fn.css2.apply(this,arguments)}var b=["font-family","font-size","font-weight","font-style","color","box-sizing","text-transform","text-decoration","letter-spacing","box-shadow","line-height","text-align","vertical-align","direction","background-color","background-image","background-repeat","background-position","background-attachment","opacity","width","height","top","right","bottom","left","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","position","display","visibility","z-index","overflow-x","overflow-y","white-space","clip","float","clear","cursor","list-style-image","list-style-position","list-style-type","marker-offset"];var a=b.length,d={};for(var c=0;c