//do when the document is ready
$(document).ready(function() {
    		    		
	$.ajax({ url: "weather-forecast/index.php", context: document, success: function(data){
        if ($("#weather-widget-box").length){
	        $("#weather-widget-box").append(data);
	    }
    }});
    
    
    $.ajax({ url: "rightbox.html", context: document, success: function(data){
        if ($(".fcb").length){
	        $(".fcb").append(data);
	        
	    }
    }});

}); //END do when the document is ready

$(document).ready(function(){

	if ($(".validation-form").length){
		$(".validation-form").validate();
		
		$(".validation-form").ajaxForm(function() { 
	        $(".validation-form").append('<p>Thank you for your submission. We will respond as soon as possible.</p>');
	        $("#container").fadeOut();
	    }); 
	    
	    
	    $(".validation-form").submit(function() { 
		    
		    if( $(".validation-form").valid() ){
			    // submit the form 
			    $(this).ajaxSubmit(); 
			    // return false to prevent normal browser submit and page navigation 
			}
		    return false; 
		});	
		
		
		
		
		
		
	}
	
   		
	
});



//do when the document is ready
$(document).ready(function() {
    		    		
    // Sample Selector
    $('#tides li a').click(function(){
    	var href = $(this).attr('href');    	
    	
    	window.open (href,
"mywindow","menubar=0,resizable=1,width=670,height=768"); 
    	return false;
    	
   	}); // END Selector

}); //END do when the document is ready

