// JavaScript Document
function setFooterDate() {
	var footDiv = document.getElementById('footerCR');
	var yr=new Date();
	footDiv.innerHTML = '&copy; ' + yr.getFullYear() + ' Irving Hispanic Chamber of Commerce.  All Rights Reserved.'
}
function addButtonsForHome() {
	$('.dropdown').each(function () {
		$(this).parent().eq(0).hover(function () {
			$(this).css('backgroundColor','#F4B677')
			$('.dropdown:eq(0)', this).show();
		}, function () {
			$(this).css('backgroundColor','transparent')
			$('.dropdown:eq(0)', this).hide();
		});
	});
	$('#adWrapper img').click(function () {
		var adPop = $(this).attr('alt');
		window.open(adPop);
	});
	$('#sponsorWrapper img').click(function () {
		var sponsorPop = $(this).attr('alt');
		window.open(sponsorPop);
	});
	$('#galleryFooter').click(function () {
		window.location = "nae_photogallery.html";
	});
	/*
	$('#newsFooter').click(function () {
		window.location = "http://www.spiralbit.com";
	});
	*/		
}
function getFlashRef() {
	var flashvars={};
	var params={};
	params.menu = "false";
	params.wmode = "transparent";
	params.scale = "noborder";
	swfobject.embedSWF("scripts/BlowingLeaves.swf","leaves","960","250","10.0.0",false,flashvars,params);
}
$(function () {
	$('#sponsorWrapper').cycle({fx: 'fade',sync: 1, delay: -4000});
	$('#adWrapper').cycle({fx: 'scrollLeft',sync: 1, speed: 1000, timeout: 7000});
	setFooterDate();
	addButtonsForHome();
	getFlashRef();
})
