$(document).ready(function($){
	//$("img[@src$=png]").pngfix();
	initRollOverImages();
	setbuffer();
	setDisableRightClick();
});

function initRollOverImages() {  
	var image_cache = new Object();  
	$(".ro a img").not("[@src*='_on.']").each(function(i) {  
		var imgsrc = this.src;  
		var dot = this.src.lastIndexOf('.');  
		var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);  
		image_cache[this.src] = new Image();  
		image_cache[this.src].src = imgsrc_on;  
		$(this).hover(  
			function() { this.src = imgsrc_on; },  
			function() { this.src = imgsrc; }  
		);  
	});  
}  

$(function() {
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var sclpos = 0;
				var scldurat = 800;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
});


function setbuffer(){
	$('body').append("<p id='buffer'>&nbsp;</p>");
}


function setDisableRightClick(){
	$(".disableRightClick img").bind("contextmenu",function(event){
		return false;
	});
}




