var TB = 
{
	init:function($)
	{
		this.productZoom($);
		this.lightBox($);
		this.fadeMenu($);
		this.zoom($);
	},
	
	fadeMenu:function($)
	{
		$('#Menu li.current a span')
			.fadeTo(500, 0).fadeIn('fast').fadeTo(3000, 1).fadeOut('slow');
		$('#Menu li.section a span')
			.fadeTo(500, 0).fadeIn('fast').fadeTo(3000, 1).fadeOut('slow');
	},
		
	productZoom:function($)
	{
		var options = 
		{
			lens: false,
	    	zoomWidth: 420,
	    	zoomHeight: 420,
            xOffset: -35,
            yOffset: 0,
            position: "left",
			hideEffect:'fadeout',
            fadeoutSpeed: 'slow'
        };
		$('#ProductImage a').jqzoom(options);
	},
	
	lightBox:function($)
	{
		if($('body.ArticleHolderPage').length)
		{
			$("a[rel='lightbox']").lightBox({
	        	imageLoading: 'mysite/javascript/lightbox/images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
	        	imageBtnPrev: 'mysite/javascript/lightbox/images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
	        	imageBtnNext: 'mysite/javascript/lightbox/images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
	        	imageBtnClose: 'mysite/javascript/lightbox/images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
	        	imageBlank: 'mysite/javascript/lightbox/images/lightbox-blank.gif'
    		});
		}
	},
	
	zoom:function($)
	{
		if($('body.WideImagePage').length) {
			$('a.magnify').magnify();
		}
	}
}

jQuery.noConflict();
jQuery(function($) 
{
	TB.init($);
});