RUN4IT=(typeof RUN4IT=='undefined'?{}:RUN4IT);
RUN4IT.classes=(typeof RUN4IT.classes=='undefined'?{}:RUN4IT.classes);
RUN4IT.classes.Product = function()
{
	var prodOptions;
	if(!(prodOptions = document.getElementById('product-options'))) return;

	var prodPricing, prodVariations, prodShoeType, prodSel, prodQty;
	if((prodPricing = document.getElementById('product-pricing')) && (prodVariations = document.getElementById('product-variations')))
	{
		Shine.appendFirst(prodOptions, prodPricing);
		Shine.appendFirst(prodOptions, prodVariations);
	}
	if((prodShoeType = document.getElementById('product-shoe-type')))
	{
		Shine.appendFirst(prodOptions, prodShoeType);
	}
	if((prodSel = Shine.getElementsByClass(prodVariations, 'div', 'selection')[0]) && (prodQty = Shine.getElementsByClass(prodOptions, 'div', 'product-quantity')[0]))
	{
		prodSel.insertBefore(prodQty, prodSel.lastChild);
	}
	var reviewBreakdown, b, summary, d;
	if((reviewBreakdown = document.getElementById('product-reviews-breakdown')) && ((summary = document.getElementById('product-reviews-summary'))))
	{
		b = reviewBreakdown.cloneNode(true);
		d = Shine.createHTMLElement('div');
		Shine.setAttribute(d, 'id', 'product-reviews-hover');
		Shine.setAttribute(b, 'id', 'product-reviews-hover-table');
		d.appendChild(b);
		summary.appendChild(d);
		jQuery(summary).children('p.rating').hover(function() {
			Shine.setAttribute(d, 'style', 'display: block;');
		}, function() {
			Shine.setAttribute(d, 'style', '');		
		});
	}
}
document.postLoadHooks=(typeof document.postLoadHooks=='undefined'?[]:document.postLoadHooks);
document.postLoadHooks.push(function(){new RUN4IT.classes.Product();});
