$(document).ready(function(){
	$('.subscribe .text').blur(function() {
		if(this.value=='') {this.value=this.defaultValue; this.className='text';}
	});
	$('.subscribe .text').focus(function() {
		if(this.value==this.defaultValue) {this.value=''; this.className='active-text';}
	});
	
	hoverit();
	
	$('.tabs a').click(function(){
		sizee = $(this).parent().prevAll().size();
		$('.bl').hide();
		$('.bl:eq('+sizee+')').show();
		$('.tabs li').removeClass('active');
		$(this).parent().addClass('active');
		return false
	});	
	
	$('li.blocked a').click(function(){
		return false
	});
			
	try {
		if (FlashDetect.major < 10) { // меняем циферку для разных версий флеша
			$('.box').html('<div class="no-flash"><p>Внимание!<br/>Для работы с сайтом необходимо установить Adobe Flash Player 10!<br/><span>Установить Flash Player 10 &mdash; <a href="http://get.adobe.com/flashplayer/">http://get.adobe.com/flashplayer/</a></span></p></div>');
		}
		else {
			$('.box').html('<img src="/design/i/box.jpg" alt="Сделать аватар" title="Сделать аватар" /><div class="b-1"></div><div class="b-2"></div><div class="make-avatar"><a href="/load" title="Сделать аватар"><img src="/design/i/make-avatar.gif" class="hovered" alt="Сделать аватар" title="Сделать аватар" /></a></div><div class="try-avatar"><a href="/maketest" title="Сделать пробный аватар"><img src="/design/i/try-avatar.gif" class="hovered" alt="Сделать пробный аватар" title="Сделать пробный аватар" /></a></div>')
			hoverit();
		}
    }catch(e){;}
		
	
});


function hoverit() {
$('img.hovered').hover(function(){
	defsrc = $(this).attr('src');
	imgsrc = $(this).attr('src').substr(0, $(this).attr('src').length - 4);
	$(this).attr('src',imgsrc+'-hover.gif');
},function(){
	$(this).attr('src',defsrc);
});
}

