$(document).ready(function () {

<!-- image cycle -->
$('#image-slide, #promo-slide').cycle({
    fx:     'scrollRight', 
    speed:  3000,
	timeout: 3000,
	random: 1
});
<!-- end -->

<!-- fade in content -->
$('#copy, #promo-copy').delay(200).fadeIn(800);
<!-- end -->

<!-- subscription -->
$("#subform").validate({
focusInvalid: false,
onfocusout: false,
rules: { 
wpnewsletter_name: "required",// simple rule, converted to {required:true} 
wpnewsletter_email: {// compound rule 
required: true, 
email: true
}
}
});

$("#subform input[type=submit]").click(function(){
	$(this).delay(2000).queue(function() {$("label").fadeOut(500, function(){ $("label").remove(); }); $(this).dequeue(); })
});

<!-- end  -->

<!-- tooptips-->
$('.tip').tipsy({gravity: 's'});
<!-- end -->

<!-- contact -->

$("#opform").submit(function(){

var str = $(this).serialize();
   $.ajax({
   type: "POST",
   url: "http://www.patonsplace.com.au/php/contactForm.php",
   data: str,
   success: function(msg){
$("#noter").ajaxComplete(function(event, request, settings){
if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
$("#contact_form").fadeOut(200);
$("#confirmed").delay(200).fadeIn(500);
$("#noter").fadeOut(200);
}
else
{
$('#noter').fadeIn(500);
result = msg;
}
$(this).html(result);
});
}
});
return false;
});

<!-- end contact -->

<!-- googlemaps -->

$("#res").click(function(){
	$(this).addClass('mapsel');
	$("#lal").removeClass('mapsel');
	$("#resmap").show();
	$("#lalmap").hide();
});

$("#lal").click(function(){
	$(this).addClass('mapsel');
	$("#res").removeClass('mapsel');
	$("#lalmap").show();
	$("#resmap").hide();
});
<!-- end gmaps -->

<!-- pandora home -->
$('#panpan').hover(function(){
	$('#pan-overlay').animate({ duration: 300, bottom: '+=255' });
}, function(){
	$('#pan-overlay').animate({ duration: 300, bottom: '-=255' });
});
<!-- end pandora home -->

});
