$(document).ready(function() {
	var curmenu = $('#mainmenu li.active li.active').text();
	$('#sideMenu li:contains('+curmenu+')').addClass('active');				   
	
	$('#sideMenu li li:first').addClass('first');
	
	$('.introBoxes .box').css('cursor', 'pointer')
	.click(function() {
		document.location.href = $(this).find('h3 a').attr('href');
	});
	
	//wyszukiwarka
	$('form.newsletter input.text').focus(function() {
		if ($(this).val() == 'Adres e-mail...') $(this).val('');
	}).blur(function() {
		if ($(this).val() == '') $(this).val('Adres e-mail...');							  
	});
	
	$('table').find('tr:last').addClass('last');
	$('tr').find('td:last').addClass('last');
	
	$('#mainmenu ul li ul').find('li:last').addClass('last');
	
	//pngFix dla IE
	$(document).pngFix();
});

function popupScroll( strLink, intWidth, intHeight )
{
	if ( intWidth > 0 && intHeight > 0 )
	{
		window.open( strLink, '', 'width='+intWidth+', height='+intHeight+', left=300px, top=100px, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes, status=no' );
	}	
}

//sIFR
var mp = { src: '/templates/testnaraka/sifr/myriadpro3.swf' };
sIFR.useStyleCheck = true;
sIFR.activate();
sIFR.replace(mp, {
	selector: '#content h1'
	,css: {
      '.sIFR-root': { 'color': '#696969', 'font-weight': 'bold'}
    },
	wmode: 'transparent'
});

sIFR.replace(mp, {
	selector: 'h3.introText'
	,css: {
      '.sIFR-root': { 'color': '#696969', 'font-weight': 'normal'}
    },
	wmode: 'transparent'
});



sIFR.replace(mp, {
	selector: '#sidebar h3 a'
	,css: {
      '.sIFR-root': { 'color': '#FB6EA2', 'font-weight': 'bold'}
    },
	wmode: 'transparent'
});

sIFR.replace(mp, {
	selector: '#sidebar h3'
    ,css: [
      'a { text-decoration: none;color:#FB6EA2;font-weight:bold; }'
      ,'a:link { color: #313639; }'
      ,'a:hover { color:#FB6EA2;text-decoration:underline; }'
    ]
	,wmode: 'transparent'
});




/* the next line is an example of how you can override default options globally (currently commented out) ... */
 // $.fn.cluetip.defaults.tracking = true;
// $.fn.cluetip.defaults.debug = true;
$(document).ready(function() {
  $('a.tooltip_title').cluetip({ width: '350px', splitTitle: '|'});
});

//unrelated to clueTip -- just for the demo page...

$(document).ready(function() {
  $('div.html, div.jquery').next().css('display', 'none').end().click(function() {
    $(this).next().toggle('fast');
  });
  
  $('a.false').click(function() {
    return false;
  });
});






function highlight(id) {
	var totalLinks = document.getElementById('totalLinks').getElementsByTagName('li').length;
		
	for (i=1; i<totalLinks; i++) {
		document.getElementById('faq' + i).className = '';

	}
	
	document.getElementById('faq' + id).className = 'activeFaq';

}
