window.addEvent('domready', function() { 
	if ($('shopping_cart_summary')) {
			$('shopping_cart_summary').store('tip:text',$('mini_cartdetails').get('html'));  
			var cart_tip = new Tips('#shopping_cart_summary',{   
				fixed: true,   
				hideDelay: 200,   
				showDelay: 200   
			});
	}
		var emailTip = "Enter email..";
		var searchTip = "Enter search term here..";
		
		$('to_email_address').addClass("fieldTips");
		$('searchwords').addClass("fieldTips");
		
		$('to_email_address').set("value",emailTip);
		$('searchwords').set("value",searchTip);

		$('to_email_address').addEvent('focus',function() {
			$('to_email_address').removeClass("fieldTips");
			this.set('value','');																								
		},this);
		
		$('to_email_address').addEvent('blur',function() {
			if (this.get('value').trim()=="") {
				$('to_email_address').set("value",emailTip);																								
				$('to_email_address').addClass("fieldTips");
			}
		},this);
		
		$('searchwords').addEvent('focus',function() {
			$('searchwords').removeClass("fieldTips");
			this.set('value','');																								
		},this);
		
		$('searchwords').addEvent('blur',function() {
			if (this.get('value').trim()=="") {
				$('searchwords').set("value",searchTip);	
				$('searchwords').addClass("fieldTips");
			}
		},this);
		if($('collections_list')) {
		var home_carousel = new carousel({
			pane : 'collections_list',
			step : 4,
			width : 174,
			section : '#collections_list li',
			previous : 'prev',
			next : 'next',
			wrap : true,
			interval:10
		});
	}	
	if($('feature_0')) {
		var crossfade_0 = new Crossfader({parent:'feature_0',slides:'div.product', interval : 5000, delay:5000});
	}
	if($('feature_1')) {
		var crossfade_1 = new Crossfader({parent:'feature_1',slides:'div.product', interval : 5000, delay:1500});
	}
	if ($('product_stocktable')) {
		var stockCheck = new stockChecker({table : 'product_stocktable'});
	}
	if($('product_image')) {
			gallery = new indiesin_gallery(); 
	}
});  
 
function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
