/* Selektory do przepisania
	Cufon.replace('h1, h2, h3, h4, h5, h6');
	.page-content li span.question, li > .question span.nr, .newSurveyView .survey-list > li.head - mogą być niepoprawne!
*/
var settings = '.page-content li span.question, li > .question span.nr, .newSurveyView .survey-list > li.head, .cfn, h1, .btn, .create-survey-box p, .btn-grey, .sform p.desc, .subtitle, .timer, .fluid-table thead, #introduction h2, .loginBlock .pxgap h4, .schemeMainGlowna .right h2, #our-clients h2, .how-to-use p.first, .main-nav > li, .sub-nav > li, .options-comparison tbody .basic, .options-comparison tbody .pro, .options-comparison tbody th, .progress, .survey-option-pro span.lb, .additional-packages .subtext, .choose-package-comparison, .entry-date';

/* Odpowiednie nagłówki */
Cufon.replace(settings);

/* Hovery */
Cufon.replace('#navigation a, .account',{
	hover: {
		color: '#ffffff'
	}
});

$(document).ready(function() {
	
	$('a.print').click(function(){
		window.print();
		return false;
	});
	
	$('.overlay-content').each(function(){
		$(this).css({
			'height' : $(this).height(),
			'margin-top' : -($(this).height()/2)
		});
	});

	setInterval("initChanges()",1000);
	
});

// Funkcja robiąca replace dla wszystkich elementów co 1000ms,
// ma olewać te obiekty, które mają już cufony.

function initChanges(){
	$('body').addClass('initChangesOn');

	$(settings).each(function(){
		if ($(this).contents('cufon').size() == 0){
			Cufon.replace($(this));
		}
	});
	
	/* Inne */
	$('.fluid-table .first-col').each(function(){
		if ( ($(this).text().length > 60) && ($(this).contents('span').size() == 0) ){
			$(this).wrapInner('<span />');
		}
	});
}



