$('document').ready(function(){ var supporterd='foundingsupporters'; $("#supporterwrapper").height($("#foundingsupporters").outerHeight()); setInterval(function(){ if(supporterd=='foundingsupporters'){ $("#foundingsupporters").fadeOut(); $("#mediasupporters").fadeIn(); $("#supporterwrapper").height($("#mediasupporters").outerHeight()); supporterd='mediasupporters' } else if(supporterd=='mediasupporters'){ $("#mediasupporters").fadeOut(); $("#currentsupporters1").fadeIn(); supporterd='currentsupporters1' } else if(supporterd=='currentsupporters1'){ $("#currentsupporters1").fadeOut(); $("#currentsupporters2").fadeIn(); supporterd='currentsupporters2' } else if(supporterd=='currentsupporters2'){ $("#currentsupporters2").fadeOut(); $("#foundingsupporters").fadeIn(); supporterd='foundingsupporters' } }, 3000); $("#icon-totop").click(function(event) { event.preventDefault(); $('html,body').animate({ scrollTop: $("body").offset().top}, 'slow'); }); $(window).scroll(function(){ var topdistance=$("#pageTopNavbar").offset().top - $(window).scrollTop(); if(topdistance>-600) $("#icon-totop").fadeOut('slow'); else $("#icon-totop").fadeIn('slow'); }); $("#chkRqSktShowOnMap").click(function(e){ if($(this).prop('checked')) $("#pRqSktShowOnMap").slideDown(); else $("#pRqSktShowOnMap").slideUp(); }) $("#formRequestSkate").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html('
Submitting your request
Thank you for submitting your request. It is under review. We will get back to you shortly.
'); return; } else if(data==''){$("#formRequestSkate").submit(); return;} else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formLogin").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var pagename=$(this).attr('data-pagename'); $("#response-output-login").html(' Submitting your request
You have entered a wrong password.
'); return; } else{ $("#response-output-login").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output-login").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formSignup").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var pagename=$(this).attr('data-pagename'); $("#response-output-signup").html(' Submitting your request
The Email Address is already registered. Please use a different one or Login.
'); } else{ $("#response-output-signup").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output-signup").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formReqReceipt").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#reqAnotherReceipt").click(function(e){ e.preventDefault(); $("html, body").animate({ scrollTop: 0 }, "slow"); $("#formReqReceipt")[0].reset(); $("#requestSubmitted").fadeOut(500); setTimeout(function(){ $("#formReqReceiptHolder").fadeIn();; }, 500); return; }); $("#typeOfDonation").change(function(e){ if($(this).val()=='Property') $(".pPropertyOnly").show(); else $(".pPropertyOnly").hide(); if($(this).val()=='Monetary')$(".pMoneytaryOnly").show(); else $(".pMoneytaryOnly").hide(); }); $("#AmountReceived,#ValueOfAdvantage").blur(function(e){ $("#EligibleAmount").val($("#AmountReceived").val() - $("#ValueOfAdvantage").val()); }); $("#formVolunteer").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Thank you for submitting your request. It is under review. We will get back to you shortly.
'); return; } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formContactUs").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Your message has been sent. Thank you for contacting us.
'); return; } else if(data==0){ $("#response-output").html('You have entered a wrong password.
'); return; } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formPPR").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Your pickup request has been submitted.
'); return; } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formChnagePwd").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Your password is changed successfully.
'); return; } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); /******************************** Admin ********************************/ $("#fApproveMoneytaryDonation").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Success! The receipt has been sent.
'); } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#fDenyMoneytaryDonation").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Request denied and email sent to requesting person.
'); } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".formDonationButton").submit(function(e){ e.preventDefault(); var reqID=$(this).attr('data-requestid'); var form_data = new FormData(this); //$("#response-output").html(' Submitting your request
Submitting your request
Success! The receipt has been sent.
'); } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".formAdminContactUs").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var cntctid=$(this).attr('data-contactid'); $("#response-output"+cntctid).html(' Submitting your request
Success! The reply has been sent.
'); $("#submit"+cntctid).hide(); } else{ $("#response-output"+cntctid).html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".formAdmCntcAddNote").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var cntctid=$(this).attr('data-contactid'); $("#response2-output"+cntctid).html(' Submitting your request
Note added to the message.
'); } else{ $("#response2-output"+cntctid).html('Error! ' + data + '
'); } }, error: function(){ $("#response2-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".unreadCR").click(function(){ var reqId=$(this).attr('href').replace('#collapse',''); $.ajax({ type: 'post', url: 'https://skatetogreat.org/admincontacts_ajax.php', data: {'requestId':reqId}, success: function(data, status){ if(data==1) $("a[href=\"#collapse"+reqId+"\"]").removeClass('unreadCR'); } }); }); $(".deleteRecord").click(function(){ var delID=$(this).attr('data-recordid'); console.log(delID); //return; var r = confirm('Are yo sure you want to delete this message?'); if (r == true) { $.ajax({ type: 'post', url: 'https://skatetogreat.org/admincontacts_ajax.php', data: {'deleteID':delID}, success: function(data, status){console.log(data); if(data==1) $("#messageBox"+delID).slideUp(); } }); } }); $(".formAdminSSR").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var shipskateid=$(this).attr('data-shipskateid'); $("#responseoutput"+ shipskateid).html(' Sending response
Success! The reply has been sent.
'); $("#submit"+shipskateid).hide(); } else{ $("#responseoutput"+shipskateid).html('Error! ' + data + '
'); } }, error: function(){ $("#responseoutput").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".formAdmSSRAddNote").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var shipskateid=$(this).attr('data-shipskateid'); $("#response2output"+shipskateid).html(' Submitting your request
Note added to the request.
'); } else{ $("#response2output"+shipskateid).html('Error! ' + data + '
'); } }, error: function(){ $("#response2output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".unreadSSR").click(function(){ var reqId=$(this).attr('href').replace('#collapse',''); $.ajax({ type: 'post', url: 'https://skatetogreat.org/admin_shipsketreq_ajax.php', data: {'requestId':reqId}, success: function(data, status){console.log(data); if(data==1) $("a[href=\"#collapse"+reqId+"\"]").removeClass('unreadSSR'); } }); }); $(".deleteSSR").click(function(){ var delID=$(this).attr('data-recordid'); console.log(delID); //return; var r = confirm('Are yo sure you want to delete this message?'); if (r == true) { $.ajax({ type: 'post', url: 'https://skatetogreat.org/admin_shipsketreq_ajax.php', data: {'deleteID':delID}, success: function(data, status){console.log(data); if(data==1) $("#ssrBox"+delID).slideUp(); } }); } }); $(".panel-title>.unreadPPR").click(function(){ var reqId=$(this).attr('data-reqid'); $.ajax({ type: 'post', url: 'https://skatetogreat.org/adminpartnerpickup_ajax.php', data: {'requestId':reqId}, success: function(data, status){ if(data==1) $("a[href=\"#collapse"+reqId+"\"]").removeClass('unread'); } }); }); $("#formAddMedia").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Success! The media has been published.
'); $("#submit").hide(); } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".fAdmnSRMap").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); var reqid=$(this).attr('data-requestid'); //console.log(reqid); return; $("#response-output"+reqid).html(' Adding To Map
Error! ' + data + '
'); } }, error: function(){ $("#response-output"+reqid).html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $(".reqAction").click(function(e){ var reqid=$(this).attr('data-requestid'); var actn=$(this).attr('data-action'); $.ajax({ type: 'post', url: 'https://skatetogreat.org/adminskatereq_ajax.php', data: {'requestId':reqid,'applActn':actn} }); if(actn==1)$("#response2-output"+reqid).html('This request has been approved.') else if(actn==-1)$("#response2-output"+reqid).html('This request has been rejected.') else if(actn==15)$("#response2-output"+reqid).html('This request has been postponded.') }); $("#frmAdminNewLocation").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output1").html(' Adding New Location
Location Added
'); } else{ $("#response-output1").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output1").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formAdminLocations").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Updating Map
Map updated
'); } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); $("#formShipYourSkates").submit(function(e){ e.preventDefault(); var form_data = new FormData(this); $("#response-output").html(' Submitting your request
Thank you for submitting your skat shipment request. It is under review. We will get back to you shortly.
'); $("#formShipYourSkates").trigger("reset"); return; } else{ $("#response-output").html('Error! ' + data + '
'); } }, error: function(){ $("#response-output").html('There is some technical issue. We are working on it and will restore soon.
'); } }); }); });