<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script>
function short(url) {
document.getElementById("shortUrl").value = url;
};
</script>
<input type="text" id="shortUrl" />
<script src="http://shrt.org.ua/--?url=http://vk.com&s=goo.gl&callback=short"></script>
</body>
</html>
$("<img/>")
.load(function() { console.log("VK works"); })
.error(function() { console.log("VK closed"); })
.attr("src", "http://vk.com/images/camera_a.gif");