$('.text_prev').hide();
$('#circle_main').hide();


$(function(){
  var speed = 200; //  
//  $('#folio_prev_site') //     DIV,     
//    .find('div.odna_rabota') //   DIV
//      .wrap('<div class="outofimg"></div>') //     .outofimg
//      .parent()//   .outofimg
//      .hover(function(){ //      .outofimg,  
//	  $(this).find('.text_prev').animate({opacity:'show'},speed); //     
//        },function(){ //      .outofimg,  
//          $(this).find('.text_prev').animate({opacity:'hide'},speed); //     
//        })
//    .end();


  $('#folio_prev_site, #folio_prev_logo, #folio_prev_dis') 
    .find('div.odna_rabota') 
      .wrap('<div class="outofimg"></div>') 
      .parent()
      .hover(function(){ 
	  $(this).find('.text_prev').animate({opacity:'show'},speed); 
        },function(){ 
          $(this).find('.text_prev').animate({opacity:'hide'},speed); 
        })
    .end();
//  $('#folio_prev_dis') 
//    .find('div.odna_rabota') 
//      .wrap('<div class="outofimg"></div>') 
//      .parent()
//      .hover(function(){ 
//	  $(this).find('.text_prev').animate({opacity:'show'},speed); 
//        },function(){ 
//          $(this).find('.text_prev').animate({opacity:'hide'},speed); 
//        })
//    .end();

  $('#last_work') 
    .find('a') 
      .wrap('<div class="outofimg"></div>') 
      .parent()
      .hover(function(){ 
	  $(this).find('#circle_main').animate({opacity:'show'},speed); 
        },function(){ 
          $(this).find('#circle_main').animate({opacity:'hide'},speed); 
        })
    .end();
});

jQuery(document).ready(function(){
if ($('input[name="name:required"]').attr("value") == "") $('input[name="name:required"]').attr("value", "Имя")
if ($('input[name="phone:required"]').attr("value") == "") $('input[name="phone:required"]').attr("value", "Телефон")
if ($('input[name="email:required"]').attr("value") == "") $('input[name="email:required"]').attr("value", "E-mail")
if ($('textarea[name="text:required"]').attr("value") == "") $('textarea[name="text:required"]').attr("value", "Сообщение")
});


$('.circle').corner('140px');

