
/* Document Ready */

$(document).ready(function() {


	$(".lightbox").lightbox();


        $("ul.sf-menu").supersubs({
            minWidth:    18,   // minimum width of sub-menus in em units
            maxWidth:    25,   // maximum width of sub-menus in em units
            delay: 0,
            speed: 'fast',
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over
                               // due to slight rounding differences and font-family
        }).superfish({
            delay:       50,
            animation:   {opacity:'show',height:'show'},
            speed:       100,
            autoArrows:  true,
            dropShadows: true
			});  // call supersubs first, then superfish, so that subs are
                         // not display:none when measuring. Call before initialising
                         // containing tabs for same reason.

			
	
	// Forsidebokser
		$('.columnContainer').hover(function(){
			var textHeight = $(this).find('.columnText').height();
			var textMargin = 170-textHeight;

			$(this).find('.columnText').animate({marginTop:textMargin - 10, width:'300px'},{queue:false,duration:300});
			$(this).find('.blueLine').animate({marginTop:textMargin - 10, height:textHeight + 10},{queue:false,duration:300});
			$(this).find('.whiteArrow').stop(false, true).fadeOut('200');
			
		}, function(){
			$(this).find('.columnText').animate({marginTop:'122px', width:'220px'},{queue:false,duration:300});
			$(this).find('.blueLine').animate({marginTop:'123px', height:'47px'},{queue:false,duration:300});
			$(this).find('.whiteArrow').stop(false, true).fadeIn('200');
		});
		
		

});
/* Document Ready Slutt*/



// Produkt-taber


$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content

//On Click Event
$("ul.tabs li").click(function() {

	$("ul.tabs li").removeClass("active"); //Remove any "active" class
	$(this).addClass("active"); //Add "active" class to selected tab
	$(".tab_content").hide(); //Hide all tab content

	var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
	$(activeTab).fadeIn(); //Fade in the active ID content
	return false;
});


/*$('#sitemap li').first().remove(); */

/** Cufon Font **/
Cufon.replace('.contentHeadline', { fontFamily: 'Futura Md' });
Cufon.replace('.medarbeider', { fontFamily: 'Futura Md' });




