Feature lazy loading

It is senf for #121. Let's see what I did in this PR:

- #### Added a .gitignore file
First of all, I thought that it is necessary to do but didn't want to create a separate issue/PR for this. So the added .gitignore filters all the files in the source and thumbs directories.

- #### Added a configuration option in the config.php
If the variable with the name of ``` $lazy_loading_file_number_treshold``` is -1 or 0, then lazy loading is turned off or on. If it is positive number then lazy loading will be turned on if the number of the files in a directory exceeds this value.

- #### Modified JS and CSS
I added a jQuery plugin to the project which is responsible for lazy loading. It is available at http://www.appelsiini.net/projects/lazyload. Then I added width and height properties for the thumbnails in the CSS files. This is necessary for the plugin to work, but it is also a good practice in general in order to speed up page loading.

- #### Modified the dialog.php
Lazy loading is enabled now.