$(function(){var t,o=0;$("#showsimple").click(function(){toastr.success("Without any options","Simple notification!")}),$("#showtoast").click(function(){var e=$("#toastTypeGroup input:radio:checked").val(),a=$("#message").val(),i=$("#title").val()||"",s=$("#showDuration"),n=$("#hideDuration"),l=$("#timeOut"),r=$("#extendedTimeOut"),c=$("#showEasing"),p=$("#hideEasing"),h=$("#showMethod"),u=$("#hideMethod"),d=o++;toastr.options={closeButton:$("#closeButton").prop("checked"),debug:$("#debugInfo").prop("checked"),progressBar:$("#progressBar").prop("checked"),preventDuplicates:$("#preventDuplicates").prop("checked"),positionClass:$("#positionGroup input:radio:checked").val()||"toast-top-right",onclick:null},$("#addBehaviorOnToastClick").prop("checked")&&(toastr.options.onclick=function(){alert("You can perform some custom action after a toast goes away")}),s.val().length&&(toastr.options.showDuration=s.val()),n.val().length&&(toastr.options.hideDuration=n.val()),l.val().length&&(toastr.options.timeOut=l.val()),r.val().length&&(toastr.options.extendedTimeOut=r.val()),c.val().length&&(toastr.options.showEasing=c.val()),p.val().length&&(toastr.options.hideEasing=p.val()),h.val().length&&(toastr.options.showMethod=h.val()),u.val().length&&(toastr.options.hideMethod=u.val()),a||(a="Hi, welcome to Inspinia. This is example of Toastr notification box."),$("#toastrOptions").text("Command: toastr["+e+']("'+a+(i?'", "'+i:"")+'")\n\ntoastr.options = '+JSON.stringify(toastr.options,null,2));var v=toastr[e](a,i);t=v,v.find("#okBtn").length&&v.delegate("#okBtn","click",function(){alert("you clicked me. i was toast #"+d+". goodbye!"),v.remove()}),v.find("#surpriseBtn").length&&v.delegate("#surpriseBtn","click",function(){alert("Surprise! you clicked me. i was toast #"+d+". You could perform an action here.")})}),$("#clearlasttoast").click(function(){toastr.clear(t)}),$("#cleartoasts").click(function(){toastr.clear()})});