jQuery.noConflict();
jQuery(document).ready(function($) {

	$("#toTopBlock").html($("#toTopArea").html());

	$("#toTopImg").click(function() {
		if(navigator.appName.indexOf("Opera") < 0){
			$("html,body").animate({scrollTop: 0}, 400);
		}else if(navigator.appName.indexOf("Opera") >= 0){
			$("html").animate({scrollTop: 0}, 400);
		}
	});


	$(".fadeImg").mouseover(function() {
	  $(this).fadeTo(0, 0.7);
	});
	$(".fadeImg").mouseout(function() {
	  $(this).fadeTo(0, 1);
	});
	
	$(".swapImg").mouseover(function(){
		var filePath = $(this).attr("src");
		var fileDiv = filePath.split("/");
		var fileName = fileDiv[fileDiv.length - 1];
		var newFileDiv = fileName.split(".");
		var newFileName = newFileDiv[newFileDiv.length - 2] + "_on." + newFileDiv[newFileDiv.length - 1];
		var newFilePath = filePath.replace(fileName,newFileName);
		
		$(this).attr("src", newFilePath);
	});
	$(".swapImg").mouseout(function(){
		var oldFilePath = $(this).attr("src");
		var oldFileDiv = oldFilePath.split("/");
		var oldFileName = oldFileDiv[oldFileDiv.length - 1];
		var newFileDiv = oldFileName.split(".");
		var newFileName = newFileDiv[newFileDiv.length - 2].replace("_on",".") + newFileDiv[newFileDiv.length - 1];
		var newFilePath = oldFilePath.replace(oldFileName,newFileName);
		
		$(this).attr("src", newFilePath);
	});

});

