


$(document).ready(function(){

// верхнее меню

    $('.topmenu ul li').hover(
        function() {
            $(this).addClass("active");
            $(this).find('ul').stop(true, true);
            $(this).find('ul').show();
        },
        function() {
            $(this).removeClass("active");
            $(this).find('ul').hide('');
        }
    );



// окно поиска

		$('#find').click(function() {           
			$('#find_field').focus();
		} );                 
		
		$('#find_field').focus(function() {           
			$('#find').hide();
		} );                                            

// параметры поиска		
		
		$('#ptoggle').click(function() {           
			$('#params').slideToggle();
		} );   		
		
// tabs
		
    var tabContainers = $('div.tabs > div'); // получаем массив контейнеров
    tabContainers.hide().filter(':first').show(); // прячем все, кроме первого
    // далее обрабатывается клик по вкладке
    $('div.tabs ul.tabNavigation a').click(function () {
        tabContainers.hide(); // прячем все табы
        tabContainers.filter(this.hash).show(); // показываем содержимое текущего
        $('div.tabs ul.tabNavigation a').removeClass('selected'); // у всех убираем класс 'selected'
        $(this).addClass('selected'); // текушей вкладке добавляем класс 'selected'
        return false;
    }).filter(':first').click();

// подсветка в новостях

		$('.announce').mouseenter(function() {           
			$(this).css( "border", "1px dotted #4c4c4c" );
		} );                                             
		
		$('.announce').mouseleave(function() {
			$(this).css( "border", "1px solid #111" );
		} );    

// scroll bars 


       $('.scroll-pane').jScrollPane();

		
// лайтбоксы		


			$("a.zoom").fancybox();

			$("a.itemPre").fancybox({
                 'padding' : '1',
                 'width' : 910,
                 'height' : 462,
                 'scrolling' : 'no',
                 'type'	: 'iframe'


            });

			$("a.zoom1").fancybox({
				'overlayOpacity'	:	0.7,
				'overlayColor'		:	'#FFF'
			});

			$("a.zoom2").fancybox({
				'zoomSpeedIn'		:	500,
				'zoomSpeedOut'		:	500
			});
	
// каруселько
		
		    $(".anyClass").jCarouselLite({
		        btnNext: ".next",
		        btnPrev: ".prev"
		    });
		
		    $(".anyClassLogo").jCarouselLite({
		        btnNext: ".next",
		        btnPrev: ".prev",
		        visible:9, 
                auto:5000,
                scroll:3,
		        speed:1000
		    });

// add to cart		

	$("#bm").click(function () {
    	  $(this).effect("transfer", { to: $("#cart") }, 1000);
	});

// rating in item.php

// архив
	
	$(".accordion h3:first").addClass("active");
	$(".accordion p:not(:first)").hide();
 
	$(".accordion h3").click(function(){
		$(this).next("p").toggle("")
		.siblings("p:visible").hide("");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});



		$("#slider").easySlider({
			auto: true,
			continuous: true,
			pause: 6000,
			speed: 800,
			prevId: 'prevBtn1',
			nextId: 'nextBtn1',
			prevText:	'',
			nextText:	''
		});
	

	
		$("#slider2").easySlider({
			vertical: true, 
			continuous: true,
			pause: 6000,
			speed: 800,
			prevId: 'prevBtn2',
			nextId: 'nextBtn2',
			prevText:	'',
			nextText:	'',
			controlsShow:	false
		});


});	//$(document).ready	





























