// JavaScript Document
$(document).ready(function(){
						   
	Cufon.replace('h1');
	Cufon.replace('h2');
	
	$('.selector .tab .line').click(function(){
		if ($(this).parent().find('.popup').is(":hidden")) {
			var newWidth = $(this).parents('.selector').width()-2;
			$(this).parent().find('.popup').css({ 'width':newWidth+'px' }).slideDown('fast');
		}
	});
	$('.selector .tab a.darr').click(function(){
		if ($(this).parent().find('.popup').is(":hidden")) {
			var newWidth = $(this).parents('.selector').width()-2;
			$(this).parent().find('.popup').css({ 'width':newWidth+'px' }).slideDown('fast');
		}
		return false;
	});
	$('.selector').mouseleave(function(){
		if ($(this).find('.popup').is(":visible")) {
			$(this).find('.popup').slideUp('fast');
		}
	});
	
	$('.elemVideoSm').each(function(){
		var newWidth = $('a img',this).width();
		$('a span.ttl',this).css({ 'width':newWidth+'px' });
	});
	
	$('ul.bull li a').hover(function(){
			$(this).parent().css({ 'background-position':'-156px 6px' });
		},function(){
			$(this).parent().css({ 'background-position':'4px 6px' });
		});
	
	if($('#carousel').length!=0) { $('#carousel').jCarouselLite({ btnNext: '#carouselHld a.bt-next', btnPrev: '#carouselHld a.bt-prev', visible: 5 }); }
	
});
