//var $j = jQuery.noConflict();

// Suckerfish drop-downs
sfHover = function() {
	var sfEls = document.getElementById("primaryNav").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);

$(document).ready(function() {
	/*Rounded Stuffs
	$j('#leftNavWrapper').corner('bl br tr');
	$j('#ajaxSearch_submit, #ajaxSearch_input').corner('5px');
	$j('#primaryNav ul, #primaryNav ul li.last a').corner('bottom 10px');*/
	$('#footer').corner('bottom');
	
	//Nav Styles
	$('#primaryNav li.active  a:first').addClass('prim-active');
	$('#primaryNav ul li.active a').addClass('sub-active');
	$('#leftNav li.active > a').addClass('leftTop-active');
	$('#leftNav li.activePage ul li.active a').addClass('leftSub-active');
	
	//Colorbox assignments
	$("a[rel='modalImg']").colorbox();
	$("a[rel='warehouse']").colorbox();
	
	//Treeview for Sitemap Page
	$("#sitemapContent").treeview({
		animated: "fast",
		collapsed: true
	});
	
	$("#phoneNumber span").colorbox({
		inline:true,
		href:"#location-contacts",
		opacity: 0
	});
	
});




// Get Date For Form Processor
var getDate=new Date()
var getYear=getDate.getYear()
if (getYear < 1000)
getYear+=1900
var getDay=getDate.getDay()
var getMonth=getDate.getMonth()+1
if (getMonth<10)
getMonth="0"+getMonth
var getCurrentDay=getDate.getDate()
if (getCurrentDay<10)
getCurrentDay="0"+getCurrentDay
theDate = +getMonth+"/"+getCurrentDay+"/"+getYear