$(document).ready(function(){
    
    $("div.product_modules").hide();
    $("div.news_content").hide();

    $("ul.news_list li a").toggle(function(){
  		$(this).next("ul.news_list li div.news_content").slideDown(1000);
  		$(this).parent().toggleClass("active");
   	}, function(){
  		$(this).next("ul.news_list li div.news_content").slideUp(800);
  		$(this).parent().toggleClass("active");
   	});
});

$(function() {
    
    if ($("form#form_demo").length > 0)
        $("form#form_demo").validate();  
    
//flash
	$("#flash").flash({
		src: 'swf/top.swf',
		id: 'top_flash',
		wmode: 'transparent',
		width: 960,
		height: 210 },
        { version: 8 }
    );
    
});


function shProduct(obj, element) {
    
    if ($("#product"+obj).is(':hidden'))
    {
        $("#product"+obj).slideDown(1000);

        $(element).fadeOut(200,function(){
            $(element).addClass('active').html('hide area\'s modules').fadeIn(200);
        });
    }
    else
    {
        $("#product"+obj).slideUp(800);
        $(element).fadeOut(200,function(){
            $(element).removeClass('active').html('show area\'s modules').fadeIn(200);
        });
    }
}
