$(document).ready(function(){

//вакансии
  $('a.opener').click(function(){
    $('div.subli',$(this).parent()).slideToggle('fast');
  });
  
  $('span.position').click(function(){
    var span = $(this);
    $('span.position').removeClass("activ");
    span.addClass("activ");
    var img = $('a.opener',span.parents('li.cont')).css('background-image');
    $('.w560 > *').fadeOut('fast').remove();
    $('<h2 class="title"></h2>').html($(this).text()).css('background-image', img).appendTo('.w560');
    $('div.pos_info',$(this).parent()).clone(true).appendTo('.w560');
    $('.w560 > *').fadeIn('fast');
  });

//Раскрытие информации  
  $("#formdocs").click(function(){$("#form-docs").toggle("slow");return false;});
  
//Менеджмент
 $("p.person_name span").click(function () {       
          $("p.person_biography span.more", $(this).parents()[2]).toggle();
          $("p.person_biography span.person_bio_end", $(this).parents()[2]).toggle();

        });
        $(".more").click(function() {
            $(this).hide().siblings("span.person_bio_end").show();
        });

// Продукция		
$(".select").change(function () {
	var link = $("option:selected", this).val();
	document.location.href = link;
}); 

//Ролик о технологии
  $(".mpop").click(function(){
    return hs.htmlExpand(this, {width: 710, wrapperClassName: 'no-footer no-titlebar', allowSizeReduction: false} )
  });
  
  

//Контакты
  $("input[name='submit']").click(function() {
            var options = {target:'#feedback', success: showResponse};
            if($('#feedback').valid()){$('#feedback').ajaxForm(options);}
          });
		  
//pageUp
	if (($(document).height()-$(window).height()) < 350){
		$("#pageup").hide();
	}

	$("#pageup").click(function(){
		
		$(window).scrollTop(270);
		return false;
	});
	
//garantiya Servis
	$(".hideText").hide();
	$(".garant h4").click(function(){
		$(this).next(".hideText").toggle();
	});
	
//cup
	$(".cup").live("hover",function(){
		$(".cup a span").toggle("slow");
	});
		  
});

	function showResponse(responseText, statusText, xhr, $form) { 
	$('#feedback').html(responseText);
	};


