function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}

jQuery.easing.quart = function (x, t, b, c, d) {  
    return -c * ((t=t/d-1)*t*t*t - 1) + b;  
}; 

jQuery(document).ready(function(){  
    jQuery('a[href*=#]').click(function() {  
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {  
            var $target = jQuery(this.hash);  
            $target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');  
            if ($target.length) {  
                var targetOffset = $target.offset().top;  
                jQuery('html,body').animate({ scrollTop: targetOffset }, 1500, 'easeOutQuart');  
                return false;  
            }  
        }  
    });  
  
});

function mailto_link(){
	$('.mailtoLink').click(function(){
		var str = String.fromCharCode(109,97,105,108,116,111,58,105,110,102,111,64,105,110,102,99,117,114,105,111,110,46,99,111,109);
		$('.mailtoLink').attr("href",str);
	})
};
