﻿Cufon.replace('h1, h2.intro-page');
Cufon.replace('#sub1');
Cufon.replace('#language-changer a', { hover: { color: '#fee9ad'} });
Cufon.replace('#menu ul li a', { hover: { color: '#ffd695'} });
Cufon.replace('#menu-cz ul li a', { hover: { color: '#ffd695'} });

$(function()
{
	

	
	$('#content a:has(img)').mouseover(function() { $(this).css('border-bottom', 'none')});
	
    $('#menu ul li a[class!=active]').bind("mouseover mouseout", hoverHandler);
	$('#menu ul').mouseover(function() {$('#menu ul li a.active').stop(true).animate({backgroundColor:'#d49856'}, 400);});
	$('#menu ul').mouseout(function() {$('#menu ul li a.active').stop(true).animate({backgroundColor:'#bd6c32'}, 600);});
	
	$('#menu-cz ul li a[class!=active]').bind("mouseover mouseout", hoverHandler);
	$('#menu-cz ul').mouseover(function() {$('#menu-cz ul li a.active').stop(true).animate({backgroundColor:'#d49856'}, 400);});
	$('#menu-cz ul').mouseout(function() {$('#menu-cz ul li a.active').stop(true).animate({backgroundColor:'#bd6c32'}, 600);});


	$('#language-changer a').mouseover(function() {$(this).stop(true).animate({backgroundColor:'#2f5651'}, 400);});	
	$('#language-changer a').mouseout(function() {$(this).stop(true).animate({backgroundColor:'#406964'}, 600);});
	
	
	$('table.music-table tr td').fadeTo(0, 0.9);
	$('table.music-table tr td').mouseover(function() {$(this).stop(true).fadeTo(200, 1);});	
	$('table.music-table tr td').mouseout(function() {$(this).stop(true).fadeTo(400, 0.9);});
	
	$("a:has(img)[class!=forsale]").fancybox();
	
	$('div.news-list').click(news_list_click);
	$('div.news-list').mouseover(function() { $(this).stop(true).animate({backgroundColor:'#203a37'}, 400)});
	$('div.news-list').mouseout(function() { $(this).stop(true).animate({backgroundColor:'#304946'}, 600)});
		
	$('ul.pages').mouseout(function() { $('li a.active',this).css('border-bottom', 'none').stop(true).animate({backgroundColor:'#deb56f', color:'#5f3e1e'}, 400)});
	$('ul.pages').mouseover(function() { $('li a.active',this).css('border-bottom', 'none').stop(true).animate({backgroundColor:'#817c5a', color:'#304946'}, 400)});

	$('.pages li a[class!=active]').mouseover(function() { $(this).css('border-bottom', 'none').stop(true).animate({backgroundColor:'#deb56f', color:'#5f3e1e'}, 400)});
	$('.pages li a[class!=active]').mouseout(function() { $(this).css('border-bottom', 'none').stop(true).animate({backgroundColor:'#2d4542', color:'#bbad95'}, 600)});	
	
	$('#content a[class!=nofade] img').fadeTo(0, 0.8);
	$('#content a[class!=nofade] img').mouseover(function() {$(this).stop(true).fadeTo(200, 1);});	
	$('#content a[class!=nofade] img').mouseout(function() {$(this).stop(true).fadeTo(400, 0.8);});
	
	$('#content div.select-category ul').hide();
	$('#content div.select-category').mouseenter(function() {$('#content div.select-category div').stop(true).fadeTo(150, 0); $('#content div.select-category ul').stop(true, true).delay(100).slideDown(300);});	
	$('#content div.select-category ul').mouseleave(function() {$('#content div.select-category div').stop(true).delay(300).fadeTo(100, 1); $('#content div.select-category ul').stop(true, true).delay(100).slideUp(300);});	
	//$('#content div.select-category ul').mouseenter(function() {$('#content div.select-category ul').slideDown(600);});	
	$('#content div.select-category ul li a[class!=active]').mouseover(function() { $(this).stop(true).animate({backgroundColor:'#deb56f', color:'#41250a'}, 200)});
	$('#content div.select-category ul li a[class!=active]').mouseout(function() { $(this).stop(true).animate({backgroundColor:'#2d4542', color:'#ecca91'}, 400)});	


	// prvni novinka barevne
	$('div.news-list:first').css('backgroundColor','#c50905');
	$('div.news-list:first').mouseover(function() { $(this).stop(true).animate({backgroundColor:'#c50905'}, 400)});
	$('div.news-list:first').mouseout(function() { $(this).stop(true).animate({backgroundColor:'#c50905'}, 600)});

});


function news_list_click() {
	window.location = $('a', this).attr('href');
}

function hoverHandler(event)
{
    switch(event.type)
    {
        case 'mouseover':
            $(this)
                .stop(true)				
                .animate({backgroundColor:'#bd6c32'}, 200)
		break;

        case 'mouseout':
            $(this)	
				.stop(true)
                .animate({backgroundColor:'#e8bd74'}, 600)
        break;
    }
}
