var timer = null, menuTimer = null
changeTab = function() {
	var el = $('#recomended li.active').eq(0);
	var next = el.next().length ? el.next() : el.parent().children('li:first-child')
	next.find('a').click()
}

$(document).ready(function(){
	timer = window.setTimeout('changeTab()', 10000)

	$('#recomended li a').click(function(){
		window.clearTimeout(timer);
		timer = window.setTimeout('changeTab()', 10000)
	})


	$('.logos .slider').jCarouselLite({
		circular: true,
        btnNext: ".next",
        btnPrev: ".prev",
		auto: 1,
		speed: 3200,
		visible: 4,
		easing: "linear"
    });
	$('#menu .dropdown_menu>li').mouseover(function(){
		window.clearTimeout(menuTimer);
		$('#menu .dropdown_menu>li').removeClass('hover')
		$(this).addClass('hover')
	})
	$('#menu .dropdown_menu>li').mouseout(function(){
		menuTimer = window.setTimeout("$('#menu .dropdown_menu>li').removeClass('hover')", 1000)
	})




    /*
     * elementy show-hide dodane w tiny
     */
    $('div.showhide .sh_title').click(function(){
        $(this).parents('div.showhide').children('.sh_content').toggle();
    });
    
})

