/**
 * @author abezulski
 */
var scripts = {
	
	cycleProducts : function() {
		jQuery("#iTabProducts").cycle({ 
		    fx: 'scrollHorz',
			timeout: 6000,
			speed: 1000,
			pause: 1,
			prev: '.iTabScrollerLeft',
			next: '.iTabScrollerRight' 
		});
	},
	
	makeFancyBox : function() {
		jQuery("#productPics a.lightbox").fancybox();
	},
	
	zebraSearchResults : function() {
	    jQuery(".searchResults tbody tr:even").each(function(){
	        jQuery(this).addClass("zebra");
	    });
	},
	
	init : function() {
		if(jQuery(".iTabScroller").length > 0) {
			this.cycleProducts();
		}
		
		if(jQuery("#productPics").length > 0) {
			this.makeFancyBox();
		}
		
		if(jQuery(".searchResults").length > 0) {
		    this.zebraSearchResults();
		}
	}
	
}

jQuery(document).ready(function(){
	scripts.init();
});

