/* 
	beqweb.js v. 1.1.0

*/

MenuActivator = {
	
	
	init: function() {
		if (PageProperties.activeMainmenuitem !='') {
			var activeMainId = '#'+PageProperties.activeMainmenuitem;
			jQuery(activeMainId).attr('class','activeMainmenuItem');
		}
		if (PageProperties.activeLocalmenuItem !='') {
			var activeLocalId = '#'+PageProperties.activeLocalmenuItem;
			jQuery(activeLocalId).attr('class','activeLocalmenuItem');
		}
	}
}


EITableFixer = {
	
	init: function() {
		var self = EITableFixer;
		if (self.isEILessThan8()) {
			self.makeFloat();
		}
	},
	
	isEILessThan8: function() {
		var result = false;
		if (typeof document.all != "undefined") {
			var agent = navigator.userAgent.toLowerCase();
			var browser = agent.replace(/.*ms(ie[\/ ][^ $]+).*/,"$1").replace(/ /, "");
			if (browser.indexOf("6") !=-1 || browser.indexOf("7") !=-1) {
					result = true;
			}
		}
		return result;
	},
	
	makeFloat: function() {
		jQuery('#venstresojle').css('float','left');
		jQuery('#centersojle').css('float','left');
		jQuery('#hojresojle').css('float','left');	
		jQuery('#adrlinie').css('margin-left','180px');
	}
	
}

Videoswap = {
	swap: function() {
		jQuery('#poster').hide();
		jQuery('#tubevideo').show();
	}
}


jQuery(document).ready(function() {
	MenuActivator.init();	
	EITableFixer.init();
	jQuery('#poster').bind('click',Videoswap.swap);
})





