var Site = {

	// this vars should be set in <head> server-side
	config : {
		base_url : '',
		site_url : '',
		zoom_img_params : {
				'zoomOpacity'			: true,
				'overlayShow'			: true,
				'zoomSpeedIn'			: 500,
				'zoomSpeedOut'			: 500,
				'padding'				: 0,
				'overlayOpacity'		: .7
		}
	},
	
	// this method is called on every page
	start : function() {

		// On Dom Ready
		jQuery(function($) {

		});
			
		
		// Load Immediately
		(function($) {
		
		})(jQuery);


		// On Window Load
		jQuery(window).load(function ($) {

		});

	},
	
	start_redirection : function() {
		jQuery(function($) {
			var timeout = new Date(); 
			timeout.setSeconds(timeout.getSeconds() + 8);

			var update_time = function(periods) {
				$('#redirection_in').text(periods[6]); 
			};
			var countdown_complete = function () {
				window.location = $('#url').val();
			};

			$('#countdown').countdown({
				until: timeout,
				format: 'S',
				onTick: update_time,
				onExpiry: countdown_complete
			}); 
		});

	}

};


Site.start();