$(document).ready(function() {    
	
				var _images = [
				'img/front_panel.jpg',
				'img/home/main_content_bg.jpg',
				'img/home/header_bg.jpg',
				'img/book_appointment/main_content_bg.jpg',
				'img/book_appointment/header_bg.jpg',
				'img/bridal_registry/main_content_bg.jpg',
				'img/bridal_registry/header_bg.jpg',
				'img/bridal_traditional/main_content_bg.jpg',
				'img/bridal_traditional/header_bg.jpg',
				'img/casual_wear/main_content_bg.jpg',
				'img/casual_wear/header_bg.jpg',
				'img/celebrity_shoots/main_content_bg.jpg',
				'img/celebrity_shoots/header_bg.jpg',
				'img/contact/main_content_bg.jpg',
				'img/contact/header_bg.jpg',
				'img/kyles_collection/main_content_bg.jpg',
				'img/kyles_collection/header_bg.jpg',
				'img/evening_and_formal/main_content_bg.jpg',
				'img/evening_and_formal/header_bg.jpg',
				'img/mens_wear/main_content_bg.jpg',
				'img/mens_wear/header_bg.jpg',				
				'img/register/main_content_bg.jpg',
				'img/register/header_bg.jpg',
				'img/news_short/main_content_bg.jpg',
				'img/news_short/header_bg.jpg',
				];

				$.each(_images,function(e) {
					$(new Image()).load(function() {
		
						//check if the last image has loaded		
						if($(this).attr('src')=='img/news_short/header_bg.jpg'){
							//alert('the last image has loaded');
							$('body').removeClass('loading');
							$('#loader').remove();
							$('div#main').css("display","block");
						}
		
		
					}).attr('src',this);
				});
			});	
