// JavaScript Document
jQuery.noConflict();

jQuery(document).ready(function(){
    initStandardScript();
});

function initStandardScript(){
    jQuery.fn.fadeToggle = function(speed, easing, callback) {
        return this.animate({ opacity: 'toggle' }, speed, easing, callback);
    };

    jQuery(document).ready(function() {
        // start out by hinding form. But it is done in CSS, so probably not needed
        jQuery('#tellfriend').hide();
        // show the form (div) when clicking the a.tipafriend - remove if clicked twice (toggle)
        jQuery('#centerRow-2 a.tipafriend, #tellfriend a.close').click(function() {
            jQuery("#tellfriend").fadeToggle('slow');
        });
        // when the submit button is clicked, then validate the form
        jQuery('.submit_but').click(function() {
            jQuery('#tellafriend_form').validate();
        });

    });

}

