$(function(){
	//top menu
	$('.topmenu ul').superfish();
	
	//Clear search input
	$('.search_input').focus(function(){ if($(this).val() == 'Søke ord her_') $(this).val(''); });
	$('.search_input').blur(function(){ if($(this).val() == '') $(this).val('Søke ord her_'); });
	
	
	//comments
	$('.comm_field').focus(function(){ 
		if(($(this).val() == 'Fornavn_') || ($(this).val() == 'Etternavn_')) $(this).val('');
	});
	$('.comments .comment textarea').focus(function(){
		if($(this).html() == 'Skriv din melding_') $(this).html(''); 
	});
	
	
	//Fonts
	Cufon.replace('.topmenu ul li a', {fontFamily:'aller', hover:true}); // ,fontStyle:'italic'
	Cufon.replace('h1', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.banner .banner_container .items .item .item_text .text', {fontFamily:'aller'});
	Cufon.replace('h2', {fontFamily:'aller'});
	Cufon.replace('.homepage_content .live_update .section_title', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.homepage_content .article_sortcuts .article_sortcuts_section_title', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.date .day', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.date .month', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.date .year', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.article .another_articles .title', {fontFamily:'american-typewritter-reg'});
	Cufon.replace('.sponsors .close_button', {fontFamily:'aller'});
	Cufon.replace('.article .another_articles .item .text h1', {fontFamily:'aller'});
	
	
    var bc = $('.buttonContainer');
    var $container = $('.banner_container .items').cycle({
        fx: 'fade',
        speed:1000,
        timeout:6000,
		pager: '.banner_container .nav',
		pagerAnchorBuilder: function(idx, slide) { //IT - custom navigation
			return '<a href="#">&nbsp;&nbsp;</a>'; 
		} 
    });
    
});


$(document).ready(function(){
	var contentHeight = $(".article_container").height();
	$(".article .logo").height(contentHeight);

	var contentHeight2 = $(".news_container").height();
	$(".news .logo").height(contentHeight2);
	
	var contentHeight3 = $(".contact_page").height();
	$(".article .logo").height(contentHeight3);
});


