$(document).ready(function() 
{
    $('.slideshow').cycle({
        fx: 'fade',
        timeout: 6000,
        speed: 1000
    });
});
$(document).ready(function()
{
    $("img").fullsize({forceTitleBar: false, zoomInSpeed: 500, zoomOutSpeed: 200});

    $(".slogan").text("У Нас - Фасадные системы");
    $(".slogan").animate({marginLeft: "0px"},1000);

    setTimeout(function(){
        $(".slogan").fadeOut(1000);
    },7000);

    setTimeout(function(){
        $(".slogan").text("У вас - Готовая Кухня");
        $(".slogan").fadeIn(1000);
    },8000);

    setInterval(function(){

        $(".slogan").fadeOut(1000);

        setTimeout(function(){
            $(".slogan").text("У Нас - Фасадные системы");
            $(".slogan").fadeIn(1000);
        },1000);
    
        setTimeout(function(){
            $(".slogan").fadeOut(1000);
        },7000);
    
        setTimeout(function(){
            $(".slogan").text("У вас - Готовая Кухня");
            $(".slogan").fadeIn(1000);
        },8000);
        
    },16000);

    $("ul.top_catalog li .l1").click(function(){
//	$(this).parent("li").find("ul").slideToggle(500);
    });

    $("ul.top_catalog li .l1").hover(function(){
	$(this).css("color","#fb5717");
    },function(){
	$(this).css("color","#2d364a");
    });

    $(".cat_item2").hover(function(){
	$(".cat_item2").animate({opacity:0.6},150)
	$(this).stop().animate({opacity:1},500);
    },function(){
	$(this).animate({opacity:0.6},300);
    });

    $("#catalog").hover(function(){
    },function(){
	$(".cat_item2").stop().animate({opacity:1},300)
    });


    $(".show_more").click(function(){
	$(".more_info").slideToggle();
	$(this).slideToggle();
    });

				//hover states on the static widgets
    $('.icon_close').hover(
	function() { $(this).addClass('ui-state-hover'); }, 
	function() { $(this).removeClass('ui-state-hover'); }
    );
    $('.icon_close').click(function(){
	$('.cabinet_info').slideToggle();
    });
    $("#add_order,#add_pos,#order_complete,#btnMessage,#submit1,#submit2,#submit3,#add_preview").button();

    $("#map_but").hover(function(){
	$(this).css("background-position","-25px 0px");
    },function(){
	$(this).css("background-position","0px top");
    });
    $("#feed_but").hover(function(){
	$(this).css("background-position","-28px 1px");
    },function(){
	$(this).css("background-position","0px top");
    });
});
