/**
 * Javascript - jQuery enabled
 * 
 * @package WPFramework
 * @subpackage Media
 */


jQuery(document).ready(function($) {
	/* test jquery is working
	alert('jQuery + screen.js is loaded and ready to go!');
	*/
	
	
	// replace hrs with div for consitency across broswers
	$("hr").each(function(){
		$(this).replaceWith('<div class="hr-imposter"></div>');
	});
	
	
	// Home slideshow
	$('#hero-slides').cycle({
	        fx:      'fade',	        
	        prev:    '#slidePrev',
	        next:    '#slideNext',
	        timeout:	5500	        
	    });
	
	// home product slidehow	
	$('.home-product-slideshow').cycle({
	        fx:      'fade',	        
	        prev:    '#product-prev',
	        next:    '#product-next',
	        timeout:	5500	        
	    });
	
	// blend
	$('.blend').blend();
	
	
	// easy tabs for product photos
	$('	#product-photos').easytabs(); 
	
	
	// where to buy tabs - search and list all
	$('.where-to-buy-tabs').easytabs();
	
	
	// make entire product thumb clickable
	
	$(".product-thumb").click(function(){
	     window.location=$(this).find("a").attr("href");
	     return false;
	});
	
	
	$('.sidebar-product-categories li').click(function(){
	     window.location=$(this).find("a").attr("href");
	     return false;
	});
	
	
	// Adds * to all required feilds
	$('div.required label').each(function(){
		$(this).append(' <em><sup>&bull;</sup></em>');	
	});
	
	
	
	
}); //end document.read();


