jQuery.noConflict();
jQuery(document).ready(function($) {
	$(".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);
	});
	
	$("#pageTopImg").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);
		}
	});
	
});

function displayFlash(width,height,src) {
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"' + width + '\" height=\"' + height + '\">');
	document.write('<param name=\"movie\" value=\"' + src + '\" />');
	document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\" />');
	document.write('<param name=\"menu\" value=\"false\" />');
	document.write('<param name=\"quality\" value=\"best\" />');
	document.write('<param name=\"scale\" value=\"noscale\" />');
	document.write('<embed src=\"' + src + '\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"' + width + '\" height=\"' + height + '\"></embed>');
	document.write('</object>');
}

