$(document).ready(function () { $('.slideshow').cycle({ fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $("#gallery a").lightBox(); $("#debug_window").draggable(); $("#change_language_en").click(function () { $.post('http://cksold.univnt.ro/index.php', {'change_language': 'en'}, function (data) { location.reload(); }); return false; }); $("#change_language_ro").click(function () { $.post('http://cksold.univnt.ro/index.php', {'change_language': 'ro'}, function (data) { location.reload(); }); return false; }); if (300 > $(window).height()) { $("img[alt=content_header]").hide(); $(".recent_activities").hide(); } $("#see_more").hover( function () { $("#see_more a").addClass("selected"); }, function () { $("#see_more a").removeClass("selected"); } ); $("#contactForm").validate( { messages: { contact_name: "Last name required", contact_prenume: "First name required", contact_telefon: "Phone required", contact_text: "Your message required", contact_email: {required: "E-mail address required", email: "The e-mail address should be valid; like yourname@domain.com"} }, rules: { contact_name: "required", contact_prenume: "required", contact_telefon: "required", contact_text: "required", contact_email: {required: true, email: true} }, errorLabelContainer: "#messageBox", errorElement: "li" }); var pay4_total = 0; $('input[name=pay4_dinner_party]').click(function () { if (this.checked) { $('#pay4_dinner_party').html('YES'); pay4_total = pay4_total + 30; $('#pay4_total').html(pay4_total); } if (!this.checked) { $('#pay4_dinner_party').html('NO'); pay4_total = pay4_total - 30; $('#pay4_total').html(pay4_total); } }); $('input[name=pay4_lunch]').click(function () { if (this.checked) { $('#pay4_lunch').html('YES'); pay4_total = pay4_total + 20; $('#pay4_total').html(pay4_total); } if (!this.checked) { $('#pay4_lunch').html('NO'); pay4_total = pay4_total - 20; $('#pay4_total').html(pay4_total); } }); $('input[name=pay4_registration_fee]').click(function () { if (this.checked) { $('#pay4_registration_fee').html('YES'); pay4_total = pay4_total + 70; $('#pay4_total').html(pay4_total); } if (!this.checked) { $('#pay4_registration_fee').html('YES'); pay4_total = pay4_total - 70; $('#pay4_total').html(pay4_total); } }); $('#registration_form_submit').click(function () { $.post('rf_send.php', $('#registration_form').serialize(), function (data) { $('#form_submission_result').html(data); }); }); });