$(document).ready(function() {
	$("#newsItems").newsTicker();

	$("#fbEmailSignup").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

});

// Functions for product detail images
function changeImg(src) {
	var oldSrc = document.getElementById('mainImg').src.split('/');
	oldSrc[oldSrc.length-1] = src;
	document.getElementById('mainImg').src = oldSrc.join('/');
}

function largeImg(src) {
	var oldSrc = document.getElementById('mainImg').src.split('/');
	oldSrc[oldSrc.length-1] = src;
	window.open(oldSrc.join('/'),"viewLarge","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=770,height=600,top=30,left=30");
}

function newWindow() {
	window.open("","windowname","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=425,top=30,left=30");
}

// Suckerfish
//http://www.htmldog.com/articles/suckerfish/dropdowns/
sfHover = function() {
    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


