var names = new[] { "n1", "n2", "n3" };
var descriptions = new[] { "d1", "d2", "d3" };
var companies = new[] { "c1", "c2", "c3" };
var products = Enumerable.Range(0, names.Length-1)
.Select(i => new Product { Name = names[i], Description = descriptions[i], Company = companies[i]})
.ToList();
var setLoc = function(loc) {
//curLoc = fixEncode(loc.replace(/#(\/|!)?/, ''));
curLoc = fixEncode(loc);
var l = (location.toString().match(/#(.*)/) || {})[1] || '';
if (!l && vk.al > 1) {
l = (location.pathname || '') + (location.search || '');
}
l = fixEncode(l);
if (l.replace(/^(\/|!)/, '') != curLoc) {
if (vk.al == 3) {
try {
history.pushState({}, '', '/' + curLoc);
return;
} catch(e) {}
}
window.chHashFlag = true;
location.hash = '#' + vk.navPrefix + curLoc;
if (withFrame && getLoc() != curLoc) {
setFrameContent(curLoc);
}
}
}