	$(document).ready(function() {
		$("#content #collectionsImage #collectionsImageSpot #another").html("");
		
		$("#content .homeCollection").hover(function() {
			$(this).find("img").fadeTo("fast", 0.8);
		},function(){
			$(this).find("img").fadeTo("fast", 1);
		});
		
		$("#content .homeCollection").click(function() {
			window.location = $(this).find("a").attr("href");
		});

		$("#collectionsNav li").hover(function(){
			$(this).not('.navselected').fadeTo("fast",0.4);
		},function(){
			$(this).not('.navselected').fadeTo("fast",1);
		});
				
		$('#newsnav a').click(function(event){
			event.preventDefault();
			
			$("#newsnav").hide();
			$("#newsloading").show();
				
			var nextVal = getNextVal();
					
			$.ajax({
				url: '/actions/news.php?showNext=' + nextVal,
				type: 'GET',
				dataType: 'html',
				timeout: 1000,
				error: function(){ alert('Error loading more news'); },
				success: function(html){
					$("#newscontent").append(html);
					$("#newsloading").hide();
						
					if($("#thatsAll").html()=="FIN"){
						$("#newslinkage").hide();
						$("#thatsAll").hide();
					}
					else $("#newsnav").show();
				}
			});	
		});
	});
			
	var loaderCopy = "<img src=\"/images/ajax-loader.gif\" style=\"vertical-align:middle; margin-right:10px;\" /> LOADING";
	var cur = 0;
			
	function getNextVal(){
		cur += 5;
		return cur;
	}
			
	function loadStores(state){
		$('#storescontent').html(loaderCopy);
		if(state=="ZZ") state="Outside-the-US";
		$('#storescontent').load('/actions/stores.php?state='+state, function(){ $.scrollTo($('#firstclear')); }); 
	}