/*
 * Tele2 Annual Report custom jQuery
 */
var $j=jQuery.noConflict();
$j(document).ready(function(){
	//footer
	$j(".footerContent .footerSection:first-child ").addClass("first")
	$j(".footerContent .footerSection:nth-last-child(2) ").addClass("last")
	//Rightcontent h2 border top
	$j(".rightContentWrap h2:first").addClass("first")
	//Marginal under h1 på ordlistesidan
	$j("h1+div").addClass("top-margin")
 	// Döljer sökdiven initialt
	$j('#slideSearch').hide();
	// shows the slideSearch DIV on clicking the link with an Class of "navigationSearchSubmit"
	$j('.navigationSearchSubmit').click(function() {
		$j('#slideSearch').slideDown(800);
		return false;
	});
	// Döljer sökDiven vid klick
	$j('.hideme').click(function() {
		$j('#slideSearch').slideUp('slow');
		return false;
	});
	//end search
	NoCufon()
	FixTable();
	Paging();
	HighSlide();
	
	// START Board of directors/executives
	$(function() {
		// setup ul.tabs to work as tabs for each div directly under div.panes
		$("ul.tabs").tabs("div.panes > div", {
			/* tabs configuration goes here */
			effect: 'fade',
			fadeInSpeed:'500',
			history:'true'
		});
	});
	// END Board of directors/executives

});

function HighSlide()
{
	$j(".rounded-white.table-hs tbody tr:last").prev().addClass("border-lr"); 
}
function NoCufon()
{
	$j(".rightColumn h3 ").addClass("noCufon");
	$j(".mainContent h3 ").addClass("noCufon");
	$j(".mainContent h4 ").addClass("noCufon");
	$j("#slideSearch h4 ").addClass("noCufon");
}
function FixTable()
{
	$j("table tbody tr:even ").addClass("odd");
	$j("table tr:first-child ").addClass("first");
	$j("table tr td:first-child ").addClass("first");
	$j("table tr td:last-child ").addClass("last");
	$j("table tr th:first-child ").addClass("first");
	$j("table tr th:last-child ").addClass("last");
	$j("table+ol").addClass("legend");
	$j(".glossary").parent().addClass("glossary-wrapper");
}
function Glossary()
{
	$j(".glossary").parent().addClass("glossary-wrapper");
}
function Paging()
{
	$j(".pagingContainer ul li:first-child").addClass("first");
	$j(".pagingContainer ul li:last-child").addClass("last");
}
function FixHeaders()
{
	Cufon.replace("h1[class!=noCufon], h2[class!=noCufon]", { fontFamily: "boton" });
}

