// JavaScript Document

(function(window, document, $, undefined) {
	
	var artic = {};
	artic.events = {};
	
	artic.init = function() {
		if($.browser.msie && $.browser.version <= 6) {
			$('a').bind('click', function(e) {
				e.preventDefault();
			});
			// show update popup
			$('.iepopup').show();
			$('.chooselang').hide();
		}
		
		artic.wheight = $(window).height();
		artic.bindEvents();
		
		$('body').css('overflow', 'hidden');
	};
	
	artic.bindEvents = function() {
		$(window).bind('resize', artic.events.onResize).trigger('resize');
	};
	
	artic.events.onResize = function() {
		var container = $('.page:visible .container');
		var pheight = container.height();
		
		$('.bg').height($(window).height());
		container.css('margin-top', ((artic.wheight - pheight)/2)) ;
		
		var iepp = $('.iepopup');
		var ppheight = iepp.height();
		
		iepp.css('margin-top', ((artic.wheight - ppheight)/2));
	};
	
	artic.init();

}(window, window.document, jQuery));
