Is there any trick how to start a function in javascript, which starts when the page is completely loaded?
Check this: http://api.jquery.com/ready/
jQuery(document).ready(function($) { // Code using $ as usual goes here. });