/*
vn - внутренние
vnp - внутренние с .php
vne - внешние
vnetr - внешние с таргет бланком
vnw - внешние с www.
vnwtr - внешние с www. и таргетом
*/
$(document).ready(function(){
  $('.vn').each(function(i) {
    var url = $(this).attr('go');
    $(this).click(function() {
      $(this).attr('href',url);
    });
  });
  $('.vnp').each(function(i) {
    var url = $(this).attr('go');
    $(this).click(function() {
      $(this).attr('href',url+'.php');
    });
  });
  $('.vne').each(function(i) {
    var url = $(this).attr('go');
    $(this).click(function() {
      $(this).attr('href','http://'+url);
    });
  });
  $('.vnetr').each(function(i) {
    var url = $(this).attr('go');
    $(this).attr('target','_blank');
    $(this).click(function() {
      $(this).attr('href','http://'+url);
    });
  });
  $('.vnw').each(function(i) {
    var url = $(this).attr('go');
    $(this).click(function() {
      $(this).attr('href','http://www.'+url);
    });
  });
  $('.vnwtr').each(function(i) {
    var url = $(this).attr('go');
    $(this).attr('target','_blank');
    $(this).click(function() {
      $(this).attr('href','http://www.'+url);
    });
  });
  $('.vneru').each(function(i) {
    var url = $(this).attr('go');
    $(this).attr('target','_blank');
    $(this).click(function() {
      $(this).attr('href','http://'+url+'.ru');
    });
  });
});
