$(document).ready(function(){ //Check to see if the window is top if not then display button $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.gototop').fadeIn(); } else { $('.gototop').fadeOut(); } }); //Click event to scroll to top $('.gototop').click(function(){ $('html, body').animate({scrollTop : 0},800); return false; }); }); // Start for form validation jQuery(document).ready(function($) { $('#commentform').validate({ rules: { author: { required: true, minlength: 2 }, email: { required: true, email: true }, comment: { required: true, minlength: 20 } }, messages: { author: "Please enter in your name.", email: "Please enter a valid email address.", comment: "Message box can't be empty!" }, errorElement: "div", errorPlacement: function(error, element) { element.after(error); } }); }); // End for form validation $(document).ready(function(){ $("area[rel^='prettyPhoto']").prettyPhoto(); $(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'pp_default',slideshow:9000, autoplay_slideshow: true}); $(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:5000, hideflash: true}); $("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({ custom_markup: '
', changepicturecallback: function(){ initialize(); } }); $("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({ custom_markup: '', changepicturecallback: function(){ _bsap.exec(); } }); });