$(document).ready(function() {
		/** $.getScript('/js/md5.js');
			Dont use getScript since it wont be cached.
		**/

		/*** This part Will load the javascripts and cached it on first load ***/
		var js = [
				'/js/md5.js',
				'/js/superfish.js',
				'/js/hoverIntent.js',
				'/js/jquery.bgiframe.min.js',
				'/js/ui.core.js',
				'/js/ui.draggable.js',
				'/js/ui.datepicker.js',
				'/js/jquery.jbind-1.5.8.min.js',
				'/js/jquery.history.js',
				'/js/pngfix.js',
				'/js/jquerycycle.js',
				'/js/jquery.js',
				'/js/jquery.tooltip.v.1.1.js',
				'/js/formvalidate.js'
			];

		$(js).each(function(key, value){
				$.ajax({
						type: "GET",
						url: value,
						dataType: "script",
						cache: true
					});
			});
			

		/*** This part will preload the images ***/
		var images = [
				'/template/nonlogged/v3/images/searchloader.gif'
			];
		$(images).each(function(key, value) {
			var img = new Image();
			$(img)
				.attr('src', value)
				.error(function (){
					//alert('Error preloading image ' . value);
				})
			});

	});
