$(function() {


	/////////////////////////////////////////////////////////////////////////////
	// resizes the 'no image available image' across the board
	var images = $('img');
	images.each(function() {
		if ($(this).attr('src') == '/store/images/default-product-image.jpg')
			$(this).attr('height', '110').attr('width', $(this).attr('height'));
	});
	/////////////////////////////////////////////////////////////////////////////

	
	
	/////////////////////////////////////////////////////////////////////////////
	// gives carousel images a border, resizes them appropriately
	/*
	var CarouselItemImages = $('.CarouselItem img');
	CarouselItemImages.css('border', '1px solid #eee');
	CarouselItemImages.aeImageResize({ height: 110, width: 110 });
	*/
	/////////////////////////////////////////////////////////////////////////////
	
	
	
	/////////////////////////////////////////////////////////////////////////////
	// shortens the 'short description' text in the carousel 
	/*
	var CarouselItemControlLink = $('.CarouselItem .ControlLink a');
	CarouselItemControlLink.each(function () {
		var _text = $(this).text();
		$(this).text(ellip(_text, 30));
	});
	*/
	/////////////////////////////////////////////////////////////////////////////
	
	
	
	/////////////////////////////////////////////////////////////////////////////
	// changes the text size of the tree view navigation
	//                  id for other pages                   id for home page
	//var TreeNodes = $('#T_ctl04ctl02ctl00trvTreeNavigation, #T_ctl05ctl02ctl00trvTreeNavigation');
	//TreeNodes.find('a').css('font-size', '1.2em');
	/////////////////////////////////////////////////////////////////////////////
	
	

	/////////////////////////////////////////////////////////////////////////////
	// 
	var FeaturedPriceLabels = $('.FeaturedItemsPriceAlignment .lblPriceLabel');
	var Prices = $('.FeaturedItemsPriceAlignment .lblPrice');
	FeaturedPriceLabels.each(function() {
		$(this)
			.text($(this).text() + ' ')
			.css('color', '#000')
			.css('padding', '0 3px 0 0')
			.css('font-size', '10pt');
	});
	Prices.each(function() {
		$(this)
			.css('color', '#f00')
			.css('font-weight', 'bold')
			.css('font-size', '10pt');
	});
	/////////////////////////////////////////////////////////////////////////////
	
	
	
	/////////////////////////////////////////////////////////////////////////////
	// 
	var BuyMoreLink = $('.BuyMoreLink a');
	BuyMoreLink.each(function() {
		$(this)
			.css('font-size', '10pt');
	});
	/////////////////////////////////////////////////////////////////////////////
	
	
	/////////////////////////////////////////////////////////////////////////////
	//
	var ShippingEstimateLink = $('#hlShippingEstimationLink')
	ShippingEstimateLink.text('Calculate other shipping options');
	/////////////////////////////////////////////////////////////////////////////
	
	
});

function ellip(str, maxlen) {
	return str.length > maxlen ? str = str.substr(0, maxlen) + '...' : str;
}

/*
function ch(src) { 
    document.getElementById('pnlImage').innerHTML = '<center><img src="' + src + '" style="border: 1px solid #000;" /></center>'; 
}
*/
