$(document).ready(function() {
									
	$(".rollover").hover(function() {
		$('img', this).attr('src', $('img', this).attr('src').replace(/\./g, "_h."));
	}, function() {
		$('img', this).attr('src', $('img', this).attr('src').replace(/\_h/g, ""));
	});
	
	$(".sbar img").hover(function() {
		$(this).attr('src', $(this).attr('src').replace(/\./g, "_h."));
	}, function() {
		$(this).attr('src', $(this).attr('src').replace(/\_h/g, ""));
	});
	
	$(".over").hover(function() { $(this).addClass('hover'); }, function() { $(this).removeClass('hover'); })
	$(".top img").click(function() { $("html, body").animate({ scrollTop: 0 }, 'slow'); });
	
	if($(document).fancybox) {
		$(".mlist a").fancybox({
			'width'				: 600,
			'height'			: 400,
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
		$(".video").fancybox({
			'width'				: 300,
			'height'			: 250,
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
		$(".taiimg a").fancybox();
	}
	
	$("img#bg").click(function() {
		$(".cont, .content, .cont table").css({'font-size': '14px'});
	});
	$("img#sm").click(function() {
		$(".cont, .content, .cont table").css({'font-size': '12px'});
	});
	
	$(".formnav input").hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
});

function resets(form) {
	$(':input', form).not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
}

function swf(m, d, w, h, p) {
	var sw = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+w+'" height="'+h+'" align="middle">';
	sw += '<param name="allowScriptAccess" value="sameDomain" />'; sw += '<param name="wmode" value="transparent" />';
	sw += '<param name="movie" value="'+m+'" />'; sw += '<param name="quality" value="high" />';
	sw += '<param name="menu" value="false" />'; sw += '<param name="Flashvars" value="'+p+'" />'; 
	sw += '<embed src="'+m+'" wmode="transparent" menu="false" align="middle" quality="high" '; sw += 'Flashvars="'+p+'" '; 
	sw += 'width="'+w+'" height="'+h+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	$("#" + d).html(sw);
}
