Is there any trick how to start a function in javascript, which starts when the page is completely loaded?
When DOM is ready then use .ready event.
jQuery(document).ready(function(){ //content });
you also use .load event when page load images.
jQuery(window).load(function(){ //content });