Vergleich jscripts/jquery.plugins.min.js - 1.8.2 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
(function(e){var t=function(){return false===e.support.boxModel&&e.support.objectAll&&e.support.leadingWhitespace}();e.jGrowl=function(t,n){if(e("#jGrowl").size()===0)e('<div id="jGrowl"></div>').addClass(n&&n.position?n.position:e.jGrowl.defaults.position).appendTo("body");e("#jGrowl").jGrowl(t,n)};e.fn.jGrowl=function(t,n){if(e.isFunction(this.each)){var r=arguments;return this.each(function(){if(e(this).data("jGrowl.instance")===undefined){e(this).data("jGrowl.instance",e.extend(new e.fn.jGrowl,{notifications:[],element:null,interval:null}));e(this).data("jGrowl.instance").startup(this)}if(e.isFunction(e(this).data("jGrowl.instance")[t])){e(this).data("jGrowl.instance")[t].apply(e(this).data("jGrowl.instance"),e.makeArray(r).slice(1))}else{e(this).data("jGrowl.instance").create(t,n)}})}};e.extend(e.fn.jGrowl.prototype,{defaults:{pool:0,header:"",group:"",sticky:false,position:"top-right",glue:"after",theme:"default",themeState:"highlight",corners:"10px",check:250,life:3e3,closeDuration:"normal",openDuration:"normal",easing:"swing",closer:true,closeTemplate:"&times;",closerTemplate:"<div>[ close all ]</div>",log:function(){},beforeOpen:function(){},afterOpen:function(){},open:function(){},beforeClose:function(){},close:function(){},animateOpen:{opacity:"show"},animateClose:{opacity:"hide"}},notifications:[],element:null,interval:null,create:function(t,n){var r=e.extend({},this.defaults,n);if(typeof r.speed!=="undefined"){r.openDuration=r.speed;r.closeDuration=r.speed}this.notifications.push({message:t,options:r});r.log.apply(this.element,[this.element,t,r])},render:function(t){var n=this;var r=t.message;var i=t.options;i.themeState=i.themeState===""?"":"ui-state-"+i.themeState;var s=e("<div/>").addClass("jGrowl-notification "+i.themeState+" ui-corner-all"+(i.group!==undefined&&i.group!==""?" "+i.group:"")).append(e("<div/>").addClass("jGrowl-close").html(i.closeTemplate)).append(e("<div/>").addClass("jGrowl-header").html(i.header)).append(e("<div/>").addClass("jGrowl-message").html(r)).data("jGrowl",i).addClass(i.theme).children("div.jGrowl-close").bind("click.jGrowl",function(){e(this).parent().trigger("jGrowl.beforeClose")}).parent();e(s).bind("mouseover.jGrowl",function(){e("div.jGrowl-notification",n.element).data("jGrowl.pause",true)}).bind("mouseout.jGrowl",function(){e("div.jGrowl-notification",n.element).data("jGrowl.pause",false)}).bind("jGrowl.beforeOpen",function(){if(i.beforeOpen.apply(s,[s,r,i,n.element])!==false){e(this).trigger("jGrowl.open")}}).bind("jGrowl.open",function(){if(i.open.apply(s,[s,r,i,n.element])!==false){if(i.glue=="after"){e("div.jGrowl-notification:last",n.element).after(s)}else{e("div.jGrowl-notification:first",n.element).before(s)}e(this).animate(i.animateOpen,i.openDuration,i.easing,function(){if(e.support.opacity===false)this.style.removeAttribute("filter");if(e(this).data("jGrowl")!==null)e(this).data("jGrowl").created=new Date;e(this).trigger("jGrowl.afterOpen")})}}).bind("jGrowl.afterOpen",function(){i.afterOpen.apply(s,[s,r,i,n.element])}).bind("jGrowl.beforeClose",function(){if(i.beforeClose.apply(s,[s,r,i,n.element])!==false)e(this).trigger("jGrowl.close")}).bind("jGrowl.close",function(){e(this).data("jGrowl.pause",true);e(this).animate(i.animateClose,i.closeDuration,i.easing,function(){if(e.isFunction(i.close)){if(i.close.apply(s,[s,r,i,n.element])!==false)e(this).remove()}else{e(this).remove()}})}).trigger("jGrowl.beforeOpen");if(i.corners!==""&&e.fn.corner!==undefined)e(s).corner(i.corners);if(e("div.jGrowl-notification:parent",n.element).size()>1&&e("div.jGrowl-closer",n.element).size()===0&&this.defaults.closer!==false){e(this.defaults.closerTemplate).addClass("jGrowl-closer "+this.defaults.themeState+" ui-corner-all").addClass(this.defaults.theme).appendTo(n.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){e(this).siblings().trigger("jGrowl.beforeClose");if(e.isFunction(n.defaults.closer)){n.defaults.closer.apply(e(this).parent()[0],[e(this).parent()[0]])}})}},update:function(){e(this.element).find("div.jGrowl-notification:parent").each(function(){if(e(this).data("jGrowl")!==undefined&&e(this).data("jGrowl").created!==undefined&&e(this).data("jGrowl").created.getTime()+parseInt(e(this).data("jGrowl").life,10)<(new Date).getTime()&&e(this).data("jGrowl").sticky!==true&&(e(this).data("jGrowl.pause")===undefined||e(this).data("jGrowl.pause")!==true)){e(this).trigger("jGrowl.beforeClose")}});if(this.notifications.length>0&&(this.defaults.pool===0||e(this.element).find("div.jGrowl-notification:parent").size()<this.defaults.pool))this.render(this.notifications.shift());if(e(this.element).find("div.jGrowl-notification:parent").size()<2){e(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){e(this).remove()})}},startup:function(n){this.element=e(n).addClass("jGrowl").append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){e(n).data("jGrowl.instance").update()},parseInt(this.defaults.check,10));if(t){e(this.element).addClass("ie6")}},shutdown:function(){e(this.element).removeClass("jGrowl").find("div.jGrowl-notification").trigger("jGrowl.close").parent().empty();clearInterval(this.interval)},close:function(){e(this.element).find("div.jGrowl-notification").each(function(){e(this).trigger("jGrowl.beforeClose")})}});e.jGrowl.defaults=e.fn.jGrowl.prototype.defaults})(jQuery);(function(e){var t=null;e.modal=function(n,r){e.modal.close();var i,s;this.$body=e("body");this.options=e.extend({},e.modal.defaults,r);this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10));if(n.is("a")){s=n.attr("href");if(/^#/.test(s)){this.$elm=e(s);if(this.$elm.length!==1)return null;this.open()}else{this.$elm=e("<div>");this.$body.append(this.$elm);i=function(e,t){t.elm.remove()};this.showSpinner();n.trigger(e.modal.AJAX_SEND);e.get(s).done(function(r){if(!t)return;n.trigger(e.modal.AJAX_SUCCESS);t.$elm.empty().append(r).on(e.modal.CLOSE,i);t.hideSpinner();t.open();n.trigger(e.modal.AJAX_COMPLETE)}).fail(function(){n.trigger(e.modal.AJAX_FAIL);t.hideSpinner();n.trigger(e.modal.AJAX_COMPLETE)})}}else{this.$elm=n;this.open()}};e.modal.prototype={constructor:e.modal,open:function(){var t=this;if(this.options.doFade){this.block();setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay)}else{this.block();this.show()}if(this.options.escapeClose){e(document).on("keydown.modal",function(t){if(t.which==27)e.modal.close()})}if(this.options.clickClose)this.blocker.click(e.modal.close)},close:function(){this.unblock();this.hide();if(!this.options.keepelement)this.$elm.remove();e(document).off("keydown.modal")},block:function(){var t=this.options.doFade?0:this.options.opacity;this.$elm.trigger(e.modal.BEFORE_BLOCK,[this._ctx()]);this.blocker=e('<div class="jquery-modal blocker"></div>').css({top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",position:"fixed",zIndex:this.options.zIndex,background:this.options.overlay,opacity:t});this.$body.append(this.blocker);if(this.options.doFade){this.blocker.animate({opacity:this.options.opacity},this.options.fadeDuration)}this.$elm.trigger(e.modal.BLOCK,[this._ctx()])},unblock:function(){if(this.options.doFade){this.blocker.fadeOut(this.options.fadeDuration,function(){e(this).remove()})}else{this.blocker.remove()}},show:function(){this.$elm.trigger(e.modal.BEFORE_OPEN,[this._ctx()]);if(this.options.showClose){this.closeButton=e('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>");this.$elm.append(this.closeButton)}this.$elm.addClass(this.options.modalClass+" current");this.center();if(this.options.doFade){this.$elm.fadeIn(this.options.fadeDuration)}else{this.$elm.show()}this.$elm.trigger(e.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(e.modal.BEFORE_CLOSE,[this._ctx()]);if(this.closeButton)this.closeButton.remove();this.$elm.removeClass("current");if(this.options.doFade){this.$elm.fadeOut(this.options.fadeDuration)}else{this.$elm.hide()}this.$elm.trigger(e.modal.CLOSE,[this._ctx()])},showSpinner:function(){if(!this.options.showSpinner)return;this.spinner=this.spinner||e('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml);this.$body.append(this.spinner);this.spinner.show()},hideSpinner:function(){if(this.spinner)this.spinner.remove()},center:function(){this.$elm.css({position:"fixed",top:"50%",left:"50%",marginTop:-(this.$elm.outerHeight()/2),marginLeft:-(this.$elm.outerWidth()/2),zIndex:this.options.zIndex+1})},_ctx:function(){return{elm:this.$elm,blocker:this.blocker,options:this.options}}};e.modal.prototype.resize=e.modal.prototype.center;e.modal.close=function(e){if(!t)return;if(e)e.preventDefault();t.close();var n=t.$elm;t=null;return n};e.modal.resize=function(){if(!t)return;t.resize()};e.modal.isActive=function(){return t?true:false};e.modal.defaults={overlay:"#000",opacity:.75,zIndex:1,escapeClose:true,clickClose:true,closeText:"Close",closeClass:"",modalClass:"modal",spinnerHtml:null,showSpinner:true,showClose:true,fadeDuration:null,fadeDelay:1,keepelement:false};e.modal.BEFORE_BLOCK="modal:before-block";e.modal.BLOCK="modal:block";e.modal.BEFORE_OPEN="modal:before-open";e.modal.OPEN="modal:open";e.modal.BEFORE_CLOSE="modal:before-close";e.modal.CLOSE="modal:close";e.modal.AJAX_SEND="modal:ajax:send";e.modal.AJAX_SUCCESS="modal:ajax:success";e.modal.AJAX_FAIL="modal:ajax:fail";e.modal.AJAX_COMPLETE="modal:ajax:complete";e.fn.modal=function(n){if(this.length===1){t=new e.modal(this,n)}return this};e(document).on("click.modal",'a[rel="modal:close"]',e.modal.close);e(document).on("click.modal",'a[rel="modal:open"]',function(t){t.preventDefault();e(this).modal()})})(jQuery);(function(e){var t="";var n=function(t,n){var t=e(t);var r=this;var i=e("#"+t.attr("id")+"_popup");if(typeof n=="undefined"){var n=true}this.open=function(s){s.preventDefault();if(i.is(":visible")){r.close();return}var o=t.offset();o.top+=t.outerHeight();if(t.offset().left+i.outerWidth()>e(window).width())var u=i.outerWidth()-t.outerWidth();else var u=0;i.css({position:"absolute",top:o.top,left:o.left-u});i.show();e("body, .popup_item").bind("click.close_popup",function(i){if(n){if(e(i.target).closest("#"+t.attr("id")).length==0){r.close()}}else{if(e(i.target).closest("#"+t.attr("id")).length==0&&e(i.target).closest("#"+t.attr("id")+"_popup").length==0){r.close()}}})};this.close=function(e){i.hide()}};e.fn.popupMenu=function(t){return this.each(function(){var r=new n(this,t);e(this).click(r.open)})}})(jQuery);(function(e){"use strict";e.prompt=function(t,n){if(n!==undefined&&n.classes!==undefined&&typeof n.classes==="string"){n={box:n.classes}}e.prompt.options=e.extend({},e.prompt.defaults,n);e.prompt.currentPrefix=e.prompt.options.prefix;if(e.prompt.timeout){clearTimeout(e.prompt.timeout)}e.prompt.timeout=false;var r=e.prompt.options,i=e(document.body),s=e(window);var o='<div class="'+e.prompt.options.prefix+"box "+r.classes.box+'">';if(r.useiframe&&e("object, applet").length>0){o+='<iframe src="javascript:false;" style="display:block;position:absolute;z-index:-1;" class="'+r.prefix+"fade "+r.classes.fade+'"></iframe>'}else{o+='<div class="'+r.prefix+"fade "+r.classes.fade+'"></div>'}o+='<div class="'+r.prefix+" "+r.classes.prompt+'">'+'<form action="javascript:false;" onsubmit="return false;" class="'+r.prefix+"form "+r.classes.form+'">'+'<div class="'+r.prefix+"close "+r.classes.close+'">'+r.closeText+"</div>"+'<div class="'+r.prefix+'states"></div>'+"</form>"+"</div>"+"</div>";e.prompt.jqib=e(o).appendTo(i);e.prompt.jqi=e.prompt.jqib.children("."+r.prefix);e.prompt.jqif=e.prompt.jqib.children("."+r.prefix+"fade");if(t.constructor===String){t={state0:{title:r.title,html:t,buttons:r.buttons,position:r.position,focus:r.focus,defaultButton:r.defaultButton,submit:r.submit}}}e.prompt.options.states={};var u,a;for(u in t){a=e.extend({},e.prompt.defaults.state,{name:u},t[u]);e.prompt.addState(a.name,a);if(e.prompt.currentStateName===""){e.prompt.currentStateName=a.name}}e.prompt.jqi.on("click","."+r.prefix+"buttons button",function(t){var n=e(this),i=n.parents("."+r.prefix+"state"),s=e.prompt.options.states[i.data("jqi-name")],o=i.children("."+r.prefix+"message"),u=s.buttons[n.text()]||s.buttons[n.html()],a={};if(u===undefined){for(var f in s.buttons){if(s.buttons[f].title===n.text()||s.buttons[f].title===n.html()){u=s.buttons[f].value}}}e.each(e.prompt.jqi.children("form").serializeArray(),function(e,t){if(a[t.name]===undefined){a[t.name]=t.value}else if(typeof a[t.name]===Array||typeof a[t.name]==="object"){a[t.name].push(t.value)}else{a[t.name]=[a[t.name],t.value]}});var l=new e.Event("impromptu:submit");l.stateName=s.name;l.state=i;i.trigger(l,[u,o,a]);if(!l.isDefaultPrevented()){e.prompt.close(true,u,o,a)}});var f=function(){if(r.persistent){var t=r.top.toString().indexOf("%")>=0?s.height()*(parseInt(r.top,10)/100):parseInt(r.top,10),n=parseInt(e.prompt.jqi.css("top").replace("px",""),10)-t;e("html,body").animate({scrollTop:n},"fast",function(){var t=0;e.prompt.jqib.addClass(r.prefix+"warning");var n=setInterval(function(){e.prompt.jqib.toggleClass(r.prefix+"warning");if(t++>1){clearInterval(n);e.prompt.jqib.removeClass(r.prefix+"warning")}},100)})}else{e.prompt.close(true)}};var l=function(t){var n=window.event?event.keyCode:t.keyCode;if(n===27){f()}if(n===13){var i=e.prompt.getCurrentState().find("."+r.prefix+"defaultbutton");var s=e(t.target);if(s.is("textarea,."+r.prefix+"button")===false&&i.length>0){t.preventDefault();i.click()}}if(n===9){var o=e("input,select,textarea,button",e.prompt.getCurrentState());var u=!t.shiftKey&&t.target===o[o.length-1];var a=t.shiftKey&&t.target===o[0];if(u||a){setTimeout(function(){if(!o){return}var e=o[a===true?o.length-1:0];if(e){e.focus()}},10);return false}}};e.prompt.position();e.prompt.style();e.prompt.jqif.click(f);s.resize({animate:false},e.prompt.position);e.prompt.jqi.find("."+r.prefix+"close").click(e.prompt.close);e.prompt.jqib.on("keydown",l).on("impromptu:loaded",r.loaded).on("impromptu:close",r.close).on("impromptu:statechanging",r.statechanging).on("impromptu:statechanged",r.statechanged);e.prompt.jqif[r.show](r.overlayspeed);e.prompt.jqi[r.show](r.promptspeed,function(){var t=e.prompt.jqi.find("."+r.prefix+"states ."+r.prefix+"state").eq(0);e.prompt.goToState(t.data("jqi-name"));e.prompt.jqib.trigger("impromptu:loaded")});if(r.timeout>0){e.prompt.timeout=setTimeout(function(){e.prompt.close(true)},r.timeout)}return e.prompt.jqib};e.prompt.defaults={prefix:"jqi",classes:{box:"",fade:"",prompt:"",form:"",close:"",title:"",message:"",buttons:"",button:"",defaultButton:""},title:"",closeText:"&times;",buttons:{Ok:true},loaded:function(e){},submit:function(e,t,n,r){},close:function(e,t,n,r){},statechanging:function(e,t,n){},statechanged:function(e,t){},opacity:.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"fadeIn",focus:0,defaultButton:0,useiframe:false,top:"15%",position:{container:null,x:null,y:null,arrow:null,width:null},persistent:true,timeout:0,states:{},state:{name:null,title:"",html:"",buttons:{Ok:true},focus:0,defaultButton:0,position:{container:null,x:null,y:null,arrow:null,width:null},submit:function(e,t,n,r){return true}}};e.prompt.currentPrefix=e.prompt.defaults.prefix;e.prompt.currentStateName="";e.prompt.setDefaults=function(t){e.prompt.defaults=e.extend({},e.prompt.defaults,t)};e.prompt.setStateDefaults=function(t){e.prompt.defaults.state=e.extend({},e.prompt.defaults.state,t)};e.prompt.position=function(t){var n=e.fx.off,r=e.prompt.getCurrentState(),i=e.prompt.options.states[r.data("jqi-name")],s=i?i.position:undefined,o=e(window),u=document.body.scrollHeight,a=e(window).height(),f=e(document).height(),l=u>a?u:a,c=parseInt(o.scrollTop(),10)+(e.prompt.options.top.toString().indexOf("%")>=0?a*(parseInt(e.prompt.options.top,10)/100):parseInt(e.prompt.options.top,10));if(t!==undefined&&t.data.animate===false){e.fx.off=true}e.prompt.jqib.css({position:"absolute",height:l,width:"100%",top:0,left:0,right:0,bottom:0});e.prompt.jqif.css({position:"fixed",height:l,width:"100%",top:0,left:0,right:0,bottom:0});if(s&&s.container){var h=e(s.container).offset();if(e.isPlainObject(h)&&h.top!==undefined){e.prompt.jqi.css({position:"absolute"});e.prompt.jqi.animate({top:h.top+s.y,left:h.left+s.x,marginLeft:0,width:s.width!==undefined?s.width:null});c=h.top+s.y-(e.prompt.options.top.toString().indexOf("%")>=0?a*(parseInt(e.prompt.options.top,10)/100):parseInt(e.prompt.options.top,10));e("html,body").animate({scrollTop:c},"slow","swing",function(){})}}else if(s&&s.width){e.prompt.jqi.css({position:"absolute",left:"50%"});e.prompt.jqi.animate({top:s.y||c,left:s.x||"50%",marginLeft:s.width/2*-1,width:s.width})}else{e.prompt.jqi.css({position:"absolute",top:c,left:"50%",marginLeft:e.prompt.jqi.outerWidth(false)/2*-1})}if(t!==undefined&&t.data.animate===false){e.fx.off=n}};e.prompt.style=function(){e.prompt.jqif.css({zIndex:e.prompt.options.zIndex,display:"none",opacity:e.prompt.options.opacity});e.prompt.jqi.css({zIndex:e.prompt.options.zIndex+1,display:"none"});e.prompt.jqib.css({zIndex:e.prompt.options.zIndex})};e.prompt.get=function(t){return e("."+e.prompt.currentPrefix)};e.prompt.addState=function(t,n,r){var i="",s=null,o="",u="",a=e.prompt.options,f=e("."+e.prompt.currentPrefix+"states"),l,c,h,p=0;n=e.extend({},e.prompt.defaults.state,{name:t},n);if(n.position.arrow!==null){o='<div class="'+a.prefix+"arrow "+a.prefix+"arrow"+n.position.arrow+'"></div>'}if(n.title&&n.title!==""){u='<div class="lead '+a.prefix+"title "+a.classes.title+'">'+n.title+"</div>"}i+='<div id="'+a.prefix+"state_"+t+'" class="'+a.prefix+'state" data-jqi-name="'+t+'" style="display:none;">'+o+u+'<div class="'+a.prefix+"message "+a.classes.message+'">'+n.html+"</div>"+'<div class="'+a.prefix+"buttons "+a.classes.buttons+'"'+(e.isEmptyObject(n.buttons)?'style="display:none;"':"")+">";for(c in n.buttons){h=n.buttons[c],l=n.focus===p||isNaN(n.focus)&&n.defaultButton===p?e.prompt.currentPrefix+"defaultbutton "+a.classes.defaultButton:"";if(typeof h==="object"){i+='<button class="'+a.classes.button+" "+e.prompt.currentPrefix+"button "+l;if(typeof h.classes!=="undefined"){i+=" "+(e.isArray(h.classes)?h.classes.join(" "):h.classes)+" "}i+='" name="'+a.prefix+"_"+t+"_button"+h.title.replace(/[^a-z0-9]+/gi,"")+'" id="'+a.prefix+"_"+t+"_button"+h.title.replace(/[^a-z0-9]+/gi,"")+'" value="'+h.value+'">'+h.title+"</button>"}else{i+='<button class="'+e.prompt.currentPrefix+"button "+a.classes.button+" "+l+'" name="'+a.prefix+"_"+t+"_button"+c.replace(/[^a-z0-9]+/gi,"")+'" id="'+a.prefix+"_"+t+"_button"+c.replace(/[^a-z0-9]+/gi,"")+'" value="'+h+'">'+c+"</button>"}p++}i+="</div></div>";s=e(i);s.on("impromptu:submit",n.submit);if(r!==undefined){f.find("#"+e.prompt.currentPrefix+"state_"+r).after(s)}else{f.append(s)}e.prompt.options.states[t]=n;return s};e.prompt.removeState=function(t,n){var r=e.prompt.getState(t),i=function(){r.remove()};if(r.length===0){return false}if(r.css("display")!=="none"){if(n!==undefined&&e.prompt.getState(n).length>0){e.prompt.goToState(n,false,i)}else if(r.next().length>0){e.prompt.nextState(i)}else if(r.prev().length>0){e.prompt.prevState(i)}else{e.prompt.close()}}else{r.slideUp("slow",i)}return true};e.prompt.getState=function(t){return e("#"+e.prompt.currentPrefix+"state_"+t)};e.prompt.getStateContent=function(t){return e.prompt.getState(t)};e.prompt.getCurrentState=function(){return e.prompt.getState(e.prompt.getCurrentStateName())};e.prompt.getCurrentStateName=function(){return e.prompt.currentStateName};e.prompt.goToState=function(t,n,r){var i=e.prompt.get(),s=e.prompt.options,o=e.prompt.getState(t),u=s.states[o.data("jqi-name")],a=new e.Event("impromptu:statechanging");if(typeof n==="function"){r=n;n=false}e.prompt.jqib.trigger(a,[e.prompt.getCurrentStateName(),t]);if(!a.isDefaultPrevented()&&o.length>0){e.prompt.jqi.find("."+e.prompt.currentPrefix+"parentstate").removeClass(e.prompt.currentPrefix+"parentstate");if(n){e.prompt.jqi.find("."+e.prompt.currentPrefix+"substate").not(o).slideUp(s.promptspeed).removeClass("."+e.prompt.currentPrefix+"substate").find("."+e.prompt.currentPrefix+"arrow").hide();e.prompt.jqi.find("."+e.prompt.currentPrefix+"state:visible").addClass(e.prompt.currentPrefix+"parentstate");o.addClass(e.prompt.currentPrefix+"substate")}else{e.prompt.jqi.find("."+e.prompt.currentPrefix+"state").not(o).slideUp(s.promptspeed).find("."+e.prompt.currentPrefix+"arrow").hide()}e.prompt.currentStateName=u.name;o.slideDown(s.promptspeed,function(){var n=e(this);if(typeof u.focus==="string"){n.find(u.focus).eq(0).focus()}else{n.find("."+e.prompt.currentPrefix+"defaultbutton").focus()}n.find("."+e.prompt.currentPrefix+"arrow").show(s.promptspeed);if(typeof r==="function"){e.prompt.jqib.on("impromptu:statechanged",r)}e.prompt.jqib.trigger("impromptu:statechanged",[t]);if(typeof r==="function"){e.prompt.jqib.off("impromptu:statechanged",r)}});if(!n){e.prompt.position()}}return o};e.prompt.nextState=function(t){var n=e("#"+e.prompt.currentPrefix+"state_"+e.prompt.getCurrentStateName()).next();if(n.length>0){e.prompt.goToState(n.attr("id").replace(e.prompt.currentPrefix+"state_",""),t)}return n};e.prompt.prevState=function(t){var n=e("#"+e.prompt.currentPrefix+"state_"+e.prompt.getCurrentStateName()).prev();if(n.length>0){e.prompt.goToState(n.attr("id").replace(e.prompt.currentPrefix+"state_",""),t)}return n};e.prompt.close=function(t,n,r,i){if(e.prompt.timeout){clearTimeout(e.prompt.timeout);e.prompt.timeout=false}if(e.prompt.jqib){e.prompt.jqib.fadeOut("fast",function(){e.prompt.jqib.trigger("impromptu:close",[n,r,i]);e.prompt.jqib.remove();e(window).off("resize",e.prompt.position)})}e.prompt.currentStateName=""};e.fn.prompt=function(t){if(t===undefined){t={}}if(t.withDataAndEvents===undefined){t.withDataAndEvents=false}e.prompt(e(this).clone(t.withDataAndEvents).html(),t)}})(jQuery);(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){function n(e){return e}function r(e){return decodeURIComponent(e.replace(t," "))}function i(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{return s.json?JSON.parse(e):e}catch(t){}}var t=/\+/g;var s=e.cookie=function(t,o,u){if(o!==undefined){u=e.extend({},s.defaults,u);if(typeof u.expires==="number"){var a=u.expires,f=u.expires=new Date;f.setDate(f.getDate()+a)}o=s.json?JSON.stringify(o):String(o);return document.cookie=[s.raw?t:encodeURIComponent(t),"=",s.raw?o:encodeURIComponent(o),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}var l=s.raw?n:r;var c=document.cookie.split("; ");var h=t?undefined:{};for(var p=0,d=c.length;p<d;p++){var v=c[p].split("=");var m=l(v.shift());var g=l(v.join("="));if(t&&t===m){h=i(g);break}if(!t){h[m]=i(g)}}return h};s.defaults={};e.removeCookie=function(t,n){if(e.cookie(t)!==undefined){e.cookie(t,"",e.extend({},n,{expires:-1}));return true}return false}})

(function(e){e.jGrowl=function(t,n){if(e("#jGrowl").size()===0)e('<div id="jGrowl"></div>').addClass(n&&n.position?n.position:e.jGrowl.defaults.position).appendTo("body");e("#jGrowl").jGrowl(t,n)};e.fn.jGrowl=function(t,n){if(n===undefined&&e.isPlainObject(t)){n=t;t=n.message}if(e.isFunction(this.each)){var r=arguments;return this.each(function(){if(e(this).data("jGrowl.instance")===undefined){e(this).data("jGrowl.instance",e.extend(new e.fn.jGrowl,{notifications:[],element:null,interval:null}));e(this).data("jGrowl.instance").startup(this)}if(e.isFunction(e(this).data("jGrowl.instance")[t])){e(this).data("jGrowl.instance")[t].apply(e(this).data("jGrowl.instance"),e.makeArray(r).slice(1))}else{e(this).data("jGrowl.instance").create(t,n)}})}};e.extend(e.fn.jGrowl.prototype,{defaults:{pool:0,header:"",group:"",sticky:false,position:"top-right",glue:"after",theme:"default",themeState:"highlight",corners:"10px",check:250,life:3e3,closeDuration:"normal",openDuration:"normal",easing:"swing",closer:true,closeTemplate:"&times;",closerTemplate:"<div>[ close all ]</div>",log:function(){},beforeOpen:function(){},afterOpen:function(){},open:function(){},beforeClose:function(){},close:function(){},click:function(){},animateOpen:{opacity:"show"},animateClose:{opacity:"hide"}},notifications:[],element:null,interval:null,create:function(t,n){var r=e.extend({},this.defaults,n);if(typeof r.speed!=="undefined"){r.openDuration=r.speed;r.closeDuration=r.speed}this.notifications.push({message:t,options:r});r.log.apply(this.element,[this.element,t,r])},render:function(t){var n=this;var r=t.message;var i=t.options;i.themeState=i.themeState===""?"":"ui-state-"+i.themeState;var s=e("<div/>").addClass("jGrowl-notification alert "+i.themeState+" ui-corner-all"+(i.group!==undefined&&i.group!==""?" "+i.group:"")).append(e("<button/>").addClass("jGrowl-close").html(i.closeTemplate)).append(e("<div/>").addClass("jGrowl-header").html(i.header)).append(e("<div/>").addClass("jGrowl-message").html(r)).data("jGrowl",i).addClass(i.theme).children(".jGrowl-close").bind("click.jGrowl",function(){e(this).parent().trigger("jGrowl.beforeClose");return false}).parent();e(s).bind("mouseover.jGrowl",function(){e(".jGrowl-notification",n.element).data("jGrowl.pause",true)}).bind("mouseout.jGrowl",function(){e(".jGrowl-notification",n.element).data("jGrowl.pause",false)}).bind("jGrowl.beforeOpen",function(){if(i.beforeOpen.apply(s,[s,r,i,n.element])!==false){e(this).trigger("jGrowl.open")}}).bind("jGrowl.open",function(){if(i.open.apply(s,[s,r,i,n.element])!==false){if(i.glue=="after"){e(".jGrowl-notification:last",n.element).after(s)}else{e(".jGrowl-notification:first",n.element).before(s)}e(this).animate(i.animateOpen,i.openDuration,i.easing,function(){if(e.support.opacity===false)this.style.removeAttribute("filter");if(e(this).data("jGrowl")!==null)e(this).data("jGrowl").created=new Date;e(this).trigger("jGrowl.afterOpen")})}}).bind("jGrowl.afterOpen",function(){i.afterOpen.apply(s,[s,r,i,n.element])}).bind("click",function(){i.click.apply(s,[s.message,i,n.element])}).bind("jGrowl.beforeClose",function(){if(i.beforeClose.apply(s,[s,r,i,n.element])!==false)e(this).trigger("jGrowl.close")}).bind("jGrowl.close",function(){e(this).data("jGrowl.pause",true);e(this).animate(i.animateClose,i.closeDuration,i.easing,function(){if(e.isFunction(i.close)){if(i.close.apply(s,[s,r,i,n.element])!==false)e(this).remove()}else{e(this).remove()}})}).trigger("jGrowl.beforeOpen");if(i.corners!==""&&e.fn.corner!==undefined)e(s).corner(i.corners);if(e(".jGrowl-notification:parent",n.element).size()>1&&e(".jGrowl-closer",n.element).size()===0&&this.defaults.closer!==false){e(this.defaults.closerTemplate).addClass("jGrowl-closer "+this.defaults.themeState+" ui-corner-all").addClass(this.defaults.theme).appendTo(n.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){e(this).siblings().trigger("jGrowl.beforeClose");if(e.isFunction(n.defaults.closer)){n.defaults.closer.apply(e(this).parent()[0],[e(this).parent()[0]])}})}},update:function(){e(this.element).find(".jGrowl-notification:parent").each(function(){if(e(this).data("jGrowl")!==undefined&&e(this).data("jGrowl").created!==undefined&&e(this).data("jGrowl").created.getTime()+parseInt(e(this).data("jGrowl").life,10)<(new Date).getTime()&&e(this).data("jGrowl").sticky!==true&&(e(this).data("jGrowl.pause")===undefined||e(this).data("jGrowl.pause")!==true)){e(this).trigger("jGrowl.beforeClose")}});if(this.notifications.length>0&&(this.defaults.pool===0||e(this.element).find(".jGrowl-notification:parent").size()<this.defaults.pool))this.render(this.notifications.shift());if(e(this.element).find(".jGrowl-notification:parent").size()<2){e(this.element).find(".jGrowl-closer").animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){e(this).remove()})}},startup:function(t){this.element=e(t).addClass("jGrowl").append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){e(t).data("jGrowl.instance").update()},parseInt(this.defaults.check,10))},shutdown:function(){e(this.element).removeClass("jGrowl").find(".jGrowl-notification").trigger("jGrowl.close").parent().empty();clearInterval(this.interval)},close:function(){e(this.element).find(".jGrowl-notification").each(function(){e(this).trigger("jGrowl.beforeClose")})}});e.jGrowl.defaults=e.fn.jGrowl.prototype.defaults})(jQuery);(function(e){var t=null;e.modal=function(n,r){e.modal.close();var i,s;this.$body=e("body");this.options=e.extend({},e.modal.defaults,r);this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10));if(n.is("a")){s=n.attr("href");if(/^#/.test(s)){this.$elm=e(s);if(this.$elm.length!==1)return null;this.open()}else{this.$elm=e("<div>");this.$body.append(this.$elm);i=function(e,t){t.elm.remove()};this.showSpinner();n.trigger(e.modal.AJAX_SEND);e.get(s).done(function(r){if(!t)return;n.trigger(e.modal.AJAX_SUCCESS);t.$elm.empty().append(r).on(e.modal.CLOSE,i);t.hideSpinner();t.open();n.trigger(e.modal.AJAX_COMPLETE)}).fail(function(){n.trigger(e.modal.AJAX_FAIL);t.hideSpinner();n.trigger(e.modal.AJAX_COMPLETE)})}}else{this.$elm=n;this.open()}};e.modal.prototype={constructor:e.modal,open:function(){var t=this;if(this.options.doFade){this.block();setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay)}else{this.block();this.show()}if(this.options.escapeClose){e(document).on("keydown.modal",function(t){if(t.which==27)e.modal.close()})}if(this.options.clickClose)this.blocker.click(e.modal.close)},close:function(){this.unblock();this.hide();if(!this.options.keepelement)this.$elm.remove();e(document).off("keydown.modal")},block:function(){var t=this.options.doFade?0:this.options.opacity;this.$elm.trigger(e.modal.BEFORE_BLOCK,[this._ctx()]);this.blocker=e('<div class="jquery-modal blocker"></div>').css({top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",position:"fixed",zIndex:this.options.zIndex,background:this.options.overlay,opacity:t});this.$body.append(this.blocker);if(this.options.doFade){this.blocker.animate({opacity:this.options.opacity},this.options.fadeDuration)}this.$elm.trigger(e.modal.BLOCK,[this._ctx()])},unblock:function(){if(this.options.doFade){this.blocker.fadeOut(this.options.fadeDuration,function(){e(this).remove()})}else{this.blocker.remove()}},show:function(){this.$elm.trigger(e.modal.BEFORE_OPEN,[this._ctx()]);if(this.options.showClose){this.closeButton=e('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>");this.$elm.append(this.closeButton)}this.$elm.addClass(this.options.modalClass+" current");this.center();if(this.options.doFade){this.$elm.fadeIn(this.options.fadeDuration)}else{this.$elm.show()}this.$elm.trigger(e.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(e.modal.BEFORE_CLOSE,[this._ctx()]);if(this.closeButton)this.closeButton.remove();this.$elm.removeClass("current");if(this.options.doFade){this.$elm.fadeOut(this.options.fadeDuration)}else{this.$elm.hide()}this.$elm.trigger(e.modal.CLOSE,[this._ctx()])},showSpinner:function(){if(!this.options.showSpinner)return;this.spinner=this.spinner||e('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml);this.$body.append(this.spinner);this.spinner.show()},hideSpinner:function(){if(this.spinner)this.spinner.remove()},center:function(){this.$elm.css({position:"fixed",top:"50%",left:"50%",marginTop:-(this.$elm.outerHeight()/2),marginLeft:-(this.$elm.outerWidth()/2),zIndex:this.options.zIndex+1})},_ctx:function(){return{elm:this.$elm,blocker:this.blocker,options:this.options}}};e.modal.prototype.resize=e.modal.prototype.center;e.modal.close=function(e){if(!t)return;if(e)e.preventDefault();t.close();var n=t.$elm;t=null;return n};e.modal.resize=function(){if(!t)return;t.resize()};e.modal.isActive=function(){return t?true:false};e.modal.defaults={overlay:"#000",opacity:.75,zIndex:1,escapeClose:true,clickClose:true,closeText:"Close",closeClass:"",modalClass:"modal",spinnerHtml:null,showSpinner:true,showClose:true,fadeDuration:null,fadeDelay:1,keepelement:false};e.modal.BEFORE_BLOCK="modal:before-block";e.modal.BLOCK="modal:block";e.modal.BEFORE_OPEN="modal:before-open";e.modal.OPEN="modal:open";e.modal.BEFORE_CLOSE="modal:before-close";e.modal.CLOSE="modal:close";e.modal.AJAX_SEND="modal:ajax:send";e.modal.AJAX_SUCCESS="modal:ajax:success";e.modal.AJAX_FAIL="modal:ajax:fail";e.modal.AJAX_COMPLETE="modal:ajax:complete";e.fn.modal=function(n){if(this.length===1){t=new e.modal(this,n)}return this};e(document).on("click.modal",'a[rel="modal:close"]',e.modal.close);e(document).on("click.modal",'a[rel="modal:open"]',function(t){t.preventDefault();e(this).modal()})})(jQuery);(function(e){var t="";var n=function(t,n){var t=e(t);var r=this;var i=e("#"+t.attr("id")+"_popup");if(typeof n=="undefined"){var n=true}this.open=function(s){s.preventDefault();if(i.is(":visible")){r.close();return}var o=t.offset();o.top+=t.outerHeight();if(t.offset().left+i.outerWidth()>e(window).width())var u=i.outerWidth()-t.outerWidth();else var u=0;i.css({position:"absolute",top:o.top,left:o.left-u});i.show();e("body, .popup_item").bind("click.close_popup",function(i){if(n){if(e(i.target).closest("#"+t.attr("id")).length==0){r.close()}}else{if(e(i.target).closest("#"+t.attr("id")).length==0&&e(i.target).closest("#"+t.attr("id")+"_popup").length==0){r.close()}}})};this.close=function(e){i.hide()}};e.fn.popupMenu=function(t){return this.each(function(){var r=new n(this,t);e(this).click(r.open)})}})(jQuery);(function(e,t){if(typeof define==="function"&&define.amd){define(["jquery"],t)}else{t(e.jQuery)}})(this,function(e){"use strict";var t=function(e,n){var r=this;r.id=t.count++;t.lifo.push(r);if(e){r.open(e,n)}return r};t.defaults={prefix:"jqi",classes:{box:"",fade:"",prompt:"",form:"",close:"",title:"",message:"",buttons:"",button:"",defaultButton:""},title:"",closeText:"&times;",buttons:{Ok:true},loaded:function(e){},submit:function(e,t,n,r){},close:function(e,t,n,r){},statechanging:function(e,t,n){},statechanged:function(e,t){},opacity:.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"fadeIn",hide:"fadeOut",focus:0,defaultButton:0,useiframe:false,top:"15%",position:{container:null,x:null,y:null,arrow:null,width:null},persistent:true,timeout:0,states:{},state:{name:null,title:"",html:"",buttons:{Ok:true},focus:0,defaultButton:0,position:{container:null,x:null,y:null,arrow:null,width:null},submit:function(e,t,n,r){return true}}};t.setDefaults=function(n){t.defaults=e.extend({},t.defaults,n)};t.setStateDefaults=function(n){t.defaults.state=e.extend({},t.defaults.state,n)};t.count=0;t.lifo=[];t.getLast=function(){var e=t.lifo.length;return e>0?t.lifo[e-1]:false};t.removeFromStack=function(e){for(var n=t.lifo.length-1;n>=0;n--){if(t.lifo[n].id===e){return t.lifo.splice(n,1)[0]}}};t.prototype={id:null,open:function(n,r){var i=this;i.options=e.extend({},t.defaults,r);if(i.timeout){clearTimeout(i.timeout)}i.timeout=false;var s=i.options,o=e(document.body),u=e(window);var a='<div class="'+s.prefix+"box "+s.classes.box+'">';if(s.useiframe&&e("object, applet").length>0){a+='<iframe src="javascript:false;" style="display:block;position:absolute;z-index:-1;" class="'+s.prefix+"fade "+s.classes.fade+'"></iframe>'}else{a+='<div class="'+s.prefix+"fade "+s.classes.fade+'"></div>'}a+='<div class="'+s.prefix+" "+s.classes.prompt+'">'+'<form action="javascript:false;" onsubmit="return false;" class="'+s.prefix+"form "+s.classes.form+'">'+'<div class="'+s.prefix+"close "+s.classes.close+'">'+s.closeText+"</div>"+'<div class="'+s.prefix+'states"></div>'+"</form>"+"</div>"+"</div>";i.jqib=e(a).appendTo(o);i.jqi=i.jqib.children("."+s.prefix);i.jqif=i.jqib.children("."+s.prefix+"fade");if(n.constructor===String){n={state0:{title:s.title,html:n,buttons:s.buttons,position:s.position,focus:s.focus,defaultButton:s.defaultButton,submit:s.submit}}}i.options.states={};var f,l;for(f in n){l=e.extend({},t.defaults.state,{name:f},n[f]);i.addState(l.name,l);if(i.currentStateName===""){i.currentStateName=l.name}}i.jqi.on("click","."+s.prefix+"buttons button",function(t){var n=e(this),r=n.parents("."+s.prefix+"state"),o=i.options.states[r.data("jqi-name")],u=r.children("."+s.prefix+"message"),a=o.buttons[n.text()]||o.buttons[n.html()],f={};if(a===undefined){for(var l in o.buttons){if(o.buttons[l].title===n.text()||o.buttons[l].title===n.html()){a=o.buttons[l].value}}}e.each(i.jqi.children("form").serializeArray(),function(e,t){if(f[t.name]===undefined){f[t.name]=t.value}else if(typeof f[t.name]===Array||typeof f[t.name]==="object"){f[t.name].push(t.value)}else{f[t.name]=[f[t.name],t.value]}});var c=new e.Event("impromptu:submit");c.stateName=o.name;c.state=r;r.trigger(c,[a,u,f]);if(!c.isDefaultPrevented()){i.close(true,a,u,f)}});var c=function(){if(s.persistent){var t=s.top.toString().indexOf("%")>=0?u.height()*(parseInt(s.top,10)/100):parseInt(s.top,10),n=parseInt(i.jqi.css("top").replace("px",""),10)-t;e("html,body").animate({scrollTop:n},"fast",function(){var e=0;i.jqib.addClass(s.prefix+"warning");var t=setInterval(function(){i.jqib.toggleClass(s.prefix+"warning");if(e++>1){clearInterval(t);i.jqib.removeClass(s.prefix+"warning")}},100)})}else{i.close(true)}};var h=function(t){var n=window.event?event.keyCode:t.keyCode;if(n===27){c()}if(n===13){var r=i.getCurrentState().find("."+s.prefix+"defaultbutton");var o=e(t.target);if(o.is("textarea,."+s.prefix+"button")===false&&r.length>0){t.preventDefault();r.click()}}if(n===9){var u=e("input,select,textarea,button",i.getCurrentState());var a=!t.shiftKey&&t.target===u[u.length-1];var f=t.shiftKey&&t.target===u[0];if(a||f){setTimeout(function(){if(!u){return}var e=u[f===true?u.length-1:0];if(e){e.focus()}},10);return false}}};i.position();i.style();i._windowResize=function(e){i.position(e)};u.resize({animate:false},i._windowResize);i.jqif.click(c);i.jqi.find("."+s.prefix+"close").click(function(){i.close()});i.jqib.on("keydown",h).on("impromptu:loaded",s.loaded).on("impromptu:close",s.close).on("impromptu:statechanging",s.statechanging).on("impromptu:statechanged",s.statechanged);i.jqif[s.show](s.overlayspeed);i.jqi[s.show](s.promptspeed,function(){var e=i.jqi.find("."+s.prefix+"states ."+s.prefix+"state").eq(0);i.goToState(e.data("jqi-name"));i.jqib.trigger("impromptu:loaded")});if(s.timeout>0){i.timeout=setTimeout(function(){i.close(true)},s.timeout)}return i},close:function(n,r,i,s){var o=this;t.removeFromStack(o.id);if(o.timeout){clearTimeout(o.timeout);o.timeout=false}if(o.jqib){o.jqib[o.options.hide]("fast",function(){o.jqib.trigger("impromptu:close",[r,i,s]);o.jqib.remove();e(window).off("resize",o._windowResize);if(typeof n==="function"){n()}})}o.currentStateName="";return o},addState:function(n,r,i){var s=this,o="",u=null,a="",f="",l=s.options,c=e("."+l.prefix+"states"),h=[],p,d,v,m,g,y=0;r=e.extend({},t.defaults.state,{name:n},r);if(r.position.arrow!==null){a='<div class="'+l.prefix+"arrow "+l.prefix+"arrow"+r.position.arrow+'"></div>'}if(r.title&&r.title!==""){f='<div class="lead '+l.prefix+"title "+l.classes.title+'">'+r.title+"</div>"}p=r.html;if(typeof r.html==="function"){p="Error: html function must return text"}o+='<div class="'+l.prefix+'state" data-jqi-name="'+n+'" style="display:none;">'+a+f+'<div class="'+l.prefix+"message "+l.classes.message+'">'+p+"</div>"+'<div class="'+l.prefix+"buttons "+l.classes.buttons+'"'+(e.isEmptyObject(r.buttons)?'style="display:none;"':"")+">";if(e.isArray(r.buttons)){h=r.buttons}else if(e.isPlainObject(r.buttons)){for(v in r.buttons){if(r.buttons.hasOwnProperty(v)){h.push({title:v,value:r.buttons[v]})}}}for(y=0,g=h.length;y<g;y++){m=h[y],d=r.focus===y||isNaN(r.focus)&&r.defaultButton===y?l.prefix+"defaultbutton "+l.classes.defaultButton:"";o+='<button class="'+l.classes.button+" "+l.prefix+"button "+d;if(typeof m.classes!=="undefined"){o+=" "+(e.isArray(m.classes)?m.classes.join(" "):m.classes)+" "}o+='" name="'+l.prefix+"_"+n+"_button"+m.title.replace(/[^a-z0-9]+/gi,"")+'" value="'+m.value+'">'+m.title+"</button>"}o+="</div></div>";u=e(o);u.on("impromptu:submit",r.submit);if(i!==undefined){c.find('[data-jqi-name="'+i+'"]').after(u)}else{c.append(u)}s.options.states[n]=r;return u},removeState:function(e,t){var n=this,r=n.getState(e),i=function(){r.remove()};if(r.length===0){return false}if(r.css("display")!=="none"){if(t!==undefined&&n.getState(t).length>0){n.goToState(t,false,i)}else if(r.next().length>0){n.nextState(i)}else if(r.prev().length>0){n.prevState(i)}else{n.close()}}else{r.slideUp("slow",i)}return true},getApi:function(){return this},getBox:function(){return this.jqib},getPrompt:function(){return this.jqi},getState:function(e){return this.jqi.find('[data-jqi-name="'+e+'"]')},getCurrentState:function(){return this.getState(this.getCurrentStateName())},getCurrentStateName:function(){return this.currentStateName},position:function(t){var n=this,r=e.fx.off,i=n.getCurrentState(),s=n.options.states[i.data("jqi-name")],o=s?s.position:undefined,u=e(window),a=document.body.scrollHeight,f=e(window).height(),l=e(document).height(),c=a>f?a:f,h=parseInt(u.scrollTop(),10)+(n.options.top.toString().indexOf("%")>=0?f*(parseInt(n.options.top,10)/100):parseInt(n.options.top,10));if(t!==undefined&&t.data.animate===false){e.fx.off=true}n.jqib.css({position:"absolute",height:c,width:"100%",top:0,left:0,right:0,bottom:0});n.jqif.css({position:"fixed",height:c,width:"100%",top:0,left:0,right:0,bottom:0});if(o&&o.container){var p=e(o.container).offset();if(e.isPlainObject(p)&&p.top!==undefined){n.jqi.css({position:"absolute"});n.jqi.animate({top:p.top+o.y,left:p.left+o.x,marginLeft:0,width:o.width!==undefined?o.width:null});h=p.top+o.y-(n.options.top.toString().indexOf("%")>=0?f*(parseInt(n.options.top,10)/100):parseInt(n.options.top,10));e("html,body").animate({scrollTop:h},"slow","swing",function(){})}}else if(o&&o.width){n.jqi.css({position:"absolute",left:"50%"});n.jqi.animate({top:o.y||h,left:o.x||"50%",marginLeft:o.width/2*-1,width:o.width})}else{n.jqi.css({position:"absolute",top:h,left:"50%",marginLeft:n.jqi.outerWidth(false)/2*-1})}if(t!==undefined&&t.data.animate===false){e.fx.off=r}},style:function(){var e=this;e.jqif.css({zIndex:e.options.zIndex,display:"none",opacity:e.options.opacity});e.jqi.css({zIndex:e.options.zIndex+1,display:"none"});e.jqib.css({zIndex:e.options.zIndex})},goToState:function(t,n,r){var i=this,s=i.jqi,o=i.options,u=i.getState(t),a=o.states[u.data("jqi-name")],f=new e.Event("impromptu:statechanging"),l=i.options;if(a!==undefined){if(typeof a.html==="function"){var c=a.html;u.find("."+l.prefix+"message ").html(c())}if(typeof n==="function"){r=n;n=false}i.jqib.trigger(f,[i.getCurrentStateName(),t]);if(!f.isDefaultPrevented()&&u.length>0){i.jqi.find("."+l.prefix+"parentstate").removeClass(l.prefix+"parentstate");if(n){i.jqi.find("."+l.prefix+"substate").not(u).slideUp(o.promptspeed).removeClass("."+l.prefix+"substate").find("."+l.prefix+"arrow").hide();i.jqi.find("."+l.prefix+"state:visible").addClass(l.prefix+"parentstate");u.addClass(l.prefix+"substate")}else{i.jqi.find("."+l.prefix+"state").not(u).slideUp(o.promptspeed).find("."+l.prefix+"arrow").hide()}i.currentStateName=a.name;u.slideDown(o.promptspeed,function(){var n=e(this);if(typeof a.focus==="string"){n.find(a.focus).eq(0).focus()}else{n.find("."+l.prefix+"defaultbutton").focus()}n.find("."+l.prefix+"arrow").show(o.promptspeed);if(typeof r==="function"){i.jqib.on("impromptu:statechanged",r)}i.jqib.trigger("impromptu:statechanged",[t]);if(typeof r==="function"){i.jqib.off("impromptu:statechanged",r)}});if(!n){i.position()}}}return u},nextState:function(e){var t=this,n=t.getCurrentState().next();if(n.length>0){t.goToState(n.data("jqi-name"),e)}return n},prevState:function(e){var t=this,n=t.getCurrentState().prev();if(n.length>0){t.goToState(n.data("jqi-name"),e)}return n}};e.prompt=function(e,n){var r=new t(e,n);return r.jqi};e.each(t,function(t,n){e.prompt[t]=n});e.each(t.prototype,function(n,r){e.prompt[n]=function(){var e=t.getLast();if(e&&typeof e[n]==="function"){return e[n].apply(e,arguments)}}});e.fn.prompt=function(t){if(t===undefined){t={}}if(t.withDataAndEvents===undefined){t.withDataAndEvents=false}e.prompt(e(this).clone(t.withDataAndEvents).html(),t)};window.Impromptu=t});(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){e(require("jquery"))}else{e(jQuery)}})(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{e=decodeURIComponent(e.replace(t," "));return u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g;var u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires==="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{};var h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("=");var m=r(v.shift());var g=v.join("=");if(t&&t===m){c=o(g,s);break}if(!t&&(g=o(g))!==undefined){c[m]=g}}return c};u.defaults={};e.removeCookie=function(t,n){if(e.cookie(t)===undefined){return false}e.cookie(t,"",e.extend({},n,{expires:-1}));return!e.cookie(t)}})