// we've got to preload hovered-state images by script, because normally they would by downloaded just when user points the cursor over
// some menu position, and this will cause a little blink - time between hover and image being fully downloaded, we don't want this to happen
$(document).ready(function(){
	preloader.add([
		'static/img/static_pages/menu-1-active.png',
		'static/img/static_pages/menu-2-active.png',
		'static/img/static_pages/menu-3-active.png',
		'static/img/static_pages/menu-4-active.png',
		'static/img/static_pages/menu-5-active.png',
		'static/img/static_pages/menu-6-active.png',
		'static/img/static_pages/menu-7-active.png',
		'static/img/static_pages/menu-8-active.png',
        'static/img/static_pages/menu-9-active.png',
	]);

	Cufon.replace('h1:not(.clean)' , {fontFamily: 'Museo 700', letterSpacing : '-2px'});
	Cufon.replace('h2:not(.clean)' , {fontFamily: 'Museo 500', letterSpacing : '-1px'});
	Cufon.replace('.pricing-table-left-header-title, .pricing-table-left-header.short-title' , {fontFamily: 'Museo 500', letterSpacing : '-1px'});
	Cufon.replace('#secondary-inside h2' , {fontFamily: 'Museo 700', letterSpacing : '-1px'});
	Cufon.replace('#scenios-u-inside h2' , {fontFamily: 'Museo 700', letterSpacing : '-2px'});
	Cufon.replace('h3:not(.clean)' , {fontFamily: 'Museo 700', letterSpacing : '-1px'});
	$('.'+active_page+'-link').addClass('active');

    $('input[type=text],input[type=checkbox],input[type=radio],input[type=password],textarea,select').filter(':visible:first').focus();
});

$(window).load(function() {
	Cufon.refresh();
    positionFooter();
});

$(window).resize(function() {
    positionFooter();
});

