// JavaScript Document

function showStores(val)
{
	$$('div.stores').setStyle('display','none');
	$('notfound').set('text','');
	if(val=='All'){
		$$('div.stores').setStyle('display','block');
	} else {
		if($(val)) {
			$(val).setStyle('display','block');
		} else { 
			$('notfound').set('text','No stores for this State'); 
		}
	}
}

window.addEvent('domready', function(){									 
	
	/*nh = $(document).getStyle('height').toInt();
	mh = $('content').getStyle('height').toInt();
	if( mh < nh){		
		//$('content').setStyle('height',nh+30);
		//$$('p.copy').setStyle('margin-top',mh-(mh-150));
	}*/
	
	if($("Map")){
		var myTips = new Tips('.tips',{
			'className': 'tipper',
			'offset': {'x': 10, 'y': -30}
		});		
	}
	
	/*if($('photos')) {
		ReMooz.assign('#photos a', {
			'origin': 'img',
			'shadow': 'onOpenEnd', // fx is faster because shadow appears after resize animation
			'resizeFactor': 0.8, // resize to maximum 80% of screen size
			'cutOut': false, // don't hide the original
			'opacityResize': 0.4, // opaque resize
			'dragging': false, // disable dragging
			'centered': true // resize to center of the screen, not relative to the source element
		});
	}*/
	
	var inputs = $$('input.buttons','input.buttonx');
	
	inputs.each(function(item) {
		item.addEvent('mousedown', function(){
			item.setStyle('backgroundPosition','bottom');
		});
		item.addEvent('mouseup', function(){
			item.setStyle('backgroundPosition','top');		
		});
		item.addEvent('mouseout', function(){
			item.setStyle('backgroundPosition','top');		
		});
		item.addEvent('blur', function(){
			item.setStyle('backgroundPosition','top');		
		});
	});
	
});
