var DEBUG = true;
$(document).ready(

    function()
    {
	
	
	function playButtonPosition(){
    if($('img.videoBigImage')[0]){
	    var videoImgW = $('img.videoBigImage').width();
	    var videoImgH = $('img.videoBigImage').height();
	    $('.videoBigImageHelper').css({"left": videoImgW/2 - 30});
	    $('.videoBigImageHelper').css({"top": videoImgH/2 - 30});
		if(videoImgW != 0 && videoImgH !=0 ){
	    $('.videoBigImageHelper').css({"marginTop": 0, "marginLeft":0});}
		
    }
}	
  try
        {
        
         $('table.docListing tr td, table.calendarList tr td, table.lovFilter tr td, table.telbogTable tr td').hover(
          function() {
             $(this).addClass('hover');
          }, function() {
             $(this).removeClass('hover');
          }
       );

			if ($("input[type=file]")[0]) {
				$("input[type=file]").filestyle({ 
					image: "../images/btnSog.gif",
					imageheight : 23,
					imagewidth : 23,
					width : 200
				});
			}
			
			$('.partiComp').hover(
	            function() {
		            $(this).css({"background-color":"#f2daba"});
	            },
	            function() {
		            $(this).removeAttr('style');
	            }
	        );
			
			/*$('.frontColumn ul.leftMenu2 li').hover(
			  function () {
				$('.frontColumn ul.leftMenu2 li ul').toggle();
			  }, 
			  function () {
				$('.frontColumn ul.leftMenu2 li ul').toggle();
			  }
			);*/
			
			$(".frontColumn ul.leftMenu2 li:has(ul)").hover(function(){
				var ul = $(this).children("ul");   
				
				if(ul.is(":animated")){
					ul.stop()
					   .css("height", "auto")
					   //.slideDown("normal")
					   ;
				}
				else{
					ul.css("display", "none");
					ul.css("display", "block");
					}},
			function(){
				var ul = $(this).children("ul"); 
				
				if(ul.is(":animated")){
				  ul.stop()
					.css("height", "auto")
					.css("display", "none");
				}
				else{
				 ul.css("display", "none");
				}
			   
			});
			

			
					
			/* 5 Boxes equalheight */
			if ($('#page .rightBox')[0]){
				$('#page .campVertical .rightBox:eq(0), #page .campVertical .rightBox:eq(1), #page .campVertical .rightBox:eq(2), #page .campVertical .rightBox:eq(3)').equalHeight();
				$('#page .campVertical .rightBox:eq(4), #page .campVertical .rightBox:eq(5), #page .campVertical .rightBox:eq(6), #page .campVertical .rightBox:eq(7)').equalHeight();
				$('#page .campVertical .rightBox:eq(8), #page .campVertical .rightBox:eq(9), #page .campVertical .rightBox:eq(10), #page .campVertical .rightBox:eq(11)').equalHeight();
				$('#page .campVerticalFive .rightBox:eq(0), #page .campVerticalFive .rightBox:eq(1), #page .campVerticalFive .rightBox:eq(2), #page .campVerticalFive .rightBox:eq(3), #page .campVerticalFive .rightBox:eq(4)').equalHeight();
				$('#page .campVerticalFive .rightBox:eq(5), #page .campVerticalFive .rightBox:eq(6), #page .campVerticalFive .rightBox:eq(7), #page .campVerticalFive .rightBox:eq(8), #page .campVerticalFive .rightBox:eq(9)').equalHeight();
				$('#page .campVerticalFive .rightBox:eq(10), #page .campVerticalFive .rightBox:eq(11), #page .campVerticalFive .rightBox:eq(12), #page .campVerticalFive .rightBox:eq(13), #page .campVerticalFive .rightBox:eq(14)').equalHeight();	
			}
			
			//DAB remove dots in ULs in content editor
			
			if ($('.contentEditor ul li a')[0]){
				$('.contentEditor ul li a').parents('ul').css({ "padding-left":"0px","list-style-type":"none"});
			}
			
			// Teaser carousel
			$('.teaserDemokrati').addClass('teaser_1');
			$('.teaserNavigation a').click(function(){
				
				var nav_id = $(this).attr('class')
				var currentPos = $('.teaserNavigation span.position').html()
				var total = $('.teaserNavigation span.total').html()
				if(nav_id == 'prevTeaser') {
					var nextPos = parseInt(currentPos) - 1;	
				} else{
					var nextPos = parseInt(currentPos) + 1;
				}
				if(nextPos > total) nextPos = 1;
				if(nextPos < 1) nextPos = total;
				//Change holder ID to theme specific (Only FP)
				
				var newID = $('.teaser1').eq(nextPos - 1).attr("id").substring(2,5);
				var oldID = $('.teaser1').eq(currentPos - 1).attr("id").substring(2,5);

				document.getElementById(oldID).id = newID;
				//$('.topBannerCarousel').attr('id',newID); //fails on IE using DOM instead
				//document.getElementById("Akt").id = newID;
				
                //$('.topBannerCarousel').id = "Fol";
                $('.teaser1').eq(currentPos - 1).hide();
				$('.teaser1').eq(nextPos - 1).fadeIn('fast');
				
				$('.teaserNavigation span.position').html(nextPos);
			});
			
						
			//$('#master').css({'min-width': '84em', 'max-width': '105em'})
			$("div.miniNav ul.smallNav li a").hover(
	            function() {
		            var thelink = $(this);		        
		            $('.iconTipTop').html(thelink.html());
	            },
	            function() {
		            var thelink = $(this);
		            $('.iconTipTop').html('');
	            }
	        );
			
	        $("div.subpageFooter ul.smallNav li a").hover(
	            function() 
	                {
		            var thelink = $(this);		    
		            $('.iconTipBottom').html(thelink.html());
	                },
	            function() {
		            var thelink = $(this);
		            $('.iconTipBottom').html('');
	            }
	        );

			// submenu bgiframe for ie6
			if($('ul.leftMenu2 li ul')[0]){
				$('ul.leftMenu2 li ul').bgiframe();
			}
			//
			
			// front page columns height
			if($('.column0, .column1, .column2, .column3, .column4')[0]){
				$('.column0, .column1, .column2, .column3, .column4').equalHeight();
			}
			
			
			
			
			// Forum
//			 $('td').children('.liner a').click(
//	            function() {
//					$(this).parent().children('ul.replyes').toggle();
//					$('.columnLeft').removeAttr('style');
//					columnLeftFix();
//				}
//			); 
			
			// page 25
			var firstheight = $('#firstCol').height();
			var secondheight = $('#secondCol').height();
			var firstsmall = firstheight - 83;
			var secondsmall = secondheight + 83;
			if (firstheight > secondsmall){
				$('#secondCol').css({'min-height':firstsmall})
			}
			if (firstheight < secondsmall){
				$('#firstCol').css({'min-height':secondsmall})
			}
        	//end 25
			
			// page 4
			var a1height = $('#a1').height();
			var a2height = $('#a2').height();
			var a3height = $('#a3').height();
			var a4height = $('#a4').height();
			var a5height = $('#a5').height();
			
			
			var a4h2height = $('#a4 h2').height();
			var a5h2height = $('#a5 h2').height();
			var a4contentheight = $('#a4 .boxContent').height();
			var a5contentheight = $('#a5 .boxContent').height();
			
			var acol = a1height + a2height + 14;
			if (a4height >= a5height) {
				var bcol = a3height + a4height + 14;
			}
			if (a4height < a5height) {
				var bcol = a3height + a5height + 14;
			}
			var acolnew = bcol - a1height - 14;
			var bcolnew = acol - a3height - 96;
			if (acol < bcol){
				$('#a2 .boxColumn').css({'height':acolnew - 38});
				if ($('#a4 img')[0] && $('#a5 img')[0]) {
					$('#a4 .boxContent, #a5 .boxContent').equalHeight();
				}
				
				else if (!$('#a4 img')[0] && !$('#a5 img')[0]) {
					$('#a4 .boxContent, #a5 .boxContent').equalHeight();
				}
				else if ($('#a4 img')[0] && !$('#a5 img')[0]) {
					$('#a5 .boxContent').css({'height': a4height - a5h2height - 20});
				}
				
				else if (!$('#a4 img')[0] && $('#a5 img')[0]) {
					$('#a4 .boxContent').css({'height': a5height - a4h2height - 20});
				}
				$('.boxColumn div.rss').css({"bottom": 0});
			}
			if (acol >= bcol){
				if ($('#a4 img')[0] && $('#a5 img')[0]) {
					$('#a4 .boxContent, #a5 .boxContent').css({'height':bcolnew - 40});
				}
				
				else if (!$('#a4 img')[0] && !$('#a5 img')[0]) {
					$('#a4 .boxContent, #a5 .boxContent').css({'height':bcolnew + 44});
				}
				else if ($('#a4 img')[0] && !$('#a5 img')[0]) {
					$('#a4 .boxContent').css({'height':bcolnew - 40});
					$('#a5 .boxContent').css({'height':bcolnew + 44});
				}
				
				else if (!$('#a4 img')[0] && $('#a5 img')[0]) {
					$('#a5 .boxContent').css({'height':bcolnew - 40});
					$('#a4 .boxContent').css({'height':bcolnew + 44});
				}
				
				var withrssheight = $('.withrss').height();
				$('.boxColumn div.rss').css({"top": withrssheight});
			}
			// end page 4
			
        	/*
			if($('#undervisning .boxColumn')[0]){
				$('#undervisning .boxColumn').equalHeight();
			}
			$('#undervisning .frontColumn:first-child').css({ "margin-left": "2px" });
			*/
			//$( "#undervisning .frontColumn" ).each(
			//	$(this).equalHeight();
			//);
			//$('#eduBox1, #eduBox2, #eduBox3, #eduBox4').equalHeight();
			//$('#eduBox5, #eduBox6, #eduBox7, #eduBox8').equalHeight();
			
			if($('.eduBoxRow1')[0]){
				$('.eduBoxRow1').equalHeight();
			}
			if($('.eduBoxRow2')[0]){
				$('.eduBoxRow2').equalHeight();
			}
			if($('.eduBoxRow3')[0]){
				$('.eduBoxRow3').equalHeight();
			}
			if($('.eduBoxRow4')[0]){
				$('.eduBoxRow4').equalHeight();
			}
			if($('.eduBoxRow5')[0]){
				$('.eduBoxRow5').equalHeight();
			}
			
			if($('#r1, #r2, #r3, #r4')[0]){
				$('#r1, #r2, #r3, #r4').equalHeight();
				$('#r1 .boxContent, #r2 .boxContent, #r3 .boxContent, #r4 .boxContent').equalHeight();
			}
			if($('#r5, #r6, #r7, #r8')[0]){
				$('#r5, #r6, #r7, #r8').equalHeight();
				$('#r5 .boxContent, #r6 .boxContent, #r7 .boxContent, #r8 .boxContent').equalHeight();
			}
			if($('#r9, #r10, #r11, #r12')[0]){
		    	$('#r9, #r10, #r11, #r12').equalHeight();
				$('#r9 .boxContent, #r10 .boxContent, #r11 .boxContent, #r12 .boxContent').equalHeight();
			}
			if($('#r13, #r14, #r15, #r16')[0]){
				$('#r13, #r14, #r15, #r16').equalHeight();
				$('#r13 .boxContent, #r14 .boxContent, #r15 .boxContent, #r16 .boxContent').equalHeight();
			}
		
			
			// 26
			var r2height = $('#r2').height();
			var r6height = $('#r6').height();
			var c1height = $('#c1').height();
			var r10height = $('#r10').height();
			var kontaktheight = r2height + r6height + r10height + 236;
			$('#kontactLong').css({'min-height': kontaktheight});
			
			// end 26
			
			//
			var r2contheight = $('#r2').height();
			var r6contheight = $('#r6').height();
			if ($('#r10').height() > 0) {
			var r10contheight = $('#r10').height()+10;
			}
			$('#r111').css({'min-height': c1height-10});
			//
			if($('#r1 .boxColumn, #r2 .boxColumn, #r3 .boxColumn, #r4 .boxColumn')[0]){
				$('#r1 .boxColumn, #r2 .boxColumn, #r3 .boxColumn, #r4 .boxColumn').equalHeight();
			}
			if($('#r5 .boxColumn, #r6 .boxColumn, #r7 .boxColumn, #r8 .boxColumn')[0]){
				$('#r5 .boxColumn, #r6 .boxColumn, #r7 .boxColumn, #r8 .boxColumn').equalHeight();
			}
			if($('#r9 .boxColumn, #r10 .boxColumn, #r11 .boxColumn, #r12 .boxColumn')[0]){
				$('#r9 .boxColumn, #r10 .boxColumn, #r11 .boxColumn, #r12 .boxColumn').equalHeight();
			}
			
			
			// Documekter first page
			
			/*if ( $('.boxesLine > .frontColumn').children('.pic').size() >= 0) {
				if ( $('.boxesLine > .frontColumn').children('.pic').size() == 0) {
					$('.boxesLine > .frontColumn > .boxColumn').equalHeight();
				};
				
				if ( $('.boxesLine > .frontColumn').children('.pic').size() >= 0) {
					$('.boxesLine > .frontColumn > .boxColumn').equalHeight();
					
					$('.boxesLine > .frontColumn > .boxColumn').each(function(){
						var boxheight = $(this).height();
						var boxheightbig = boxheight + 84;
						if (!$(this).prev().hasClass('pic')){
							$(this).removeAttr('style').css({'height':boxheightbig});				
						}
					});
				};
				
			}*/
			
			$('.buttonSimple').hover(
      			function () {
        			$(this).children('span').css({"text-decoration":"underline"});
      			}, 
			  	function () {
					$(this).children('span').removeAttr('style');
			  	}
			);
			
			$('.button').hover(
      			function () {
        			$(this).children('span').css({"text-decoration":"underline"});
      			}, 
			  	function () {
					$(this).children('span').removeAttr('style');
			  	}
			);
			
			if ( $('#r1').children('.pic').size() >= 0 && $('#r2').children('.pic').size() >= 0 && $('#r3').children('.pic').size() >= 0 && $('#r4').children('.pic').size() >= 0 ) {
				if ( $('#r1').children('.pic').size() == 0 && $('#r2').children('.pic').size() == 0 && $('#r3').children('.pic').size() == 0 && $('#r4').children('.pic').size() == 0) ok=0;
				else ok=1;
				if (ok==1) {
					var nochild1 = $('#r1').children('.pic').size();
					var heightr1 = $('#r1 .boxColumn').height();
					var heightr1big = heightr1 + 84;
					if (nochild1 == 0) {
						$('#r1 .boxColumn').css({'height':heightr1big})
					}
					
					var nochild2 = $('#r2').children('.pic').size();
					var heightr2 = $('#r2 .boxColumn').height();
					var heightr2big = heightr2 + 84;
					if (nochild2 == 0) {
						$('#r2 .boxColumn').css({'height':heightr2big})
					}
					
					var nochild3 = $('#r3').children('.pic').size();
					var heightr3 = $('#r3 .boxColumn').height();
					var heightr3big = heightr3 + 84;
					if (nochild3 == 0) {
						$('#r3 .boxColumn').css({'height':heightr3big})
					}
					
					var nochild4 = $('#r4').children('.pic').size();
					var heightr4 = $('#r4 .boxColumn').height();
					var heightr4big = heightr4 + 84;
					if (nochild4 == 0) {
						$('#r4 .boxColumn').css({'height':heightr4big})
					}
				}
			}
			
			if ( $('#r5').children('.pic').size() >= 0 && $('#r6').children('.pic').size() >= 0 && $('#r7').children('.pic').size() >= 0 && $('#r8').children('.pic').size() >= 0 ) {
				if ( $('#r5').children('.pic').size() == 0 && $('#r6').children('.pic').size() == 0 && $('#r7').children('.pic').size() == 0 && $('#r8').children('.pic').size() == 0 ) ok=0;
				else ok=1;
				if (ok==1) {
					var nochild5 = $('#r5').children('.pic').size();
					var heightr5 = $('#r5 .boxColumn').height();
					var heightr5big = heightr5 + 84;
					if (nochild5 == 0) {
						$('#r5 .boxColumn').css({'height':heightr5big})
					}
					
					var nochild6 = $('#r6').children('.pic').size();
					var heightr6 = $('#r6 .boxColumn').height();
					var heightr6big = heightr6 + 84;
					if (nochild6 == 0) {
						$('#r6 .boxColumn').css({'height':heightr6big})
					}
					
					var nochild7 = $('#r7').children('.pic').size();
					var heightr7 = $('#r7 .boxColumn').height();
					var heightr7big = heightr7 + 84;
					if (nochild7 == 0) {
						$('#r7 .boxColumn').css({'height':heightr7big})
					}
					
					var nochild8 = $('#r8').children('.pic').size();
					var heightr8 = $('#r8 .boxColumn').height();
					var heightr8big = heightr8 + 84;
					if (nochild8 == 0) {
						$('#r8 .boxColumn').css({'height':heightr8big})
					}
				}
			}
			
			if ($('#undervisning')[0]) {
				var umasterHeight = $('#masterSub').height();
				var uheight1 = $('.breadcrumb').height();
				var uheight2 = $('.smallTeaser').height();
				$('#undervisning').css({"height": umasterHeight - 151 - uheight1 - uheight2});
			}
			
			if ($('#undervisningTheme')[0]) {
				var umasterHeight = $('#masterSub').height();
				var uheight1 = $('.breadcrumb').height();
				var uheight2 = $('.smallTeaser').height();
				$('#undervisningTheme').css({"height": umasterHeight - 151 - uheight1 - uheight2});
			}
			
			if ($('.leftUdvalg')[0]) {
				$('#u1, #u2').equalHeight();
				$('#u3, #u4').equalHeight();
				$('#u5, #u6').equalHeight();
				$('#u7, #u8').equalHeight();
				$('#u9, #u10').equalHeight();
				$('#c2, #c3').equalHeight();
		
				var leftudvalgheight = $('#c2').height();
                $('#u111').css({"height": leftudvalgheight - 30});
				
				
				var secondColCompensation= $('#u2').height() + $('#u4').height() + $('#u6').height() + 4 + 24;
				var COLcompensation = $('#u111').height() - secondColCompensation;
				if (COLcompensation > 0){
					$('#u6').height( $('#u6').height() + COLcompensation)
					$('#u5').height( $('#u5').height() + COLcompensation)
				}
				
			}
			
			/*
			if ( $('#r9').children('.pic').size() >= 0 && $('#r10').children('.pic').size() >= 0 && $('#r11').children('.pic').size() >= 0 && $('#r12').children('.pic').size() >= 0 ) {
				if ( $('#r9').children('.pic').size() == 0 && $('#r10').children('.pic').size() == 0 && $('#r11').children('.pic').size() == 0 && $('#r12').children('.pic').size() == 0) ok=0;						
				else ok=1;
				if (ok==1) {
					var nochild9 = $('#r9').children('.pic').size();
					var heightr9 = $('#r9 .boxColumn').height();
					var heightr9big = heightr9 + 84;
					if (nochild9 == 0) {
						$('#r9 .boxColumn').css({'min-height':heightr9big})
					}
					
					var nochild10 = $('#r10').children('.pic').size();
					var heightr10 = $('#r10 .boxColumn').height();
					var heightr10big = heightr10 + 84;
					if (nochild10 == 0) {
						$('#r10 .boxColumn').css({'min-height':heightr10big})
					}
					
					var nochild11 = $('#r11').children('.pic').size();
					var heightr11 = $('#r11 .boxColumn').height();
					var heightr11big = heightr11 + 84;
					if (nochild11 == 0) {
						$('#r11 .boxColumn').css({'min-height':heightr11big})
					}
					
					var nochild12 = $('#r12').children('.pic').size();
					var heightr12 = $('#r12 .boxColumn').height();
					var heightr12big = heightr12 + 84;
					if (nochild12 == 0) {
						$('#r12 .boxColumn').css({'min-height':heightr12big})
					}
				}
				
			}
			*/
				columnLeftFix();
			  $("#gemKomenterButton").click(function () { 
				columnLeftFix ();
				});
		
		
	        // Accesibilitysalut
			$("input#low1, input#low2, input#low3").attr("checked", "true");
			
			
			$("input[name='text']").bind('click', 
	            function() {
		            $("input[name='text']").removeAttr('checked');
					$(this).attr("checked", "true");
	            }
	        );
			
			$('#stylePreview').click (
				
	            function() {
					var inpText = $("input[@name=text]:checked").val();
		            var inpKontrast = $("input[@name=kontrast]:checked").val();
		            var inpLine = $("input[@name=line]:checked").val();
					
					if (inpText =='low1' & inpKontrast =='low2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='low1' & inpKontrast =='normal2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='low1' & inpKontrast =='high2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='normal1' & inpKontrast =='low2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='high1' & inpKontrast =='low2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='normal1' & inpKontrast =='high2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='high1' & inpKontrast =='high2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='normal1' & inpKontrast =='normal2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='high1' & inpKontrast =='normal2' & inpLine =='low3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.3em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
						}
					if (inpText =='low1' & inpKontrast =='low2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='normal1' & inpKontrast =='low2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='high1' & inpKontrast =='low2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='low1' & inpKontrast =='normal2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='high1' & inpKontrast =='normal2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='low1' & inpKontrast =='high2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='normal1' & inpKontrast =='high2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='high1' & inpKontrast =='high2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='normal1' & inpKontrast =='normal2' & inpLine =='normal3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "1.4em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "1.4em" });
						}
					if (inpText =='low1' & inpKontrast =='low2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='low1' & inpKontrast =='normal2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='normal1' & inpKontrast =='low2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='high1' & inpKontrast =='low2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#464646" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='normal1' & inpKontrast =='normal2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='high1' & inpKontrast =='normal2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #fff" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='low1' & inpKontrast =='high2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "100%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='normal1' & inpKontrast =='high2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "110%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}
					if (inpText =='high1' & inpKontrast =='high2' & inpLine =='high3'){
						$('#rightBoxStyleTest').css({ "font-size": "120%", "color": "#000" , "background-color": "#fff", "border": "2px solid #000", "line-height": "2em" });
						$('#rightBoxStyleTest a').css({ "color": "#000" });
						$('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
						$('#rightBoxStyleTest p').css({ "line-height": "2em" });
						}					
	            }
			);
			
			$('#styleSwitcher ul li a').click( 
	            function() {
					$('#styleSwitcher ul li a').removeAttr('style');
		            $(this).css({ "text-decoration": "underline", "color": "#c30" });
	            }
	        ); 
			 
	        /*$('#low1').bind('click', 
	            function() {
		            $('#rightBoxStyleTest').css({ "font-size": "100%" });
	            }
	        );    	
	        $('#normal1').bind('click', 
	            function() {
		            $('#rightBoxStyleTest').css({ "font-size": "110%" });
	            }
	        );
    	
	        $('#high1').bind('click', 
	            function() {
		            $('#rightBoxStyleTest').css({ "font-size": "120%" });
	            }
	        );
    	
	        $('#low2').bind('click', 
	            function() {
		            $('#rightBoxStyleTest').css({ "color": "#464646", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1" });
	            }
	        );
    	
	        $('#normal2').bind('click', 
                function() {
	                $('#rightBoxStyleTest').css({ "color": "#000", "background-color": "#F4F4F0", "border": "2px solid #E7E6E1" });
	                $('#rightBoxStyleTest a').css({ "color": "#000" });
                }
	        );
    	
	        $('#high2').bind('click', function() {
		        $('#rightBoxStyleTest').css({ "background-color": "#fff", "border": "2px solid #000" });
		        $('#rightBoxStyleTest a').css({ "color": "#000" });
		        $('#rightBoxStyleTest h2').css({ "border-bottom": "1px solid #000" });
	        });
        	
	        $('#low3').bind('click', function() {
		        $('#rightBoxStyleTest').css({ "line-height": "1.3em" });
		        $('#rightBoxStyleTest p').css({ "line-height": "1.3em" });
	        });
        	
	        $('#normal3').bind('click', function() {
		        $('#rightBoxStyleTest').css({ "line-height": "1.7em" });
		        $('#rightBoxStyleTest p').css({ "line-height": "1.7em" });
	        });
        	
	        $('#high3').bind('click', function() {
		        $('#rightBoxStyleTest').css({ "line-height": "1.9em" });
		        $('#rightBoxStyleTest p').css({ "line-height": "1.9em" });
	        });*/
			
	       jQuery.fn.extend({
                check: function() {
                    return this.each(function() { this.checked = true; });
                },
                uncheck: function() {
                    return this.each(function() { this.checked = false; });
                   }
                });
                
            var inpText = readCookie('inpText');
            var inpKontrast = readCookie('inpKontrast');
            var inpLine = readCookie('inpLine');

            if (inpText != null && inpKontrast != null && inpLine != null){
            	$("#combineStyle input[@type=radio]").uncheck();
            	$("input[@id="+inpText+"]").check();
            	$("input[@id="+inpKontrast+"]").check();
            	$("input[@id="+inpLine+"]").check();
			}
            
	        $('#btnshowsample').click (
	            function() {
		            var inpText = $("input[@name=text]:checked").val();
		            var inpKontrast = $("input[@name=kontrast]:checked").val();
		            var inpLine = $("input[@name=line]:checked").val();
					
					if (inpText =='low1' & inpKontrast =='low2' & inpLine =='low3'){
						switchStylestyle('style1');
						}
					if (inpText =='low1' & inpKontrast =='normal2' & inpLine =='low3'){
						switchStylestyle('style2');
						}
					if (inpText =='low1' & inpKontrast =='high2' & inpLine =='low3'){
						switchStylestyle('style3');
						}
					if (inpText =='normal1' & inpKontrast =='low2' & inpLine =='low3'){
						switchStylestyle('style4');
						}
					if (inpText =='high1' & inpKontrast =='low2' & inpLine =='low3'){
						switchStylestyle('style5');
						}
					if (inpText =='normal1' & inpKontrast =='high2' & inpLine =='low3'){
						switchStylestyle('style6');
						}
					if (inpText =='high1' & inpKontrast =='high2' & inpLine =='low3'){
						switchStylestyle('style7');
						}
					if (inpText =='normal1' & inpKontrast =='normal2' & inpLine =='low3'){
						switchStylestyle('style8');
						}
					if (inpText =='high1' & inpKontrast =='normal2' & inpLine =='low3'){
						switchStylestyle('style9');
						}
					if (inpText =='low1' & inpKontrast =='low2' & inpLine =='normal3'){
						switchStylestyle('style10');
						}
					if (inpText =='normal1' & inpKontrast =='low2' & inpLine =='normal3'){
						switchStylestyle('style11');
						}
					if (inpText =='high1' & inpKontrast =='low2' & inpLine =='normal3'){
						switchStylestyle('style12');
						}
					if (inpText =='low1' & inpKontrast =='normal2' & inpLine =='normal3'){
						switchStylestyle('style13');
						}
					if (inpText =='high1' & inpKontrast =='normal2' & inpLine =='normal3'){
						switchStylestyle('style14');
						}
					if (inpText =='low1' & inpKontrast =='high2' & inpLine =='normal3'){
						switchStylestyle('style15');
						}
					if (inpText =='normal1' & inpKontrast =='high2' & inpLine =='normal3'){
						switchStylestyle('style16');
						}
					if (inpText =='high1' & inpKontrast =='high2' & inpLine =='normal3'){
						switchStylestyle('style17');
						}
					if (inpText =='normal1' & inpKontrast =='normal2' & inpLine =='normal3'){
						switchStylestyle('style18');
						}
					if (inpText =='low1' & inpKontrast =='low2' & inpLine =='high3'){
						switchStylestyle('style19');
						}
					if (inpText =='low1' & inpKontrast =='normal2' & inpLine =='high3'){
						switchStylestyle('style20');
						}
					if (inpText =='normal1' & inpKontrast =='low2' & inpLine =='high3'){
						switchStylestyle('style21');
						}
					if (inpText =='high1' & inpKontrast =='low2' & inpLine =='high3'){
						switchStylestyle('style22');
						}
					if (inpText =='normal1' & inpKontrast =='normal2' & inpLine =='high3'){
						switchStylestyle('style23');
						}
					if (inpText =='high1' & inpKontrast =='normal2' & inpLine =='high3'){
						switchStylestyle('style24');
						}
					if (inpText =='low1' & inpKontrast =='high2' & inpLine =='high3'){
						switchStylestyle('style25');
						}
					if (inpText =='normal1' & inpKontrast =='high2' & inpLine =='high3'){
						switchStylestyle('style26');
						}
					if (inpText =='high1' & inpKontrast =='high2' & inpLine =='high3'){
						switchStylestyle('style27');
						}
						
						
					/*
		            if (inpText == 'low1') {
			            if (inpKontrast =='low2')
			            	switchStylestyle('style1');
			            if (inpKontrast =='normal2')
			            	switchStylestyle('style2');
			            if (inpKontrast =='high2')
			            	switchStylestyle('style3');
		            }
            		
		            if (inpText == 'normal1') {
			            if (inpKontrast =='low2')
			            	switchStylestyle ('style4');
			            if (inpKontrast =='normal2')
			            	switchStylestyle ('style4');
			            if (inpKontrast =='high2')
			            	switchStylestyle ('style6');
		            }
            		
		            if (inpText == 'high1') {
			            if (inpKontrast =='low2')
			            	switchStylestyle ('style5');
			            if (inpKontrast =='normal2')
			            	switchStylestyle ('style5');
			            if (inpKontrast =='high2')
			            	switchStylestyle ('style6');
			            }
						*/
            	    createCookie('inpText', inpText, 365);
            		createCookie('inpKontrast', inpKontrast, 365);
            		createCookie('inpLine', inpLine, 365);				
	            }
	        );
			$('#btnDefault').click (
	            function() {
					$('#rightBoxStyleTest').removeAttr("style");
					$('#rightBoxStyleTest p').removeAttr("style");
					switchStylestyle('style1');	
					createCookie('inpText',"",-1);
					createCookie('inpKontrast',"",-1);
					createCookie('inpLine',"",-1);
					$("input#low1, input#low2, input#low3").removeAttr("checked");
					$("input#low1, input#low2, input#low3").attr("checked", "true");
				}
			);
			
			// User Box Search
			
			function populateSearchInfo () {
				  if ($('.searchBoxHeading .userBox').css('display') == 'none') {
				  	$('.searchBoxHeading .userBox').toggle();
				  }
				  var str = "";
				  
				  $('form#searchBoxParlamentariske .multi_selectSearch').each(function(){
					  var label2 = $('span.asLabel', $(this)).html();
					  str += "<strong>" + label2 + "</strong>";
				       $("input:checked + label", $(this)).each(function() {
					     str += "&bull; " + $(this).text() + "<br />";
                       }); 
					  $("div.userBoxRead").html(str);
					});
				  
				  
				  $('form#searchBoxParlamentariske select').each(function(){
					  var id = $(this).attr('id');
					  var label = $('label[for=' + id + ']').html();
					  str += "<strong>" + label + "</strong>";
					  $("option:selected", $(this)).each(function () {
							str += "&bull; " + $(this).text() + "<br />";
						  });
					  $("div.userBoxRead").html(str);
					});
				  
				  $('form#searchBoxParlamentariske .manualInput').each(function(){
					  if($("input", $(this)).val()!=''){
					   	var label1 = $(this).children('label').html();
					  	str += "<strong>" + label1 + "</strong>";
					     $("input", $(this)).each(function () {
							str += "&bull; " + $(this).val();
						  });
					  	$("div.userBoxRead").html(str);
					  }
					});
					
					$('form#searchBoxParlamentariske fieldset.searchCalendar').each(function(){
					 var legend = $(this).children('legend').html();
					  str += "<strong>" + legend + "</strong>";
				            $("input[type='text']",$(this)).each(function() {
					        str += "&bull; " + $(this).val() + "  ";
					  	});
					  $("div.userBoxRead").html(str);
				    });
				  $('form#searchBoxParlamentariske fieldset.radioOptions').each(function(){
					   var legend = $(this).children('legend').html();
					   str += "<strong>" + legend + "</strong>";
					        $("input:checked + label", $(this)).each(function() {
                            str += "&bull; " + $(this).text() + "<br />";
                       }); 
					   $("div.userBoxRead").html(str);
					});
				}


            function getQuery(){
                 var r = {};
                 var params = location.search.replace(/^\?/,'').split('&');
                 for( var i = params.length-1;  i >= 0;  i-- ) {
                        var p = params[i].split('='), key = p[0];
                        if( key ) r[key] = p[1];
                        }
                    return r; 
                 }
            $(document).ready(function(){
            //check the query string it the user click the button or not
              var str = getQuery()['btn'];
            // if the user click the button, populate the user selected box
              if(str == 1){
                populateSearchInfo();
              }
		    });
            
			$('form#searchBoxParlamentariske .multi_selectSearch input').click(function(){
			    populateSearchInfo();
			 
			});
			$('form#searchBoxParlamentariske select').change(function(){
			    populateSearchInfo();
			});
			$('form#searchBoxParlamentariske .manualInput input').keyup(function(){
			      populateSearchInfo();
			});
		
			$('form#searchBoxParlamentariske input#hidenCheckEnd').click(function(){
			    populateSearchInfo();
			});
			
			$('form#searchBoxParlamentariske input#hidenCheckStart').click(function(){
			    populateSearchInfo();
			});
			

			$('form#searchBoxParlamentariske .searchCalendar input').blur(function(){
			    populateSearchInfo();
			});
			$('form#searchBoxParlamentariske fieldset.radioOptions input').click(function(){
			    populateSearchInfo();
			});
				//.change();
		
	        $("#multiselect_1").focus(function(){
			    populateSearchInfo();
			});
			 $("#multiselect_2").focus(function(){
			    populateSearchInfo();
			});
			 $("#multiselect_3").focus(function(){
			    populateSearchInfo();
			});
			$("#multiselect_4").focus(function(){
			    populateSearchInfo();
			});
			$("#multiselect_5").focus(function(){
			    populateSearchInfo();
			});
			
			$("#multiselect_6").focus(function(){
			    populateSearchInfo();
			});
			
			$("#multiselect_7").focus(function(){
			    populateSearchInfo();
			});
			$('a.userBoxClose').click(function(){
				$('.userBox').toggle();
			});
			
		
			// Documenter fornt page boxes
			if($('#doku5')[0]){
			// dab removed all hardcoded styles	
				$('#doku5 .boxColumn:eq(0), #doku5 .boxColumn:eq(2)').equalHeight();
				$('#doku5 .boxColumn:eq(1), #doku5 .boxColumn:eq(3)').equalHeight();
				var dokuFirstBox = $('#doku5 .boxColumn:eq(0)').height();
				var dokuSecondBox = $('#doku5 .boxColumn:eq(2)').height();
				var dokuTwocolsBox = $('#doku5 .twoColumns .boxColumn').height();
				var dokuDoubleBox = dokuFirstBox + dokuSecondBox + 15; // dab this was giving us trbls in FF this one px diff
				var dokuDoubleDif = dokuTwocolsBox - dokuFirstBox - 15;
				
				if(dokuTwocolsBox < dokuDoubleBox){
					$('#doku5 .twoColumns .boxColumn').css({"height": dokuDoubleBox});
				} else {
					$('#doku5 .boxColumn:eq(1)').css({"height": dokuDoubleDif});
					$('#doku5 .boxColumn:eq(3)').css({"height": dokuDoubleDif});
				}
			}
			
			
			// Video Play Button
			setTimeout(playButtonPosition(),1000);

			
			
			
			
//	 ral blog calendar table       $('.calendarTable').find('a').parents('td').css({ "background-color": "#bbdde1" });	
	        
	        $('#btnDefault').click (
	            function() {
                    switchStylestyle('style1');			
	            }
	        );
			
			
			
			
	        }
			
			
			
        catch(e)
	    {
    	    //alert(e);
	    }
//------- dab campaign fixes ---------------------		 
	if(($.browser.msie && $.browser.version == 6) == false){
	    $(".campVertical .sp:eq(3)").after("<br/>");
	    $(".campVertical .sp:eq(4)").css("clear","left");
	    $(".campVerticalFive .sp:eq(4)").after("<br/>");
	    $(".campVerticalFive .sp:eq(5)").css("clear","left");
}
		 
		 
//------- ral adding accesskeys ---------------------
/*
$.shortaccesskey = {
  accesskeyArr: Array(),

  init: function () {
    var i = 0;
    $("a[@accesskey]").each (function() {
      $.shortaccesskey.accesskeyArr[i] = $(this).attr('accesskey');
      i++;
    });
  
    $(document).keypress($.shortaccesskey.handleKeyPress);
  
    $("input,textarea,select").focus(function() {
      $(document).unbind();
    });
  
    $("input,textarea,select").blur(function() {
      $(document).keypress($.shortaccesskey.handleKeyPress);
    });
  },

  handleKeyPress: function(e) {
    var e = e || window.event;
    //var k = e.charCode ? e.charCode : e.keyCode ? e.keyCode : e.which;
    //keyCode - IE , charCode - NS6+
    var k = e.charCode || e.keyCode || 0; 
    var keyPressed = String.fromCharCode(k);
    if ($.inArray(keyPressed, $.shortaccesskey.accesskeyArr) >= 0) {
      window.location = $("a[@accesskey="+keyPressed+"]").attr("href");
    }
  }
};

//function accesskey()
//{
//document.getElementById('search').accessKey="0";
//document.getElementById('aboutftdk').accessKey="1";
//document.getElementById('skip menu ? ').accessKey="2"; 
//document.getElementById('contact').accessKey="3";
//document.getElementById('sitemap').accessKey="4";
//document.getElementById('toHome').accessKey="5";
//}

//accesskey();

$.shortaccesskey.init();
*/
//
// start email protection 
$(".emailHolder").addClass("clearfix");
$(".emailHolder").hover(function () { 
      $(this).css({ cursor:"pointer;"});
},function () { 
     $("this").css({ cursor:"pointer;"});
});
$(".emailHolder").click(function () { 
	var em = $(this).children(".email1").html();
	var il = $(this).children(".email3").html();
	var email = em+"@"+il;
	javascript:location.href='mailto:'+email;

});
// end email protection 

 }
	
);


var cssFix = function(){

  var u = navigator.userAgent.toLowerCase(),

  is = function(t){return (u.indexOf(t)!=-1)};

  $("html").addClass([

    (!(/opera|webtv/i.test(u))&&/msie (\d)/.test(u))?('ie ie'+RegExp.$1)

      :is('firefox/2')?'gecko ff2'

      :is('firefox/3')?'gecko ff3'

      :is('iexplore/6')?'ie6'

      :is('iexplore/7')?'ie7'

      :is('chrome/')?'google'

      :is('gecko/')?'gecko'

      :is('opera/9')?'opera opera9':/opera (\d)/.test(u)?'opera opera'+RegExp.$1

      :is('konqueror')?'konqueror'

      :is('applewebkit/')?'webkit safari'

      :is('mozilla/')?'gecko':'',

    (is('x11')||is('linux'))?' linux'

      :is('mac')?' mac'

      :is('win')?' win':''

  ].join(''));

}();



