function replacer(str, p1) {
  return '<a href="'+p1+'">'+p1+'</a>';
}

function absPosition(obj) {
  var x = y = 0;
  while(obj) {
    x += obj.offsetLeft;
    y += obj.offsetTop;
    obj = obj.offsetParent;
  }
  return {x:x, y:y};
} 

var twitter=$(".view-webcast-block_1 span.field-content p");
var txt=twitter.html();
if (txt) {
  txt=txt.replace("allcorrect: ","");
  txt=txt.replace(/(http:[a-zA-Z0-9_\-\/?&\.]*)/g,replacer);
  twitter.html(txt);
}
$('.view-webcast-block_1').append('<div class="follow-us"><a href="http://twitter.com/allcorrect">Подружиться</a></div>');
if (String(document.location).indexOf('allcorrect.ru/en') >=0) {
//english
} else {
  $('#edit-search-block-form-1-wrapper label').html('Поиск по сайту');
  $('#search-form label').html('Поиск по сайту');  
  txt=$('.box h2').text();
  if (txt=='Your search yielded no results') {  
    $('.box h2').html('По вашему запросу ничего не найдено');
  }
}

$('#search-block-form .form-submit').replaceWith('<input type="image" id="edit-submit" name="op" src="/sites/all/themes/allcorrect/misc/go.png" height="26px" width="26px" alt="" />');




