// JavaScript Document

$(document).ready(function() {
	$("#poplink1").click(function(event){
		if($.browser.msie){
			$("#dim").show();
	   	}else{
			$("#dim").fadeIn();
	   	}
		$('#popup1').animate({"top":[50,"swing"]},1000);
	});
	$("#popup1close").click(function(event){
		$('#popup1').animate({"top":[-855,"swing"]},1000);
		if($.browser.msie){
			$("#dim").hide();
	   	}else{
			$("#dim").fadeOut();
	   	}
	});
	$("#poplink2a").click(function(event){
		if($.browser.msie){
			$("#dim").show();
	   	}else{
			$("#dim").fadeIn();
	   	}
		$('#popup2').animate({"top":[158,"swing"]},1000);
	});
	$("#poplink2b").click(function(event){
		if($.browser.msie){
			$("#dim").show();
	   	}else{
			$("#dim").fadeIn();
	   	}
		$('#popup2').animate({"top":[158,"swing"]},1000);
	});
	$("#popup2close").click(function(event){
		$('#popup2').animate({"top":[-720,"swing"]},1000);
	if($.browser.msie){
			$("#dim").hide();
	   	}else{
			$("#dim").fadeOut();
	   	}
	});
	$("#popupswap1").click(function(event){
		$('#popup1').animate({"top":[-855,"swing"]},1000);
		$('#popup2').animate({"top":[158,"swing"]},1000);
	});
	$("#popupswap2").click(function(event){
		$('#popup2').animate({"top":[-720,"swing"]},1000);
		$('#popup1').animate({"top":[50,"swing"]},1000);		
	});
	$('.slideshow').cycle({
		fx: 'fade',
		timeout: 6000
	});
	$('.slideshow2').cycle({
		fx: 'scrollLeft',
		timeout: 6000
	});
	$("#marquee").marquee();
});
