jQuery(function() {
if (window.location.pathname === '/lechenie-narkomanii.html' || window.location.pathname === '/vazhno-znat.html') {
jQuery(".contentwidthr").attr("style","width: 100% !important");
}
});
var status, ok;
$(function() {
$(document).on('click', '.filter', function() {
if($(this).data('status') != undefined)
window.status = $(this).data('status');
if($(this).data('okay') != undefined)
window.ok = $(this).data('okay');
var template = $("#posts").html();
$.ajax({
type: "POST",
url: "/filter",
data: {
"status": window.status,
"ok": window.ok
},
success: function(result) {
$(".posts").html(_.template(template,{ result:result }));
}
});
});
$(document).on('click', '#loadmore', function() {
var template = $("#posts").html();
$.ajax({
type: "POST",
url: "/filter",
data: {
"status": window.status,
"ok": window.ok
},
success: function(result) {
$(".posts").append(_.template(template,{ result:result }));
}
});
});
});
function rower() {
var x=document.getElementsByTagName("input");
var summa=document.getElementById('summa');
var msg='';
var price=0;
summa.textContent='';
for (var i = 0 ;i<x.length; i++) {
if (x[i].checked) {
msg +=x[i].name;
price +=parseInt(x[i].value);
summa.textContent= msg+ '=' + price;
}
}
}
$({numberValue: tokarma-1}).stop();
var tokarma=23;
var maxkarma=100;
$({numberValue: tokarma-1}).animate({numberValue: maxkarma}, {
duration: (maxkarma-tokarma)*60000,
easing: 'linear',
step: function() {
$('#karma1').text(Math.ceil(this.numberValue)+' / '+maxkarma);
}
});