-
Notifications
You must be signed in to change notification settings - Fork 60
/
jquery.jkit.1.2.16.min.js
12 lines (10 loc) · 64.8 KB
/
jquery.jkit.1.2.16.min.js
1
2
3
4
5
6
7
8
9
10
11
12
// jQuery Plugin: jKit
// A very easy to use, cross platform jQuery UI toolkit that's still small in size, has the features you need and doesn't get in your way.
// Version 1.2.16 - 10. May. 2013
// http://jquery-jkit.com/
//
// by Fredi Bach
// http://fredibach.ch/jquery-plugins/
(function($,undefined){$.jKit=function(element,options,moreoptions){var defaults={prefix:"jkit",dataAttribute:"data-jkit",activeClass:"active",errorClass:"error",successClass:"success",ignoreFocus:!1,ignoreViewport:!1,keyNavigation:!0,touchNavigation:!0,plugins:{},replacements:{},delimiter:",",loadminified:!0,macros:{"hide-if-empty":"binding:selector=this;source=text;mode=css.display","smooth-blink":"loop:speed1=2000;duration1=250;speed2=250;duration2=2000"},commands:{}},plugin=this;plugin.version="1.2.16",plugin.inc=[],plugin.settings={},plugin.commands={},plugin.executions={};var $element=$(element),element=element;if("string"==typeof options){var singlecommand=options;moreoptions==undefined&&(moreoptions={}),options=moreoptions}var startX,startY,windowhasfocus=!0,uid=0,commandkeys={};($.support.htmlSerialize||$.support.opacity)&&$(window).focus(function(){windowhasfocus=!0}).blur(function(){windowhasfocus=!1}),plugin.init=function(a){a==undefined&&(a=$element),plugin.settings=$.extend({},defaults,options);var b=plugin.settings;singlecommand!=undefined?plugin.executeCommand(a,singlecommand,options):a.find("*[rel^=jKit], *["+b.dataAttribute+"]").each(function(){var c=this,d=$(this).attr("rel"),e=plugin.getDataCommands($(this));d=""!=e?$.trim(e).substring(1):$.trim(d).substring(5),d=d.substring(0,d.length-1),d=d.replace(/\]\s+\[/g,"]["),relsplit=d.split("]["),$.each(relsplit,function(d,e){e=e.replace(/\\=/g,"|jkit-eq|").replace(/\\:/g,"|jkit-dp|").replace(/\\;/g,"|jkit-sc|").replace(/\\\[/g,"|jkit-sbo|").replace(/\\\]/g,"|jkit-sbc|").replace(/\\\*/g,"|jkit-st|").replace(/\\ /g,"|jkit-sp|"),e=$.trim(e),b.macros[e]!=undefined&&(e=b.macros[e]);var f=plugin.parseOptions(e);if(b.macros[f.type]!=undefined){var g=plugin.parseOptions(b.macros[f.type]);f.type=g.type,f=$.extend({},g,f)}if("macro"==f.type&&relsplit[d-1]!=undefined)plugin.settings.macros[f.name]=relsplit[d-1];else if("repeat"==f.type&&relsplit[d-1]!=undefined){var h=plugin.parseOptions(relsplit[d-1]);a.on(f.onevent,function(){f.delay==undefined&&(f.delay=0),setTimeout(function(){plugin.executeCommand($(c),h.type,h)},f.delay)})}else if("info"==f.type){var i="jKit version: "+plugin.version+"\n";i+="Included commands: "+plugin.inc.join(", ")+"\n",console.log(i),console.log(a)}else{var j=[];if(f.target!=undefined){var k=f.target.split(".");switch(k=[k.shift(),k.join(".")],k[1]==undefined&&(k[1]="*"),k[0]){case"children":$(c).children(k[1]).each(function(){j.push(this)});break;case"each":$(c).find(k[1]).each(function(){j.push(this)});break;default:j.push(c)}}else j.push(c);$.each(j,function(e,g){var h=plugin.parseDynamicOptions(f);if(h.commandkey==undefined){var i=$(c).attr("id");h.commandkey=i!=undefined?i:b.prefix+"-uid-"+ ++uid}if(h.commandkey!=undefined&&(commandkeys[h.commandkey]={el:g,options:h,execs:0}),h.onevent!==undefined||h.andonevent!==undefined){var j=[];h.onevent!==undefined&&j.push(h.onevent),h.andonevent!==undefined&&j.push(h.andonevent);var k=j.join(" ");a.on(k,function(){b.replacements[h.type]!=undefined&&"function"==typeof b.replacements[h.type]?b.replacements[h.type].call(plugin,g,h.type,h):plugin.executeCommand(g,h.type,h)})}if(h.onevent===undefined)if(relsplit[d-1]!=undefined){var l="";if(relsplit[d-1]!=undefined){var m=plugin.parseOptions(relsplit[d-1]);l=m.type+"."+h.commandkey+".executed"}""!=l&&plugin.executions[m.type+"."+h.commandkey+".executed"]===undefined?a.on(l,function(){b.replacements[h.type]!=undefined&&"function"==typeof b.replacements[h.type]?b.replacements[h.type].call(plugin,g,h.type,h):plugin.executeCommand(g,h.type,h)}):b.replacements[h.type]!=undefined&&"function"==typeof b.replacements[h.type]?b.replacements[h.type].call(plugin,g,h.type,h):plugin.executeCommand(g,h.type,h)}else b.replacements[h.type]!=undefined&&"function"==typeof b.replacements[h.type]?b.replacements[h.type].call(plugin,g,h.type,h):plugin.executeCommand(g,h.type,h)})}})})},plugin.getDataCommands=function(a){for(var b=plugin.settings,c=a.get(0),d="",e=0,f=c.attributes,g=f.length;g>e;e++){var h=f.item(e).nodeName,i=h.split("-");if(i[0]+"-"+i[1]==b.dataAttribute)if(i.length>2){if(i[4]!==undefined&&"height"==i[4])var j=a.height();else var j=a.width();i[2]!==undefined&&i[3]!==undefined&&("gt"==i[2]&&j>parseInt(i[3])||"lt"==i[2]&&parseInt(i[3])>j)&&(d+=a.attr(h))}else d+=a.attr(h)}return d},plugin.applyMacro=function(a,b){var c=plugin.settings;if(c.macros[b]!=undefined){var d=c.macros[b],e=plugin.parseOptions(d);c.replacements[e.type]!=undefined&&"function"==typeof c.replacements[e.type]?c.replacements[e.type].call(plugin,a,e.type,e):plugin.executeCommand(a,e.type,e)}},plugin.parseOptions=function(a){var b=a.split(":"),c=b[0].split("."),d={type:$.trim(c[0])};if(c[1]!==undefined&&(d.commandkey=c[1]),d.execute==undefined&&(d.execute="always"),b.length>1){var e=b[1].split(";");$.each(e,function(a,b){var c=b.split("=");d[$.trim(c[0])]=$.trim(c[1])})}return d},plugin.fixSpeed=function(a){return"fast"!=a&&"slow"!=a&&(a=parseInt(a)),a},plugin.parseDynamicOptions=function(a){var b={};for(index in a){var c=a[index];if(c!==undefined&&c.indexOf("{")>-1&&c.indexOf("|")>0&&c.indexOf("}")>1){for(var d="",e=!1,f="",g=!1,h=0;c.length-1>=h;h++)if(e||"{"!=c.charAt(h)?e&&"}"==c.charAt(h)&&(e=!1,g=!0):e=!0,e||g){if(f+=c.charAt(h),g){f=f.slice(1,-1);var i=f.split("|");if("rand"==i[0]){var j=i[1].split("-");d+=plugin.getRandom(Number(j[0]),Number(j[1]))}g=!1,f=""}}else d+=c.charAt(h);b[index]=d}else b[index]=c}return b},plugin.getRandom=function(a,b){if(a>b)return-1;if(a==b)return a;var c;do c=Math.random();while(1==c);return a+parseInt(c*(b-a+1))},plugin.findElementTag=function(a,b,c,d){var e="";if(c===undefined||isNaN(c)||parseInt(c)!=c){var f={};a.find(b).each(function(a){if(!(25>a))return!1;var b=$(this).prop("tagName");""!=b[0]&&(f[b]!==undefined?f[b]++:f[b]=1)});var g=0,h="";for(var i in f)f[i]>g&&(g=f[i],h=i);e=h}else a.find(b).length>c&&(e=$(a.find(b).get(c)).prop("tagName"));return e!==undefined&&""!=e?e:d},plugin.addDefaults=function(a,b){if(plugin.settings.commands[a]!=undefined){var c=plugin.settings.commands[a];$.each(c,function(a,c){b[a]==undefined&&(b[a]=c),a.indexOf("speed")>-1&&(b[a]=plugin.fixSpeed(b[a]))})}return b},plugin.executeCommand=function(that,type,options){var s=plugin.settings,$that=$(that);if(plugin.commands[type]===undefined&&(plugin.commands[type]=[]),$.isArray(plugin.commands[type])){if(plugin.commands[type].push({el:that,options:options}),s.loadminified)var commandurl="jquery.jkit.commands/"+type+".min.js";else var commandurl="jquery.jkit.commands/"+type+".js";return 1==plugin.commands[type].length&&$.ajax({url:"jquery.jkit.commands/"+type+".js",success:function(data){if(-1!==data.indexOf("plugin.commands.")){var queue=plugin.commands[type];eval(data),$.each(queue,function(a,b){plugin.executeCommand(b.el,type,b.options)})}},dataType:"text"}),$that}return $element.trigger("jkit-commandinit",{element:$that,type:type,options:options}),options.commandkey!==undefined&&(commandkeys[options.commandkey].execs++,"once"==options.execute&&commandkeys[options.commandkey].execs>1||!isNaN(options.execute)&&commandkeys[options.commandkey].execs>options.execute)?$that:(options=plugin.addDefaults(type,options),$.each(options,function(a,b){"string"==typeof b&&(options[a]=b=b.replace(/\|jkit\-eq\|/g,"=").replace(/\|jkit\-dp\|/g,":").replace(/\|jkit\-sc\|/g,";").replace(/\|jkit\-sbo\|/g,"[").replace(/\|jkit\-sbc\|/g,"]").replace(/\|jkit\-st\|/g,"*").replace(/\|jkit\-sp\|/g," ")),"string"==typeof b&&"*"==b.slice(-1)&&(options[a]=window[b.slice(0,-1)],"function"==typeof options[a]&&(options[a]=options[a].call(that)))}),plugin.commands[type].execute($that,options),"remove"!=type&&($element.trigger(type+"."+options.commandkey+".executed",{}),plugin.executions[type+"."+options.commandkey+".executed"]=!0),$that)},plugin.triggerEvent=function(a,b,c){if(c.commandkey!==undefined){var d=a.split(" ");$.each(d,function(a,d){$element.trigger(c.commandkey+"."+d,{element:b,options:c})})}},plugin.cssFromString=function(a){var b=a.split(","),c={};return $.each(b,function(a,b){var d=b.split("(");if(2==d.length){var e=d[0],f=d[1].slice(0,-1);c[e]=f}}),c},plugin.addCommandDefaults=function(a,b){defaults.commands[a]=b,$element.trigger("command."+a+".loaded",{})},plugin.addKeypressEvents=function(a,b){plugin.settings.keyNavigation&&$(document).keydown(function(c){if(this===c.target||!/textarea|select/i.test(c.target.nodeName)&&"text"!==c.target.type){for(var d={8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},e=48;90>=e;e++)d[e]=String.fromCharCode(e).toLowerCase();if($.inArray(c.which,d)){var f="";c.altKey&&(f+="alt+"),c.ctrlKey&&(f+="ctrl+"),c.metaKey&&(f+="meta+"),c.shiftKey&&(f+="shift+");var g=f+d[c.which];g==b&&(a.trigger(f+d[c.which]),c.preventDefault())}}})},plugin.commands.init=function(){var a={};return plugin.addCommandDefaults("init",{}),a.execute=function(a,b){plugin.init(a),plugin.triggerEvent("complete",a,b)},a}(),plugin.commands.encode=function(){var a={};plugin.addCommandDefaults("encode",{format:"code",fix:"yes"}),a.execute=function(a,c){switch(c.format){case"code":var d=a.html();"yes"==c.fix&&(d=b(d)),a.html(d.replace(/</g,"<").replace(/>/g,">"));break;case"text":a.html(a.text());break;case"esc":a.html(escape(a.html()));break;case"uri":a.html(encodeURI(a.html()))}};var b=function(a){var b=a.split("\n"),c=9999;return $.each(b,function(a,b){if(""!=$.trim(b)){for(var d=-1;" "==b.charAt(d+1);)d++;d++,c>d&&(c=d)}}),$.each(b,function(a,d){b[a]=d.substr(c)}),b.join("\n")};return a}(),plugin.commands.chart=function(){var a={};return plugin.addCommandDefaults("chart",{max:0,delaysteps:100,speed:500,easing:"linear"}),a.execute=function(a,b){var c=plugin.settings,d=a.find("thead > tr > th.label").text(),e=a.attr("id"),f=[];a.find("thead > tr > th").each(function(){$(this).hasClass("label")||f.push($(this).text())});var g=0,h=[];a.find("tbody tr").each(function(){var a={label:$(this).find("th.label").text(),data:[]};$(this).find("th").each(function(){if(!$(this).hasClass("label")){var b=Number($(this).text());g=Math.max(b,g),a.data.push(b)}}),h.push(a)}),b.max>0&&b.max>g&&(g=b.max);var i=$("<div/>",{id:e,"class":c.prefix+"-chart"}),j=0,k=0;$.each(f,function(e,l){j++;var m=$("<div/>",{"class":c.prefix+"-chart-step"}).html("<label>"+l+"</label>").appendTo(i);$.each(h,function(a){if(h[a].data[e]>0){var i=$("<div/>",{"class":c.prefix+"-chart-plot "+c.prefix+"-chart-plot"+a}).appendTo(m);$("<div/>").text(h[a].label).delay(k).animate({width:100*(h[a].data[e]/g)+"%"},b.speed,b.easing).appendTo(i),$("<span/>",{"class":c.prefix+"-chart-info"}).text(d+" "+h[a].label+": "+h[a].data[e]+" "+b.units).appendTo(i)}}),j==f.length&&setTimeout(function(){plugin.triggerEvent("complete",a,b)},b.speed+k),k+=Number(b.delaysteps)}),a.replaceWith(i)},a}(),plugin.commands.animation=function(){var a={};plugin.addCommandDefaults("animation",{fps:25,loop:"no",from:"",to:"",speed:"500",easing:"linear",delay:0,on:""}),a.execute=function(a,c){var d=plugin.settings;if(""!=c.to)""!=c.from&&a.css(plugin.cssFromString(c.from)),setTimeout(function(){""!=c.on?a.on(c.on,function(){a.animate(plugin.cssFromString(c.to),c.speed,c.easing,function(){c.macro!=undefined&&plugin.applyMacro(a,c.macro),plugin.triggerEvent("complete",a,c)})}):a.animate(plugin.cssFromString(c.to),c.speed,c.easing,function(){c.macro!=undefined&&plugin.applyMacro($el,c.macro),plugin.triggerEvent("complete",a,c)})},c.delay);else{c.interval=1e3/c.fps;var e=[],f=0,g=0;a.children().each(function(){var a=$(this).attr("rel"),b=$(this).attr(d.dataAttribute);if(b!=undefined)var c=b.indexOf("["),h=b.indexOf("]"),i=b.substring(c+1,h);else var c=a.indexOf("["),h=a.indexOf("]"),i=a.substring(c+1,h);var j=plugin.parseOptions(i);j.el=$(this),j.easing==undefined&&(j.easing="linear"),j.start=f,f+=parseInt(j.steps),j.end=f,g=f,f++,e.push(j)}),c.lastframe=g,a.css("overflow","hidden"),a.html(e[0].el),window.setTimeout(function(){b(e,-1,a,c)},0)}};var b=function(a,c,d,e){if((windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus)&&(d.jKit_inViewport()||!d.jKit_inViewport()&&plugin.settings.ignoreViewport)){plugin.triggerEvent("showframe showframe"+(c+1),d,e),$.each(a,function(b,f){if(f.start==c){d.html(f.el.clone());var g=(f.end-f.start)*e.interval;if("fadeout"==f.action)d.children(":first").show().fadeTo(g,0,f.easing);else if("fadein"==f.action)d.children(":first").hide().fadeTo(g,1,f.easing);else if("fadeinout"==f.action)d.children(":first").hide().fadeTo(g/2,1,f.easing).fadeTo(g/2,0,f.easing);else if("tween"==f.action){var h=a[b+1].el;d.children(":first").animate({"font-size":h.css("font-size"),"letter-spacing":h.css("letter-spacing"),color:h.css("color"),opacity:h.css("opacity"),"background-color":h.css("background-color"),"padding-top":h.css("padding-top"),"padding-bottom":h.css("padding-bottom"),"padding-left":h.css("padding-left"),"padding-right":h.css("padding-right")},g,f.easing)}}}),c++;var f=!1;c>e.lastframe&&(c=0,f=!0),(f&&"yes"==e.loop||!f)&&window.setTimeout(function(){b(a,c,d,e)},e.interval),"no"==e.loop&&(e.macro!=undefined&&plugin.applyMacro(d,e.macro),plugin.triggerEvent("complete",d,e))}else window.setTimeout(function(){b(a,c,d,e)},e.interval)};return a}(),plugin.commands.tooltip=function(){var a={};return plugin.addCommandDefaults("tooltip",{text:"",content:"",color:"#fff",background:"#000",classname:"",follow:"no",event:"mouse",yoffset:20}),a.execute=function(a,b){var c=plugin.settings,d=!1;0==$("div#"+c.prefix+"-tooltip").length&&$("<div/>",{id:c.prefix+"-tooltip"}).css("position","absolute").hide().appendTo("body"),$tip=$("div#"+c.prefix+"-tooltip"),""!=b.content?b.text=$(b.content).html():(""==b.text&&(b.text=$.trim(a.attr("title"))),""==b.text&&(b.text=$.trim(a.attr("alt"))));var e="mouseenter",f="mouseleave click";"focus"==b.event&&(e="focus",f="blur"),a.on(e,function(c){""!=b.classname?$tip.html(b.text).removeClass().css({background:"",color:""}).addClass(b.classname):$tip.html(b.text).removeClass().css({background:b.background,color:b.color}),"focus"==b.event?$tip.css({top:a.offset().top+a.outerHeight(),left:a.offset().left}):($tip.css("top",c.pageY+b.yoffset).css("left",c.pageX),parseInt($tip.css("left"))>$(window).width()/2&&$tip.css("left","0px").css("left",c.pageX-$tip.width())),$tip.stop(!0,!0).fadeIn(200),plugin.triggerEvent("open",a,b),d=!0}).on(f,function(){var e=200;$tip.is(":animated")&&(e=0),$tip.stop(!0,!0).fadeOut(e,function(){d=!1}),plugin.triggerEvent("closed",a,b)}),"yes"==b.follow&&$("body").on("mousemove",function(a){d&&$tip.css("top",a.pageY+b.yoffset).css("left",a.pageX)})},a}(),plugin.commands.show=function(){var a={};return plugin.addCommandDefaults("show",{delay:0,speed:500,animation:"fade",easing:"linear"}),a.execute=function(a,b){a.hide().jKit_effect(!0,b.animation,b.speed,b.easing,b.delay,function(){plugin.triggerEvent("complete",a,b)})},a}(),plugin.commands.swap=function(){var a={};return plugin.addCommandDefaults("swap",{versions:"_off,_on",attribute:"src"}),a.execute=function(a,b){var c=plugin.settings,d=b.versions.split(c.delimiter),e=!1,f=a.attr(b.attribute),g=a.attr(b.attribute).replace(d[0],d[1]);"src"==b.attribute&&($("<img/>")[0].src=g),a.on("mouseenter click",function(){e||(a.attr(b.attribute,g),plugin.triggerEvent("active",a,b),e=!0)}).on("mouseleave click",function(){e&&(a.attr(b.attribute,f),plugin.triggerEvent("inactive",a,b),e=!1)})},a}(),plugin.commands.limit=function(){var a={};return plugin.addCommandDefaults("limit",{elements:"children",count:5,animation:"none",speed:250,easing:"linear",endstring:"..."}),a.execute=function(a,b){if("children"==b.elements)a.children(":gt("+(b.count-1)+")").each(function(){$(this).jKit_effect(!1,b.animation,b.speed,b.easing)}),setTimeout(function(){plugin.triggerEvent("complete",a,b)},b.speed);else{var c=a.text().substr(0,b.count);c!=a.text()&&(c=c.substr(0,c.length-b.endstring.length)+b.endstring,a.text(c))}},a}(),plugin.commands.lorem=function(){var a={};return plugin.addCommandDefaults("lorem",{paragraphs:0,length:"",random:"no"}),a.execute=function(a,b){var c=["Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.","Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.","Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.","At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.","Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."],d="";if("yes"==b.random&&(c=$.fn.jKit_arrayShuffle(c)),b.paragraphs>0)for(var e=1;b.paragraphs>=e;e++)d+="<p>"+c[(e-1)%7]+"</p>";else if(b.length!=undefined&&""!=b.length)for(var e=1;d.length<b.length-1;)d+=c[(e-1)%7]+" ",d=d.substring(0,b.length-1),e++;else d=c[0];a.html(d)},a}(),plugin.commands.plugin=function(){var a={};return plugin.addCommandDefaults("plugin",{script:""}),a.execute=function(a,b){var c=plugin.settings;c.plugins[b.script]!=undefined&&(b.functioncall=c.plugins[b.script].fn,c.plugins[b.script].option!=undefined&&(b.option=c.plugins[b.script].option),b.script=c.plugins[b.script].path),$.ajaxSetup({cache:!0}),b.script!=undefined&&$.getScript(b.script,function(){b.option!=undefined?a[b.functioncall](b[b.option]):(delete b.type,delete b.script,a[b.functioncall](b)),plugin.triggerEvent("complete",a,b)}),$.ajaxSetup({cache:!1})},a}(),plugin.commands.split=function(){var a={};return plugin.addCommandDefaults("split",{separator:"",container:"span",before:"",after:""}),a.execute=function(a,b){var c=a.text().split(b.separator);a.html(""),$.each(c,function(c,d){$("<"+b.container+"/>").text(d).appendTo(a)}),a.html(b.before+a.html()+b.after)},a}(),plugin.commands.random=function(){var a={};return plugin.addCommandDefaults("random",{count:1,remove:"yes"}),a.execute=function(a,b){for(var c=a.children().size(),d=[];d.length<b.count;){var e=Math.floor(Math.random()*c);-1==$.inArray(e,d)&&d.push(e)}var f=0;a.children().each(function(){-1==$.inArray(f,d)?"yes"==b.remove?$(this).remove():$(this).hide():$(this).show(),f++})},a}(),plugin.commands.api=function(){var command={};plugin.addCommandDefaults("api",{format:"json",value:"",url:"",interval:-1,template:""}),command.execute=function(a,b){""!=b.url&&readAPI(a,b)};var readAPI=function($el,options){"json"==options.format&&$.ajax({type:"GET",url:options.url,contentType:"application/json; charset=utf-8",dataType:"jsonp",error:function(){plugin.triggerEvent("error",$el,options)},success:function(data){if(""!=options.template&&plugin.commands.template!==undefined)$el.html(plugin.commands.template.templates[options.template].template.clone().show()),$el.find("[data-jkit-api]").each(function(){var value=$(this).attr("data-jkit-api");try{$(this).text(eval("data."+value.replace(/[^a-zA-Z0-9\.\[\]\_]+/g,"")))}catch(err){}}),$el.find("[data-jkit-api-if]").each(function(){var value=$(this).attr("data-jkit-api-if"),test=undefined;try{eval("test = data."+value.replace(/[^a-zA-Z0-9\.\[\]\_]+/g,""))}catch(err){}test==undefined&&$(this).remove()});else if(""!=options.value)try{$el.text(eval("data."+options.value.replace(/[^a-zA-Z0-9\.\[\]\_]+/g,"")))}catch(err){}else $el.text(data);options.macro!=undefined&&plugin.applyMacro($el,options.macro),plugin.triggerEvent("complete",$el,options),options.interval>-1&&setTimeout(function(){readAPI($el,options)},1e3*options.interval)}})};return command}(),plugin.commands.replace=function(){var a={};return plugin.addCommandDefaults("replace",{modifier:"g",search:"",replacement:""}),a.execute=function(a,b){var c=RegExp(b.search,b.modifier);a.html(a.html().replace(c,b.replacement))},a}(),plugin.commands.sort=function(){var a={};return plugin.addCommandDefaults("sort",{what:"text",by:"",start:0,end:0}),a.execute=function(a,b){var c=plugin.settings,d=a.parent().children().index(a);a.on("click",function(){plugin.triggerEvent("clicked",a,b);var e=[];a.parent().parent().parent().find("tbody > tr").each(function(){var a=$(this).find("td:nth-child("+(d+1)+")");switch(b.what){case"html":var c=a.html();break;case"class":var c=a.attr("class");break;default:var c=a.text()}(b.start>0||b.end>0)&&(c=b.end>b.start?c.substring(b.start,b.end):c.substring(b.start)),e.push({content:$(this).html(),search:c})}),a.hasClass(c.prefix+"-sort-down")?(a.parent().find("th").removeClass(c.prefix+"-sort-down").removeClass(c.prefix+"-sort-up"),a.addClass(c.prefix+"-sort-up"),e.sort(function(a,c){if("num"==b.by&&(a.search=Number(a.search),c.search=Number(c.search)),"date"==b.by){var a=new Date(a.search),c=new Date(c.search);return a.getTime()-c.getTime()}return a.search>c.search?-1:a.search<c.search?1:0})):(a.parent().find("th").removeClass(c.prefix+"-sort-down").removeClass(c.prefix+"-sort-up"),a.addClass(c.prefix+"-sort-down"),e.sort(function(a,c){if("num"==b.by&&(a.search=Number(a.search),c.search=Number(c.search)),"date"==b.by){var a=new Date(a.search),c=new Date(c.search);return c.getTime()-a.getTime()}return a.search<c.search?-1:a.search>c.search?1:0}));var f=a.parent().parent().parent().find("tbody");f.html("");var g="";$.each(e,function(a,b){g+="<tr>"+b.content+"</tr>"}),f.html(g),plugin.triggerEvent("complete",a,b)})},a}(),plugin.commands.respond=function(){var a={};plugin.addCommandDefaults("respond",{}),a.execute=function(a,c){if(c.width!=undefined){var d=c.width.split(",");d.sort(function(a,b){return parseInt(a)-parseInt(b)}),b(a,d),$(window).resize(function(){b(a,d)})}};var b=function(a,b){var c=a.width(),d="";for(var e in b)c>parseInt(b[e])&&(d=plugin.settings.prefix+"-respond-"+b[e]);if(a.attr("class")==undefined)var f=[];else var f=a.attr("class").split(/\s+/);a.removeClass();for(var e in f)-1==f[e].indexOf(plugin.settings.prefix+"-respond")&&a.addClass(f[e]);a.addClass(d)};return a}(),plugin.commands.parallax=function(){var a={};return plugin.addCommandDefaults("parallax",{strength:5,axis:"x",scope:"global",detect:"mousemove"}),a.execute=function(a,b){var c=plugin.settings,d=b.strength/10;if("scroll"==b.detect)var e=$(window);else if("global"==b.scope)var e=$(document);else var e=a;e.on(b.detect,function(e){if((windowhasfocus||!windowhasfocus&&c.ignoreFocus)&&(a.jKit_inViewport()||!a.jKit_inViewport()&&c.ignoreViewport)){var f=1;if("scroll"==b.detect)var g=$(window).scrollLeft()+$(window).width()/2,h=$(window).scrollTop()+$(window).height()/2;else var g=e.pageX,h=e.pageY;a.children().each(function(){var c=a.offset();if("x"==b.axis||"both"==b.axis){var e=-1*(g-c.left-a.width()/2)*d*f-$(this).width()/2+a.width()/2;$(this).css({left:e+"px"})}if("y"==b.axis||"both"==b.axis){var i=-1*(h-c.top-a.height()/2)*d*f-$(this).height()/2+a.height()/2;$(this).css({top:i+"px"})}f++})}})},a}(),plugin.commands.zoom=function(){var a={};return plugin.addCommandDefaults("zoom",{scale:2,speed:150,lightbox:"no"}),a.execute=function(a,b){var c=plugin.settings,d="zoom";a.parent().css("position","relative"),a.on("mouseover",function(){var e=a.position(),f=a.height(),g=a.width(),h=$("<div/>",{"class":c.prefix+"-"+d+"-overlay"}).css({position:"absolute",height:f+"px",width:g+"px",left:e.left+"px",top:e.top+"px",overflow:"hidden","background-image":"url("+a.attr("src")+")","background-repeat":"no-repeat","background-color":"#000",opacity:0}).on("mouseout",function(){h.fadeTo(b.speed,0,function(){h.remove(),plugin.triggerEvent("zoomout",a,b)})}).mousemove(function(a){var c=$(this).offset(),d=(a.pageX-c.left)*(b.scale-1),e=(a.pageY-c.top)*(b.scale-1);h.css("background-position","-"+d+"px -"+e+"px")}).fadeTo(b.speed,1,function(){plugin.triggerEvent("zoomin",a,b)}).insertAfter(a);"yes"==b.lightbox&&plugin.executeCommand(h,"lightbox",{})})},a}(),plugin.commands.partially=function(){var a={};return plugin.addCommandDefaults("partially",{height:200,text:"more ...",speed:250,easing:"linear",on:"mouseover",area:"",alphaon:.9,alphaoff:0}),a.execute=function(a,b){var c=plugin.settings,d=a.height();if(d>b.height){a.css("position","relative");var e=$("<div/>").addClass(c.prefix+"-morediv").appendTo(a).html(b.text).css({width:a.outerWidth()+"px",opacity:b.alphaon});if(plugin.addKeypressEvents(a,"down"),plugin.addKeypressEvents(a,"up"),"click"==b.on||$.fn.jKit_iOS())var f="click",g="click";else var f="mouseenter",g="mouseleave";$area="morediv"==b.area?e:a,a.css({height:b.height+"px",overflow:"hidden"}),$area.on(f+" down",function(){d>a.height()&&(e.fadeTo(b.speed,b.alphaoff),a.animate({height:d+"px"},b.speed,b.easing,function(){plugin.triggerEvent("open",a,b)}))}).on(g+" up",function(){a.height()==d&&(e.fadeTo(b.speed,b.alphaon),a.animate({height:b.height+"px"},b.speed,b.easing,function(){plugin.triggerEvent("closed",a,b)}))})}},a}(),plugin.commands.showandhide=function(){var a={};return plugin.addCommandDefaults("showandhide",{delay:0,speed:500,duration:1e4,animation:"fade",easing:"linear"}),a.execute=function(a,b){a.hide().jKit_effect(!0,b.animation,b.speed,b.easing,b.delay,function(){plugin.triggerEvent("shown",a,b),a.jKit_effect(!1,b.animation,b.speed,b.easing,b.duration,function(){plugin.triggerEvent("complete",a,b)})})},a}(),plugin.commands.filter=function(){var a={};plugin.addCommandDefaults("filter",{by:"class",affected:"",animation:"slide",speed:250,easing:"linear",logic:"and",global:"no"}),a.execute=function(a,c){a.find(".jkit-filter").each(function(){$(this).data("oldval",$.trim($(this).val())).on("change click input",function(){$.trim($(this).val())!=$(this).data("oldval")&&($(this).data("oldval",$.trim($(this).val())),c.loader!==undefined&&$(c.loader).show(),plugin.triggerEvent("clicked",a,c),b(a,c))})}),a.find(".jkit-filter").each(function(){return""!=$.trim($(this).val())?(c.loader!==undefined&&$(c.loader).show(),plugin.triggerEvent("clicked",a,c),b(a,c),!1):undefined})};var b=function(a,b){var c=[];a.find(".jkit-filter").each(function(){var a=[],b=$(this).val().split(" ");$.each(b,function(b,c){c=$.trim(c),""!=c&&a.push(c)}),c=c.concat(a)}),$container="yes"==b.global?$("body"):a,$container.find(b.affected).each(function(){var a=$(this);if("text"==b.by)var d=a.text().toLowerCase();if(c.length>0){var e=[];$.each(c,function(c,f){"class"==b.by?a.hasClass(f)&&e.push(f):"text"==b.by&&d.indexOf(f.toLowerCase())>-1&&e.push(f)}),e.length==c.length||e.length>0&&"or"==b.logic?a.jKit_effect(!0,b.animation,b.speed,b.easing,0):a.jKit_effect(!1,b.animation,b.speed,b.easing,0)}else a.jKit_effect(!0,b.animation,b.speed,b.easing,0)}),setTimeout(function(){b.loader!==undefined&&$(b.loader).hide(),plugin.triggerEvent("complete",a,b)},b.speed)};return a}(),plugin.commands.slideshow=function(){var a={};plugin.addCommandDefaults("slideshow",{shuffle:"no",interval:3e3,speed:250,animation:"fade",easing:"linear",on:""}),a.execute=function(a,c){var d=a.children();if("yes"==c.shuffle)for(var e,f,g=d.length,h=0;g>h;h++)f=Math.floor(Math.random()*g),e=d[h],d[h]=d[f],d[f]=e;a.css({position:"relative"}),a.html(d[0]),$.data(a,"anim",!1),""!=c.on?("mouseover"==c.on&&a.on("mouseleave",function(){$.data(a,"anim",!1)}),a.on(c.on,function(){"click"==c.on?$.data(a,"anim")?$.data(a,"anim",!1):($.data(a,"anim",!0),window.setTimeout(function(){b(d,0,a,c)},0)):"mouseover"==c.on&&($.data(a,"anim")||($.data(a,"anim",!0),window.setTimeout(function(){b(d,0,a,c)},0)))})):($.data(a,"anim",!0),window.setTimeout(function(){b(d,0,a,c)},c.interval))};var b=function(a,c,d,e){$.data(d,"anim")&&((windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus)&&(d.jKit_inViewport()||!d.jKit_inViewport()&&plugin.settings.ignoreViewport)?(a.length-1>c?c++:c=0,plugin.triggerEvent("hideentry hideentry"+(c+1),d,e),d.jKit_effect(!1,e.animation,e.speed,e.easing,0,function(){d.html(a[c]),plugin.triggerEvent("showentry showentry"+(c+1),d,e),d.jKit_effect(!0,e.animation,e.speed,e.easing,0,function(){window.setTimeout(function(){b(a,c,d,e)},e.interval)})})):window.setTimeout(function(){b(a,c,d,e)},e.interval))};return a}(),plugin.commands.cycle=function(){var a={};return plugin.addCommandDefaults("cycle",{what:"class",where:"li",scope:"children",sequence:"odd,even"}),a.execute=function(a,b){var c=plugin.settings,d=b.sequence.split(c.delimiter),e=0,f=b.where;"children"==b.scope&&(f="> "+f),a.find(f).each(function(){if(d[e]!=undefined&&""!=d[e])switch(b.what){case"class":$(this).addClass(d[e]);break;case"html":$(this).html(d[e]);break;default:var a=b.what.split(".");"attr"==a[0]?$(this).attr(a[1],d[e]):"css"==a[0]&&$(this).css(a[1],d[e])}e++,e>d.length-1&&(e=0)})},a}(),plugin.commands.binding=function(){var command={};plugin.addCommandDefaults("binding",{selector:"",source:"val",variable:"",mode:"text",interval:100,math:"",condition:"","if":"","else":"",speed:0,easing:"linear",search:"",trigger:"no",accuracy:"",min:"",max:"",applyto:"",delay:0}),command.execute=function(a,b){window.setTimeout(function(){binding(a,b)
},b.delay)};var binding=function(el,options){if(windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus){if(options.value==undefined){if(""!=options.selector){var selsplit=options.selector.split("|"),sourcesplit=options.source.split("."),values=[];if($.each(selsplit,function(a,b){var c;if("this"==b)c=el;else if("parent"==b)c=$(el).parent();else{var d=b.split(".");1==d.length?c=$(d[0]):"each"==d[0]?c=el.find(d[1]):"children"==d[0]&&(c=el.children(d[1]))}c.each(function(){switch(sourcesplit[0]){case"event":$(this).on(sourcesplit[1],function(){options.value=1,binding(el,options),options.macro!=undefined&&plugin.applyMacro($(el),options.macro)});break;case"html":var a=$(this).html();break;case"text":var a=$(this).text();break;case"attr":var a=$(this).attr(sourcesplit[1]);break;case"css":if("height"==sourcesplit[1])var a=$(this).height();else if("innerHeight"==sourcesplit[1])var a=$(this).innerHeight();else if("outerHeight"==sourcesplit[1])var a=$(this).outerHeight();else if("width"==sourcesplit[1])var a=$(this).width();else if("innerWidth"==sourcesplit[1])var a=$(this).innerWidth();else if("outerWidth"==sourcesplit[1])var a=$(this).outerWidth();else if("scrollTop"==sourcesplit[1])var a=$(this).scrollTop();else if("scrollLeft"==sourcesplit[1])var a=$(this).scrollLeft();else var a=$(this).css(sourcesplit[1]);break;case"scroll":switch(sourcesplit[1]){case"top":var a=$(window).scrollTop();break;case"left":var a=$(window).scrollLeft()}break;case"clearance":var b=el.offset().top-$(window).scrollTop(),c=$(window).scrollTop()+$(window).height()-(el.offset().top+el.height()),d=$(window).width()+$(window).scrollLeft()-(el.offset().left+el.width()),e=el.offset().left-$(window).scrollLeft();switch(sourcesplit[1]){case"bottom":var a=c;break;case"top":var a=b;break;case"right":var a=d;break;case"left":var a=e;break;default:var a=Math.min.apply(Math,[c,b,d,e])}break;case"has":switch(sourcesplit[1]){case"class":var a=$(this).hasClass(options.search);break;case"text":var a=$.fn.jKit_stringOccurrences($(this).text().toLowerCase(),options.search.toLowerCase());break;case"attribute":var a=$(this).attr(options.search)!==undefined;break;case"val":var a=$.fn.jKit_stringOccurrences($(this).val().toLowerCase(),options.search.toLowerCase());break;case"element":var a=$(this).find(options.search).length;break;case"children":var a=$(this).children(options.search).length;break;case"hash":var a=window.location.hash==options.search}break;case"location":var a=window.location[sourcesplit[1]];break;case"val":default:var a=$(this).val()}values.push(a)})}),sourcesplit[2]!=undefined){var value="";switch(sourcesplit[2]){case"max":value=Math.max.apply(Math,values);break;case"min":value=Math.min.apply(Math,values);break;case"sum":value=values.reduce(function(a,b){return a+b});break;case"avg":value=values.reduce(function(a,b){return a+b})/values.length}}else var value=values[0]}else if(""!=options.variable)var value=window[options.variable]}else value=options.value;isNaN(value)||parseInt(value)!=value||(""!=options.accuracy&&(value=Math.round(value/options.accuracy)*options.accuracy),""!=options.min&&options.min>value&&(value=options.min),""!=options.max&&value>options.max&&(value=options.max));var doit,rev=!1;if(""!=options.condition?(doit=!1,eval("if ("+options.condition.replace(/[^a-zA-Z 0-9#\<\>\=\.\!\']+/g,"")+") doit = true;")):value===!1?(doit=!1,rev=!0):doit=!0,(commandkeys[options.commandkey].condition==undefined||commandkeys[options.commandkey].condition!=doit)&&(doit?plugin.triggerEvent("true",$(el),options):plugin.triggerEvent("false",$(el),options),commandkeys[options.commandkey].condition=doit),rev&&(doit=!0),doit||""==options["else"]?doit&&""!=options["if"]&&(doit=!0,value=options["if"]):(doit=!0,value=options["else"]),doit){""!=options.math&&eval("value = "+options.math.replace(/[^a-zA-Z 0-9\+\-\*\/\.]+/g,"")+";"),"yes"==options.trigger&&(commandkeys[options.commandkey].triggervalue==undefined||commandkeys[options.commandkey].triggervalue!=value)&&(commandkeys[options.commandkey].triggervalue!==undefined&&plugin.triggerEvent("notvalue"+commandkeys[options.commandkey].triggervalue,$(el),options),plugin.triggerEvent("value"+value,$(el),options),commandkeys[options.commandkey].triggervalue=value);var $els=el;if(""!=options.applyto){var applysplit=options.applyto.split(".");1==applysplit.length?$els=$(applysplit[0]):"each"==applysplit[0]?$els=el.find(applysplit[1]):"children"==applysplit[0]&&($els=el.children(applysplit[1]))}$els.each(function(){var a=$(this),b=options.mode.split(".");switch(b[0]){case"text":a.text(value);break;case"html":a.html(value);break;case"val":a.val(value);break;case"attr":a.attr(b[1],value);break;case"css":if("display"==b[1]&&(""!=$.trim(value)&&0!=$.trim(value)&&value?b[2]!==undefined&&(value=b[2]):value="none"),options.speed>0){var c={};c[b[1]]=value,a.animate(c,options.speed,options.easing)}else a.css(b[1],value);break;case"none":break;default:if(b[0]!=undefined){var d=window[b[0]];"function"==typeof d&&d(value,a)}}})}}-1!=options.interval&&window.setTimeout(function(){binding(el,options)},options.interval)};return command}(),plugin.commands.accordion=function(){var a={};return plugin.addCommandDefaults("accordion",{active:1,animation:"slide",speed:250,easing:"linear"}),a.execute=function(a,b){var c=plugin.settings,d=plugin.findElementTag(a,">","max","div"),e=plugin.findElementTag(a,"> "+d+" >",0,"h3"),f=plugin.findElementTag(a,"> "+d+" >",1,"div"),g=[];a.children(d).each(function(){g.push({title:$(this).children(e).detach(),content:$(this).children(f).detach()})}),a.html("");var h=$("<ul/>",{}).appendTo(a),i=1;0==b.active&&(i=-1),$.each(g,function(d,g){var j=$("<li/>",{}).append(g.title).css("cursor","pointer").appendTo(h);b.active-1==d?(j.append(g.content).children(e).addClass(c.activeClass),i=d):j.append(g.content.hide()),j.find("> "+e).on("click",function(){d!=i?(plugin.triggerEvent("showentry showentry"+(d+1),a,b),h.find("> li > "+e).removeClass(c.activeClass),$(this).addClass(c.activeClass),"slide"==b.animation?(h.find("> li:nth-child("+(i+1)+") > "+f).slideUp(b.speed,b.easing),h.find("> li:nth-child("+(d+1)+") > "+f).slideDown(b.speed,b.easing)):(h.find("> li:nth-child("+(i+1)+") > "+f).hide(),h.find("> li:nth-child("+(d+1)+") > "+f).show()),i=d):(plugin.triggerEvent("hideentry hideentry"+(d+1),a,b),$(this).removeClass(c.activeClass).next().slideUp(b.speed,b.easing),i=-1)})})},a}(),plugin.commands.template=function(){var a={};a.templates={},plugin.addCommandDefaults("template",{action:"set",name:"template",dynamic:"no",addhtml:"+"}),a.execute=function(c,d){var e=plugin.settings;if("apply"==d.action){if($el=c,d.children!=undefined&&""!=d.children){$el=c.children(d.children);var f=0;$el.each(function(){f++,b($(this),d,f,$el.length)})}else b(c,d);"yes"==d.dynamic&&$("<a/>",{"class":e.prefix+"-"+type+"-add"}).html(d.addhtml).on("click",function(){$el=$(c.get(0));var a=$el.children(d.children).length+1;$el.find(".if-entry-last").hide(),b($("<"+d.children+"/>").appendTo($el),d,a,a),plugin.triggerEvent("added",c,d)}).insertAfter(c)}else{if(a.templates[d.name]==undefined&&(a.templates[d.name]=[]),d.vars==undefined)var h=[];else var h=d.vars.split(e.delimiter);a.templates[d.name]={template:c.detach(),vars:h}}};var b=function(b,d,e,f){var g={};$.each(a.templates[d.name].vars,function(a,c){var d=b.find("."+c);plugin.init(d),g[c]=""!=d.val()?d.val():d.html()}),b.html(a.templates[d.name].template.clone().show()),b.find('[class^="if-entry-"]').hide(),c(b,e),$.each(a.templates[d.name].vars,function(a,c){var d=b.find("."+c);d.is("input")||d.is("select")||d.is("textarea")?d.val(g[c]):d.html(g[c]),g[c]==undefined&&b.find(".if-"+c).length>0&&b.find(".if-"+c).remove(),1==e&&b.find(".if-entry-first").show(),e==f&&b.find(".if-entry-last").show(),b.find(".if-entry-nr-"+e).show()})},c=function(a,b){a.find('[class^="dynamic-"]').each(function(){var a=$(this),c=$(this).attr("class").split(/\s+/);$.each(c,function(c,d){var e=d.substr(8);if(""!=e&&a.attr(e)){var f=a.attr(e),g=f.lastIndexOf("_");g>-1&&(f=f.substr(0,g)),a.attr(e,f+"_"+b)}})})};return a}(),plugin.commands.tabs=function(){var a={};return plugin.addCommandDefaults("tabs",{active:1,animation:"none",speed:250,easing:"linear"}),a.execute=function(a,b){var c=plugin.settings,d=plugin.findElementTag(a,">","max","div"),e=plugin.findElementTag(a,"> "+d+" >",0,"h3"),f=plugin.findElementTag(a,"> "+d+" >",1,"div"),g=[];a.children(d).each(function(){g.push({title:$(this).children(e).html(),content:$(this).children(f).detach()})}),a.html("");var h=$("<ul/>",{}).appendTo(a),i=$;$.each(g,function(d,e){var f=$("<li/>",{}).html(e.title).css("cursor","pointer").appendTo(h);b.active-1==d&&f.addClass(c.activeClass);var j=function(){plugin.triggerEvent("showentry showentry"+(d+1),a,b),i.jKit_effect(!1,b.animation,b.speed,b.easing,0,function(){$(this).remove(),i=g[d].content.appendTo(a).hide(),i.jKit_effect(!0,b.animation,b.speed,b.easing)}),h.find("li").removeClass(c.activeClass),h.find("li:nth-child("+(d+1)+")").addClass(c.activeClass)};f.on("click ",function(){j()})}),g[b.active-1]!=undefined&&(i=g[b.active-1].content.appendTo(a))},a}(),plugin.commands.key=function(){var a={};return plugin.addCommandDefaults("key",{}),a.execute=function(a,b){b.code!=undefined&&(plugin.addKeypressEvents(a,b.code),a.on(b.code,function(){a.attr("onclick")!==undefined?a.click():a.attr("target")!==undefined&&"_blank"==a.attr("target")?window.open(a.attr("href"),"_blank",!1):window.location.href=a.attr("href"),b.macro!=undefined&&plugin.applyMacro(a,b.macro),plugin.triggerEvent("pressed",a,b)}))},a}(),plugin.commands.scroll=function(){var a={};return plugin.addCommandDefaults("scroll",{speed:500,dynamic:"yes",easing:"linear",offset:0}),a.execute=function(a,b){a.click(function(){if(plugin.triggerEvent("clicked",a,b),""==$(this).attr("href"))var c=0;else var c=$(a.attr("href")).offset().top;return c+=parseInt(b.offset),"yes"==b.dynamic&&(b.speed=Math.abs($(document).scrollTop()-c)/1e3*b.speed),$("html, body").animate({scrollTop:c+"px"},b.speed,b.easing,function(){plugin.triggerEvent("complete",a,b)}),!1})},a}(),plugin.commands.form=function(){var a={};return plugin.addCommandDefaults("form",{validateonly:"no"}),a.execute=function(a,b){var c=plugin.settings;a.append('<input type="hidden" name="'+c.prefix+'-requireds" id="'+c.prefix+'-requireds">'),b.error!=undefined&&(b.formerror=b.error);var d=[];a.on("submit",function(){var e=[];if($(this).find("span."+c.errorClass).remove(),$(this).find("*[rel^=jKit], *["+c.dataAttribute+"]").each(function(){var a=$(this).attr("rel"),b=$(this).attr(c.dataAttribute);if(b!=undefined)var f=b.indexOf("["),g=b.indexOf("]"),h=b.substring(f+1,g);else var f=a.indexOf("["),g=a.indexOf("]"),h=a.substring(f+1,g);var i=plugin.parseOptions(h);i.type;var k=!1,l=!1;if(i.required==undefined&&(i.required=!1),"true"==i.required&&(""==$(this).val()&&(k=!0,e.push({element:$(this),error:"required"})),l=!0,-1==$.inArray($(this).attr("name"),d)&&d.push($(this).attr("name"))),l||""!=$(this).val()||"group"==i.type){if("email"!=i.type||$.fn.jKit_emailCheck($(this).val())||(k=!0,e.push({element:$(this),error:"email"})),"url"!=i.type||$.fn.jKit_urlCheck($(this).val())||(k=!0,e.push({element:$(this),error:"url"})),"date"!=i.type||$.fn.jKit_dateCheck($(this).val())||(k=!0,e.push({element:$(this),error:"date"})),"date"==i.type&&new Date($(this).val()).getTime()<=new Date($(i.older).val()).getTime()&&(k=!0,e.push({element:$(this),error:"older"})),"date"==i.type&&new Date($(this).val()).getTime()>=new Date($(i.younger).val()).getTime()&&(k=!0,e.push({element:$(this),error:"younger"})),"time"!=i.type||$.fn.jKit_timeCheck($(this).val())||(k=!0,e.push({element:$(this),error:"time"})),"phone"!=i.type||$.fn.jKit_phoneCheck($(this).val())||(k=!0,e.push({element:$(this),error:"phone"})),"float"==i.type&&isNaN($(this).val())&&(k=!0,e.push({element:$(this),error:"float"})),"int"==i.type&&parseInt($(this).val())!=$(this).val()&&(k=!0,e.push({element:$(this),error:"int"})),("int"==i.type||"float"==i.type)&&i.min!=undefined&&$(this).val()<i.min&&"group"!=i.type&&(k=!0,e.push({element:$(this),error:"min"})),("int"==i.type||"float"==i.type)&&i.max!=undefined&&$(this).val()>i.max&&"group"!=i.type&&(k=!0,e.push({element:$(this),error:"max"})),("int"==i.type||"float"==i.type)&&i.bigger!=undefined&&$(this).val()>$(i.bigger).val()&&(k=!0,e.push({element:$(this),error:"bigger"})),("int"==i.type||"float"==i.type)&&i.smaller!=undefined&&$(this).val()<$(i.smaller).val()&&(k=!0,e.push({element:$(this),error:"smaller"})),"int"!=i.type&&"float"!=i.type&&i.min!=undefined&&$(this).val().length<i.min&&"group"!=i.type&&(k=!0,e.push({element:$(this),error:"minlength"})),"int"!=i.type&&"float"!=i.type&&i.max!=undefined&&$(this).val().length>i.max&&"group"!=i.type&&(k=!0,e.push({element:$(this),error:"maxlength"})),i.length!=undefined&&$(this).val().length!=i.length&&(k=!0,e.push({element:$(this),error:"length"})),"int"!=i.type&&"float"!=i.type&&i.longer!=undefined&&$(this).val().length>$(i.longer).val().length&&(k=!0,e.push({element:$(this),error:"longer"})),"int"!=i.type&&"float"!=i.type&&i.shorter!=undefined&&$(this).val().length<$(i.shorter).val().length&&(k=!0,e.push({element:$(this),error:"shorter"})),i.strength!=undefined&&$.fn.jKit_passwordStrength($(this).val())<i.strength&&(k=!0,e.push({element:$(this),error:"strength"})),i.same!=undefined&&$(this).val()!=$(i.same).val()&&(k=!0,e.push({element:$(this),error:"same"})),i.different!=undefined&&$(this).val()!=$(i.different).val()&&(k=!0,e.push({element:$(this),error:"different"})),"extension"==i.type){var m=i.options.split(c.delimiter),n=$(this).val().split("."),o=n[n.length-1];-1==$.inArray(o,m)&&(k=!0,e.push({element:$(this),error:"ext"}))}if("group"==i.type)if(i.min!=undefined||i.max!=undefined){var p=0;$(this).children("input[type=checkbox][checked]").each(function(){p++}),(i.min!=undefined&&i.min>p||i.max!=undefined&&p>i.max)&&(k=!0,e.push({element:$(this),error:"group"}))}else $(this).find("input[name='"+i.name+"']:checked").val()==undefined&&(k=!0,e.push({element:$(this),error:"group"}));if("custom"==i.type&&i.checkfunction!=undefined){var q=window[i.checkfunction];"function"==typeof q&&(q($(this).val())||(k=!0,e.push({element:$(this),error:"custom"})))}}k?(i.error!=undefined&&$(this).after('<span class="'+c.errorClass+'">'+i.error+"</span>"),$(this).addClass(c.errorClass)):$(this).removeClass(c.errorClass)}),0==e.length){if("yes"==b.validateonly)return plugin.triggerEvent("complete",a,b),!0;var f=$(this).attr("action");return a.removeClass(c.errorClass),b.success==undefined&&(b.success="Your form has been sent."),a.find("input#"+c.prefix+"-requireds").val(d.join(c.delimiter)),$.post(f,a.serialize(),function(d){if(a.find("."+c.errorClass).hide(),d.sent!=undefined&&1==d.sent)"#"==b.success.charAt(0)?a.html($(b.success).show()):a.html('<p class="'+c.successClass+'">'+b.success+"</p>"),plugin.triggerEvent("complete",a,b),b.macro!=undefined&&plugin.applyMacro(a,b.macro);else{for(x in d.error){var g=d.error[x];a.find("*[name="+g+"]").addClass(c.errorClass).after('<span class="'+c.errorClass+'">'+b.error+"</span>")}plugin.triggerEvent("error",a,b)}}).error(function(b,d,e){alert(e),a.append('<span class="'+c.errorClass+'">There was an error submitting the form: Error Code '+b.status+"</span>")}),!1}return a.addClass(c.errorClass),b.formerror!=undefined&&a.append('<span class="'+c.errorClass+'">'+b.formerror+"</span>"),plugin.triggerEvent("error",a,b),!1})},a}(),plugin.commands.ajax=function(){var a={};plugin.addCommandDefaults("ajax",{animation:"slide",speed:250,easing:"linear",when:"click"}),a.execute=function(a,c){var d=plugin.settings;if(c.href!=undefined&&""!=c.href)var e=c.href;else var e=a.attr("href");if("load"==c.when||"viewport"==c.when||"shown"==c.when)if("load"==c.when)a.load(e,function(){plugin.triggerEvent("complete",a,c)});else var f=setInterval(function(){("viewport"==c.when&&(a.jKit_inViewport()||!a.jKit_inViewport()&&d.ignoreViewport)||"shown"==c.when&&"none"!=a.css("display"))&&(c.src!=undefined?(a.attr("src",c.src),plugin.triggerEvent("complete",a,c)):a.load(e,function(){plugin.init(a),plugin.triggerEvent("complete",a,c)}),window.clearInterval(f))},100);else a.on("click",function(){return b(e,c,a),!1})};var b=function(a,b,c){var d=plugin.settings.prefix+"_ajax_temp_"+$.fn.jKit_getUnixtime();$(b.element).jKit_effect(!1,b.animation,b.speed,b.easing,0,function(){$(b.element).html(""),jQuery("<div/>",{id:d}).appendTo("body"),$("#"+d).load(a+" "+b.element,function(){$(b.element).html($("#"+d+" "+b.element).html()),plugin.init($(b.element)),plugin.triggerEvent("complete",c,b),$(b.element).jKit_effect(!0,b.animation,b.speed,b.easing),b.macro!=undefined&&plugin.applyMacro($(b.element),b.macro),$("#"+d).remove()})})};return a}(),plugin.commands.hide=function(){var a={};return plugin.addCommandDefaults("hide",{delay:0,speed:500,animation:"fade",easing:"linear"}),a.execute=function(a,b){a.jKit_effect(!1,b.animation,b.speed,b.easing,b.delay,function(){plugin.triggerEvent("complete",a,b)})},a}(),plugin.commands.fontsize=function(){var a={};return plugin.addCommandDefaults("fontsize",{steps:2,min:6,max:72,affected:"p",style:"font-size"}),a.execute=function(a,b){a.on("click",function(){return $element.find(b.affected).each(function(){var a=parseInt($(this).css(b.style))+parseInt(b.steps);a>=parseInt(b.min)&&parseInt(b.max)>=a&&$(this).css(b.style,a)}),plugin.triggerEvent("changed",a,b),!1})},a}(),plugin.commands.remove=function(){var a={};return plugin.addCommandDefaults("remove",{delay:0}),a.execute=function(a,b){a.delay(b.delay).hide(0,function(){a.remove(),plugin.triggerEvent("complete",a,b)})},a}(),plugin.commands.loop=function(){var a={};plugin.addCommandDefaults("loop",{speed1:500,speed2:500,duration1:2e3,duration2:2e3,easing1:"linear",easing2:"linear",animation:"fade"}),a.execute=function(a,c){b(a.hide(),c)};var b=function(a,c){(windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus)&&(a.jKit_inViewport()||!a.jKit_inViewport&&plugin.settings.ignoreViewport)?(plugin.triggerEvent("show",a,c),a.jKit_effect(!0,c.animation,c.speed1,c.easing1,c.duration1,function(){plugin.triggerEvent("hide",a,c),a.jKit_effect(!1,c.animation,c.speed2,c.easing2,c.duration2,b(a,c))})):window.setTimeout(function(){b(a,c)},100)};return a}(),plugin.commands.ticker=function(){var a={};plugin.addCommandDefaults("ticker",{speed:100,delay:2e3,loop:"yes"}),a.execute=function(a,c){var d=plugin.findElementTag(a,">","max","li"),e=[];a.find(d).each(function(){e.push({href:$(this).find("a").attr("href"),target:$(this).find("a").attr("target"),text:$(this).text()})});var f=$("<div/>");a.replaceWith(f),window.setTimeout(function(){b(f,c,e,0,0)},0)};var b=function(a,c,d,e,f){var g=!1;if((windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus)&&(a.jKit_inViewport()||!a.jKit_inViewport()&&plugin.settings.ignoreViewport)){var h=c.speed;f++,f>d[e].text.length?(h=c.delay,e++,e>=d.length&&("yes"==c.loop&&d.length>1?e=0:g=!0),g||(setTimeout(function(){plugin.triggerEvent("showentry showentry"+(e+1),a,c)},h),f=0)):d[e].href!=undefined?a.html('<a href="'+d[e].href+'" target="'+d[e].target+'">'+d[e].text.substr(0,f)+"</a>"):a.html(d[e].text.substr(0,f))}g||window.setTimeout(function(){b(a,c,d,e,f)},h)};return a}(),plugin.commands.carousel=function(){var a={};return plugin.addCommandDefaults("carousel",{autoplay:"yes",limit:5,animation:"grow",speed:250,easing:"linear",interval:5e3,prevhtml:"<",nexthtml:">"}),a.execute=function(a,b){var c=plugin.settings,d=0;a.children().each(function(){d++,d>b.limit&&$(this).hide()});var e=$("<a/>",{"class":c.prefix+"-carousel-prev"}).html(b.prevhtml).on("click left",function(){carousel(a,b,"prev")}).insertAfter(a),f=$("<a/>",{"class":c.prefix+"-carousel-next"}).html(b.nexthtml).on("click right",function(){carousel(a,b,"next")}).insertAfter(a);plugin.addKeypressEvents(e,"left"),plugin.addKeypressEvents(f,"right"),"yes"==b.autoplay&&window.setTimeout(function(){carousel(a,b)},b.interval)},carousel=function(a,b,c){if(c!=undefined&&(b.autoplay=!1),(windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus)&&(a.jKit_inViewport()||!a.jKit_inViewport()&&plugin.settings.ignoreViewport)){var d=!1;if(a.children().each(function(){$(this).is(":animated")&&(d=!0)}),!d){var e=Math.min(b.limit,a.children().length);"next"==c||c==undefined?(plugin.triggerEvent("shownext",a,b),a.children(":first-child").jKit_effect(!1,b.animation,b.speed,b.easing,0,function(){a.append(a.children(":nth-child(1)")),a.children(":nth-child("+e+")").jKit_effect(!0,b.animation,b.speed,b.easing,0)})):"prev"==c&&(plugin.triggerEvent("showprev",a,b),a.children(":nth-child("+e+")").jKit_effect(!1,b.animation,b.speed,b.easing,0,function(){a.prepend(a.children(":last-child")),a.children(":first-child").jKit_effect(!0,b.animation,b.speed,b.easing,0)}))}"yes"==b.autoplay&&window.setTimeout(function(){carousel(a,b)},b.interval)}else window.setTimeout(function(){carousel(a,b)},b.interval)},a}(),plugin.commands.paginate=function(){var a={};return plugin.addCommandDefaults("paginate",{limit:"25",by:"node",container:"",animation:"none",speed:250,easing:"linear",pos:"after"}),a.execute=function(a,b){var c=plugin.settings;if(""!=b.container)var d=a.find(b.container);else var d=a;if(a.attr("id")!==undefined)var e=c.prefix+"-paginate-"+a.attr("id");else var e=c.prefix+"-paginate-uid-"+ ++uid;var f=[],g=[];if("node"==b.by){var h=1;d.children().each(function(){h++,g.push($(this).detach()),h>Number(b.limit)&&(h=1,f.push(g),g=[])})}else{var i=0;d.children().each(function(){i+=$(this).outerHeight(),i>Number(b.limit)&&(i=$(this).outerHeight(),g.length>0&&f.push(g),g=[]),g.push($(this).detach())})}if(g.length>0&&f.push(g),f.length>1){var j=$("<ul/>",{id:e,"class":c.prefix+"-pagination"});$.each(f,function(e,f){var g=$("<li/>").html(e+1).on("click",function(){plugin.triggerEvent("showpage showpage"+(e+1),a,b),j.find("li").removeClass(c.activeClass),$(this).addClass(c.activeClass),d.jKit_effect(!1,b.animation,b.speed,b.easing,0,function(){d.html(""),$.each(f,function(a,b){b.clone().appendTo(d)}),d.jKit_effect(!0,b.animation,b.speed,b.easing,0)})});0==e&&g.addClass(c.activeClass),g.appendTo(j)}),"after"==b.pos?j.insertAfter(a):j.insertBefore(a),d.html(""),$.each(f[0],function(a,b){b.clone().appendTo(d)})}},a}(),plugin.commands.summary=function(){var a={};return plugin.addCommandDefaults("summary",{what:"",linked:"yes",from:"",scope:"children",style:"ul",indent:"no"}),a.execute=function(a,b){var c=plugin.settings,d="",e="",f="";if("children"==b.scope&&(f="> "),"headers"==b.what&&(b.what=":header"),$(b.from).find(f+b.what).each(function(){var a=$(this),f="";if(":header"==b.what&&"yes"==b.indent){var g=a.prop("tagName");if(2==g.length&&""!=g[1])for(var h=g[1]-1,i=1;h>=i;i++)f+=" "}if("yes"==b.linked){if(a.attr("id")!==undefined)var j=a.attr("id");else{var j=c.prefix+"-uid-"+ ++uid;a.attr("id",j)}window.location.hash=="#"+j&&(e=j),d+="select"==b.style?'<option value="'+j+'">'+f+$(this).text()+"</option>":'<li><a href="#'+j+'">'+f+$(this).text()+"</a></li>"}else d+="select"==b.style?'<option value="">'+f+$(this).text()+"</option>":"<li>"+f+$(this).text()+"</li>"}),""!=d&&(a.html("<"+b.style+">"+d+"</"+b.style+">"),"select"==b.style&&"yes"==b.linked&&a.find("select").on("change",function(){window.location.hash="#"+$(this).val(),$(this).blur()}),"select"==b.style&&"yes"==b.linked&&""!=e&&(a.find("select").val(e),a.find("#"+e).offset()!==undefined))){var g=a.find("#"+e).offset().top;$("html, body").css({scrollTop:g+"px"})}},a}(),plugin.commands.gallery=function(){var a={};return plugin.addCommandDefaults("gallery",{active:1,event:"click",showcaptions:"yes",animation:"none",speed:500,easing:"linear",lightbox:"no"}),a.execute=function(a,b){var c=plugin.settings,d="gallery",e=a.children();a.html(a.children(":nth-child("+b.active+")").clone()),"yes"==b.lightbox&&plugin.executeCommand(a.find("img"),"lightbox",{});var f=$("<div/>",{id:c.prefix+"-"+a.attr("id")+"-"+d+"-thumbs"}).addClass(c.prefix+"-"+d+"-thumbs").insertAfter(a);if("yes"==b.showcaptions)var g=$("<div/>",{id:c.prefix+"-"+a.attr("id")+"-"+d+"-captions"}).addClass(c.prefix+"-"+d+"-captions").text($(e[b.active-1]).attr("title")).insertAfter(a);$.each(e,function(e,h){"click"!=b.event&&"yes"==b.lightbox&&plugin.executeCommand($(h),"lightbox",{group:c.prefix+"-"+a.attr("id")+"-"+d}),b.active-1==e&&$(h).addClass(c.activeClass),$(h).on(b.event,function(){plugin.triggerEvent("hideentry",a,b),a.jKit_effect(!1,b.animation,b.speed,b.easing,0,function(){a.find("img").attr("src",$(h).attr("src")),"yes"==b.lightbox&&plugin.executeCommand(a.find("img").unbind("click"),"lightbox",{}),plugin.triggerEvent("showentry showentry"+(e+1),a,b),a.jKit_effect(!0,b.animation,b.speed,b.easing,0),f.find("img").removeClass(c.activeClass),$(h).addClass(c.activeClass),"yes"==b.showcaptions&&g.text($(h).attr("title"))})}).css({cursor:"pointer"}).appendTo(f)})},a}(),plugin.commands.background=function(){var a={};return plugin.addCommandDefaults("background",{distort:"no"}),a.execute=function(a,b){var c=plugin.settings,d=$("<div/>",{id:c.prefix+"-background"}).css({position:"fixed",right:"0px",top:"0px",overflow:"hidden","z-index":"-1",width:$(window).width(),height:$(window).height()}).appendTo("body");d.append(a);var e=a.attr("width"),f=a.attr("height");scaleFit(d,a,e,f,b.distort),$(window).resize(function(){scaleFit(d,a,e,f,b.distort),plugin.triggerEvent("resized",a,b)})},scaleFit=function(a,b,c,d,e){var f=$(window).width(),g=$(window).height();a.css({width:f+"px",height:g+"px"});var h=0,i=0;if("no"==e){var j=c/d,k=f/g;j>k?(f=g*j,i=-1*((f-$(window).width())/2)):(g=f/j,h=-1*((g-$(window).height())/2))}b.css({position:"fixed",top:h+"px",left:i+"px",width:f+"px",height:g+"px"})},a}(),plugin.commands.live=function(){var a={};plugin.addCommandDefaults("live",{interval:60}),a.execute=function(a,c){a.attr("src")!==undefined&&window.setInterval(function(){b(a,c),plugin.triggerEvent("reloaded",a,c)},1e3*c.interval)};var b=function(a){if((windowhasfocus||!windowhasfocus&&plugin.settings.ignoreFocus)&&(a.jKit_inViewport()||!a.jKit_inViewport()&&plugin.settings.ignoreViewport)){var c=a.attr("src").split("?");a.attr("src",c[0]+"?t="+$.fn.jKit_getUnixtime())}};return a}(),plugin.commands.lightbox=function(){var a={},b={};return plugin.addCommandDefaults("lightbox",{speed:500,opacity:.7,clearance:200,closer:"x",next:">",prev:"<",modal:"no",width:"",height:"",titleHeight:20,group:""}),a.execute=function(a,c){var d=plugin.settings,e="lightbox",f="";a.attr("href")!==undefined&&(f=a.attr("href")),""==f&&a.attr("src")!==undefined&&(f=a.attr("src")),""==f&&a.css("background-image")!==undefined&&(f=a.css("background-image").replace('"',"").replace('"',"").replace("url(","").replace(")","")),""!=f&&(""!=c.group&&(b[c.group]==undefined&&(b[c.group]=[]),b[c.group].push(a)),a.on("click",function(){plugin.triggerEvent("clicked",a,c),"no"==c.modal&&$("<div/>",{id:d.prefix+"-"+e+"-bg","class":d.prefix+"-"+e+"-closer "+d.prefix+"-"+e+"-el"}).fadeTo(c.speed,c.opacity).appendTo("body");var h=$("<div/>",{id:d.prefix+"-"+e+"-content","class":d.prefix+"-"+e+"-el"}).fadeTo(0,.01).appendTo("body");$.fn.jKit_iOS()&&h.css("top",$(window).scrollTop()+"px"),""!=c.width&&(h.css({width:c.width}),h.css({left:($(window).width()-h.outerWidth())/2+"px"})),""!=c.height&&(h.css({height:c.height}),h.css({top:($(window).height()-h.outerHeight())/2+"px"}));var i=$("<div/>",{id:d.prefix+"-"+e+"-nav","class":d.prefix+"-"+e+"-el"}).hide().fadeTo(c.speed,1).appendTo("body");$("<span/>",{"class":d.prefix+"-"+e+"-closer"}).html(c.closer).prependTo(i);var k=h.offset();if(i.css({top:k.top-c.titleHeight-$(window).scrollTop()+"px",left:k.left+h.outerWidth()-i.width()+"px"}),""!=c.group){var l=$("<span/>",{id:d.prefix+"-"+e+"-nav-next"}).prependTo(i),m=$("<span/>",{id:d.prefix+"-"+e+"-nav-prev"}).prependTo(i);plugin.addKeypressEvents(l,"right"),plugin.addKeypressEvents(m,"left"),b[c.group][b[c.group].length-1]!=a&&l.html(c.next).on("click right",function(){$.each(b[c.group],function(d,f){f==a&&($("."+plugin.settings.prefix+"-"+e+"-el").fadeTo(c.speed,0,function(){$(this).remove()}),b[c.group][d+1].click())})}),b[c.group][0]!=a&&m.html(c.prev).on("click left",function(){$.each(b[c.group],function(d,f){f==a&&($("."+plugin.settings.prefix+"-"+e+"-el").fadeTo(c.speed,0,function(){$(this).remove()}),b[c.group][d-1].click())})})}$title=$("<div/>",{id:d.prefix+"-"+e+"-title","class":d.prefix+"-"+e+"-el"}).css({top:k.top-c.titleHeight-$(window).scrollTop()+"px",left:k.left+"px",width:h.width()+"px"}).hide().text(a.attr("title")).fadeTo(c.speed,1).appendTo("body"),$.support.leadingWhitespace||(f=f+"?"+(new Date).getTime());var n=new Image;return $(n).load(function(){var b=($(this).outerWidth()+c.clearance)/$(window).width(),d=($(this).outerHeight()+c.clearance)/$(window).height(),e=Math.max(b,d);if(e>1){var f=$(this).height();$(this).width($(this).width()/e),$(this).height(f/e)}var g=($(window).width()-$(this).outerWidth())/2,j=($(window).height()-$(this).outerHeight())/2;h.width($(this).width()).height($(this).height()).css({left:g+"px",top:j+"px"}).fadeTo(c.speed,1),$(this).hide().fadeTo(c.speed,1),""!=a.attr("title")&&$title.css({top:j-c.titleHeight+"px",left:g+"px",width:$(this).width()+"px"}),i.css({top:j-c.titleHeight+"px",left:g+h.outerWidth()-i.width()+"px"})}).attr("src",f).appendTo(h).error(function(){h.html('<iframe id="'+d.prefix+"-"+e+'-iframe" src="'+f+'" style="border:none;width:100%;height:100%"></iframe>').fadeTo(c.speed,1)}),$("."+d.prefix+"-"+e+"-closer").click(function(){$("."+d.prefix+"-"+e+"-el").fadeTo(c.speed,0,function(){$(this).remove()})}),!1}))},plugin.closeLightbox=function(){$("."+plugin.settings.prefix+"-lightbox-el").fadeTo("fast",0,function(){$(this).remove()})},a}(),plugin.commands.menu=function(){var a={};return plugin.addCommandDefaults("menu",{autoactive:"no"}),a.execute=function(a,b){var c=plugin.settings;if("yes"==b.autoactive){var d=(""+window.location).split("#")[0].split("/");a.find("a").filter(function(){return $(this).attr("href")==d[d.length-1]}).addClass(c.activeClass)}a.find("li").hover(function(){$(this).addClass("hover"),$("ul:first",this).css("visibility","visible")},function(){$(this).removeClass("hover"),$("ul:first",this).css("visibility","hidden")}).on("click",function(){$(this).addClass("hover"),$("ul:first",this).css("visibility","visible")})},a}();for(x in plugin.commands)"init"!=x&&plugin.inc.push(x);plugin.init()},$.fn.jKit_effect=function(a,b,c,d,e,f){return this.each(function(){f==undefined&&(f=function(){}),e==undefined&&(e=0),"fade"==b?a?$(this).delay(e).fadeTo(c,1,d,f):$(this).delay(e).fadeTo(c,0,d,f):"slide"==b?a?$(this).delay(e).slideDown(c,d,f):$(this).delay(e).slideUp(c,d,f):"none"==b?(a?$(this).delay(e).show():$(this).delay(e).hide(),f()):a?$(this).delay(e).show(c,d,f):$(this).delay(e).hide(c,d,f)})},$.fn.jKit_getUnixtime=function(){var a=new Date,b=a.getTime();return parseInt(b/1e3)},$.fn.jKit_arrayShuffle=function(a){for(var b,c,d=0;a.length>d;d++)c=Math.floor(Math.random()*a.length),b=a[d],a[d]=a[c],a[c]=b;return a},$.fn.jKit_stringOccurrences=function(a,b){for(var c=0,d=0;;){if(d=a.indexOf(b,d),-1==d)break;c++,d+=b.length}return c},$.fn.jKit_emailCheck=function(a){var b=/^[a-z0-9\._-]+@([a-z0-9_-]+\.)+[a-z]{2,6}$/i;return b.test(a)},$.fn.jKit_urlCheck=function(a){var b=/^(?:(ftp|http|https):\/\/)?(?:[\w\-]+\.)+[a-z]{2,6}$/i;return b.test(a)},$.fn.jKit_dateCheck=function(a){return $.fn.jKit_regexTests(a,[/^[0-9]{2}\.[0-9]{2}\.[0-9]{2}$/i,/^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{2}$/i,/^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{4}$/i,/^[0-9]{2}\.[0-9]{2}\.[0-9]{4}$/i,/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/i,/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/i])},$.fn.jKit_timeCheck=function(a){return $.fn.jKit_regexTests(a,[/^[0-9]{1,2}\:[0-9]{2}$/i,/^[0-9]{1,2}\:[0-9]{2}\:[0-9]{2}$/i])},$.fn.jKit_phoneCheck=function(a){return $.fn.jKit_regexTests(a,[/^(\+|0)([\d ])+(0|\(0\))+[\d ]+(-\d*)?\d$/,/^(\+|0)[\d ]+(-\d*)?\d$/,/^((((\(\d{3}\))|(\d{3}-))\d{3}-\d{4})|(\+?\d{2}((-| )\d{1,8}){1,5}))(( x| ext)\d{1,5}){0,1}$/])
},$.fn.jKit_passwordStrength=function(a){var b=0;return 5>a.length?b+=5:a.length>4&&8>a.length?b+=15:a.length>=8&&(b+=30),a.match(/[a-z]/)&&(b+=5),a.match(/[A-Z]/)&&(b+=10),a.match(/\d+/)&&(b+=10),a.match(/(.*[0-9].*[0-9].*[0-9])/)&&(b+=10),a.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)&&(b+=10),a.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)&&(b+=10),a.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(b+=5),a.match(/([a-zA-Z])/)&&a.match(/([0-9])/)&&(b+=5),a.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)&&(b+=5),b},$.fn.jKit_regexTests=function(a,b,c){c===undefined&&(c=!1);var d=0;for(var e in b)b[e].test(a)&&d++;return c&&d==b.length||!c&&d>0},$.fn.jKit_getAttributes=function(){return this.each(function(){for(var a={},b=$(this)[0].attributes,c=b.length,d=0;c>d;d++)a[b[d].name.toLowerCase()]=b[d].value;return a})},$.fn.jKit_setAttributes=function(a){return this.each(function(){$.each(a,function(a,b){try{$(this).attr(a+"",b+"")}catch(c){}})})},$.fn.jKit_iOS=function(){return navigator.userAgent.match(/(iPod|iPhone|iPad)/i)},$.fn.jKit_belowTheFold=function(){var a=$(window).height()+$(window).scrollTop();return $(this).offset().top>=a},$.fn.jKit_aboveTheTop=function(){var a=$(window).scrollTop();return a>=$(this).offset().top+$(this).height()},$.fn.jKit_rightOfScreen=function(){var a=$(window).width()+$(window).scrollLeft();return $(this).offset().left>=a},$.fn.jKit_leftOfScreen=function(){var a=$(window).scrollLeft();return a>=$(this).offset().left+$(this).width()},$.fn.jKit_inViewport=function(){return!($(this).jKit_belowTheFold()||$(this).jKit_aboveTheTop()||$(this).jKit_rightOfScreen()||$(this).jKit_leftOfScreen())},$.fn.jKit=function(a,b){return this.each(function(){var c=new $.jKit(this,a,b);$(this).data("jKit",c)})}})(jQuery);