﻿/// <reference path="jquery-1.6.1-vsdoc.js" />
/// <reference path="jquery-1.6.1.js" />

(function () {
	$(document).ready(function () {
		
		$("#images img").each(function () {
			var t = $(this);
			var id = t.attr("alt");
			t.bind("click", function () {
				$('#preview a img').attr('src', '/image/' + id + '/normal');
				$('#preview a').attr('href', '/image/' + id);
			});
		});


		(function (w, c) {
			(w[c] = w[c] || []).push(function () {
				try {
					w.yaCounter7673101 = new Ya.Metrika({ id: 7673101 });
				}
				catch (e) { }
			});
		})(window, 'yandex_metrika_callbacks');

		(function () {
			var ga = document.createElement('script');
			ga.type = 'text/javascript';
			ga.async = true;
			ga.src = '//mc.yandex.ru/metrika/watch.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	});
} ());
