function processEmail(id){ $.post('processemail.php',{finID: id, email: $('#inline #p-email').val()},function(data){ switch(data){ case "email added.": $('#inline #p-email').val('Success! Thank you!'); $.prettyPhoto.close(); break; case "invalid email.": $('#inline #p-email').val('Error! Invalid e-mail.'); break; } }); } function processMember(){ vars=""; itemsArray = ["purl","firstname","lastname","email","address1","address2","city","state","postalcode","phone"]; $.each(itemsArray, function() { vars+= '&'+this+'='+ $('#inline #'+this).val(); }); $.ajax({ type: "POST", url: "processmember.php", data: vars, success: function(data){ if(data=="success."){ $('#inline #firstname').val(''); $('#inline #lastname').val(''); $('#inline #email').val(''); $('#inline #phone').val(''); $('#inline #address1').val(''); $('#inline #address2').val(''); $('#inline #city').val(''); $('#inline #state').val(''); $('#inline #postalcode').val(''); $('#inline #error').html('Thank you! This window will automatically close.'); setTimeout(function() { $.prettyPhoto.close(); }, 2000); }else{ $('#inline #error').html(data); } } }); return false; } $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto({ animationSpeed: 'normal', /* fast/slow/normal */ opacity: 0.80, /* Value between 0 and 1 */ showTitle: true, /* true/false */ allowresize: false, /* true/false */ default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ callback: function(){}, /* Called when prettyPhoto is closed */ markup: '