jQuery(document).ready(function($) {
	$("ul.thumb li").Zoomer({speedView:500, speedRemove:400, speedTitle:400, debug:false});
    $(".event").hover(
         function () {
                        $(this).children().children().css('color', '#3c3c3c');
                        $(this).css('cursor', 'pointer');
                        $(this).children().css('border-bottom', '1px solid #decfb3');
         },
         function () {
                        $(this).children().children().css('color', '#7c7d7f');
                        $(this).children().css('border-bottom', 'none');
         });

            $(".anons p").hover(
                    function () {
                        //$(this).css('text-decoration', 'underline');
                        $(this).children().children().css('color', '#3c3c3c');
                        $(this).css('cursor', 'pointer');
                        $(this).children().eq(0).css('border-bottom', '1px solid #decfb3');
                        //$(this).children().attr('src', 'i/arr-a.gif');
                        $(this).parent().parent().children().eq(0).css('color', '#3c3c3c');
                    },
                    function () {
                        //$(this).css('text-decoration', 'none');
                        $(this).children().children().css('color', '#7C7D7F');
                        $(this).children().eq(0).css('border-bottom', 'none');
                        //$(this).children().attr('src', 'i/arr-a.gif');
                        $(this).parent().parent().children().eq(0).css('color', '#B9985D');
                    });

            $(".qa a").click(function () {
                if($(this).parent().children().eq(1).hasClass('active')) {
                    $(this).css('color', '#ad8f63');
                    $(this).css('border-bottom', '1px dashed #ad8f63');
                    $(this).parent().children().eq(1).removeClass('active'); 
                }
                else {
                    $(this).parent().children().eq(1).addClass('active');
                    $(this).css('color', '#555');
                    $(this).css('border-bottom', 'none');
                }
                return false;
            });

            //DD_belatedPNG.fix('.png');
			
			function detectIE6(){
				var browser = navigator.appName;
				if (browser == "Microsoft Internet Explorer"){
				var b_version = navigator.appVersion;
				var re = /\MSIE\s+(\d\.\d\b)/;
				var res = b_version.match(re);
				if (res[1] <= 6){
				return true;
				}
				}
				return false;
			}
			
			if ( detectIE6() ){DD_belatedPNG.fix('.png');}

            $('a.img').colorbox();
			flowplayer("a.player", "/bitrix/templates/.default/swf/flowplayer-3.2.4.swf");
            
			$('.submit').click(function(){
				if ($(this).attr("form_id")){
					$("#"+$(this).attr("form_id")).submit();
				}else if ($(this).attr("form_name")){
					$("form[name='"+$(this).attr("form_name")+"']").submit();
				}			
				return false;
			})

		$('A.popup').each(function(){
			var vheight=$(this).attr("height");
			var vwidth=$(this).attr("width");	
			if (!vwidth)vwidth=800;
			if (!vheight)vheight=790;		
			$(this).popupWindow({ 
				resizable:1,
				centerScreen:1 ,
				height:vheight, 
				scrollbars:1,
				width: vwidth
				
			})
		})
		
	
		
		
		
});


		
		
	
	//это список	
	function hideShowList(id){
	$('#chapter' + id).toggle();  	
	} 
		
		
		
		
