/*
Designed by VReplay (2011)
http://vreplay.com/
*/

function evalice_f_one() {
function filterPath(string) {
return string
.replace(/^\//,'')
.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
.replace(/\/$/,'');
}
var locationPath = filterPath(location.pathname);
var scrollElement = 'html, body';
$('html, body').each(function () {
var initScrollTop = $(this).attr('scrollTop');
$(this).attr('scrollTop', initScrollTop + 1);
if ($(this).attr('scrollTop') == initScrollTop + 1) {
scrollElement = this.nodeName.toLowerCase();
$(this).attr('scrollTop', initScrollTop);
return false;
}
});

$('a[href*=#]:not(.no-smsc)').each(function() {
var thisPath = filterPath(this.pathname) || locationPath;
if (locationPath == thisPath
&& (location.hostname == this.hostname || !this.hostname)
&& this.hash.replace(/#/, '')
&& (location.search == this.search)
) {
if ($(this.hash).length) {
$(this).click(function(event) {
var targetOffset = $(this.hash).offset().top;
var target = this.hash;
event.preventDefault();
$(scrollElement).animate(
{scrollTop: targetOffset},
500,
function() {
location.hash = target;
});
});
}
}
});



$('#go_c_a').click(function() {
	$(scrollElement).stop().animate({scrollTop: $('div.articleRight').offset().top}, 500);
	return false;
});

$('#askOpen').click(function() {
	if ($('#questions').height() == '0') $(scrollElement).stop().animate({scrollTop: $('#askOpen').offset().top}, 500);
});

}

$(document).ready(evalice_f_one);

