// JavaScript Document

jQuery( function( $ )
{
            function move_boat(){
				page_height = $(document).height();
				pos_y = $(document).scrollTop();
				browser_width = $(window).width();
                browser_height = $(window).height();
				
				scroll_max = page_height - browser_height;
				/*
				alert("p: " + page_height);
				alert("b: " + browser_height);
				alert(scroll_max);
				*/
				loc_percentage = (pos_y/scroll_max)*100;
				//alert("%: " + loc_percentage);
				
				ripple_height = $("#content").height() - 100;
				boat_y = (ripple_height/100)*loc_percentage;				
				
                boat_x = ($("#content").width()/2)+130;
				
				
				
                if(browser_width > 960){
                /* 960 */
					//alert("x: " + boat_x);
					//alert("y: " + boat_y);
                    $("#floating_boat").css("position", "absolute");
                    $("#floating_boat").css("left", boat_x + "px");
                    $("#floating_boat").css("top", boat_y + "px");
                }else{
                    $("#floating_boat").css("position", "absolute");
                    $("#floating_boat").css("left", "610px");
                    $("#floating_boat").css("top", "0");
                }
             }
			 
            $(window).scroll(move_boat);
            $( window ).wresize( move_boat );
            $(document).ready( move_boat );
			
        
            
            content_resize();
        } );