/*
	www.backballmassage.com
	jan 2010
	Julie Berlin
	julie@helpmejulie.com
*/

(function($){ 

// show image enlargements
	$('a[rel="enlarge-img"]').colorbox();	

// rotate testimonials
/*
$('#banner') 
.cycle({ 
    fx:     'fade', 
    speed:  1000, 
    timeout: 6000, 
    sync: 1,
    random: 1
});
*/

// validate contact form
	$('#contactform')
	.validate({
		rules: {
			name: {
				required: true,
				minlength: 2
			},
			email: {
				required: true,
				email: true
			},
			message: "required"
		},
		messages: {
			name: {
				required: "Please provide your name",
				minlength: "Your name must consist of at least 2 characters"
			},
			email: "Please enter a valid email address",
			message: "Please type your message"
		}
		});


/*
rotator.js
http://www.josephfinsterwald.com



    $.rotate13 = function(s) {
        var b = [],c,i = s.length,a = 'a'.charCodeAt(),z = a + 26,A = 'A'.charCodeAt(),Z = A + 26;
        while (i--) {
            c = s.charCodeAt(i);
            if (c >= a && c < z) { b[i] = String.fromCharCode(((c - a + 13) % (26)) + a); }
            else if (c >= A && c < Z) { b[i] = String.fromCharCode(((c - A + 13) % (26)) + A); }
            else { b[i] = s.charAt(i); }
        }
        return b.join('');
    };
    */
// obfuscate email address
//	$('#contactlink')
//	.attr('href', $.rotate13('znvygb:vasb@onpxonyyznffntr.pbz'));

})(jQuery);
