$('a[#wrapper]').click(function(){
	$('html,body').animate({scrollTop:0}, 500);
});

$.fn.amail = function(sAt,sDot,sRepl){

if (!sAt)
	sAt = '||';
	
if (!sDot)
	sDot = '|';

if (!sRepl)
	sRepl = 'NOSPAM';


this.each(function() {
				  
	el = $(this);
	var mail = el.text().replace(sAt,'@').replace(sDot,'.').replace(sRepl,'');
	el.each(function(){
	el.attr('href','mailto:' + mail);
	if(el.attr('title')){
		el.html(el.attr('title'));
	}else{
		el.html(mail);
		}
	});
});
};

$(document).ready(function(){
	$('.email').amail('(at)','(dot)');
	$("span.your-name input").DefaultValue("Your Name");
	$("span.your-email input").DefaultValue("Your Email");
	$("span.your-message textarea").DefaultValue("Your Message");
});

jQuery(document).ready(function($){
  if (navigator.platform == "iPad") return;
  jQuery("img").lazyload({
    effect:"fadeIn",
    placeholder: "http://nikorablin.com/wp-content/themes/nikorablin/images/grey.gif"
  });
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19452303-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
