


		


		
		


			jQuery().ready(function() {

		$("table[id^='sortable'] tr:odd, .sortable tr:odd").addClass('odd');
		$("table[id^='sortable'] tr:even, .sortable tr:even").addClass('even');

		$('ul#slideshow').animatedinnerfade({
			speed: 1000,
			timeout: 6000,
			type: 'sequence',
			containerheight: '719px',
			containerwidth: '480px',
			animationSpeed: 5000,
			animationtype: 'fade',
			bgFrame: 'none',
			controlBox: 'none',
			displayTitle: 'none'
		});

		$('body').append('<div style="display:none;"><div id="fancyinfo"></div><a class="fancyboxinfo" href="#fancyinfo"></a></div>');
		
		fancyPopupSetup = function() {
			$('a.fancybox').click(function () { 
				$.fn.fancybox.showLoading();
				
				$('#fancyinfo').load($(this).attr('href')+ '?ajax=yes #contentBody', {}, function(data) { 
					$(".fancy_loading").hide(); 
					$('#fancyinfo').html('<div id="productpop">'+ $('#fancyinfo').html() + '</div>'); 
					$('.fancyboxinfo').trigger('click'); 
					
				} ); 
				return false;
				
			});
		}
		fancyPopupSetup();
		
		oSRC = "";
		$(".blowup").hover(
			function(){
				if (oSRC != $(this).attr("src")) {
					oWidth = $(this).width();
					oHeight = $(this).height();
					mpx = 1.1;
					oSRC = $(this).attr("src");
				}
				
				$(this).stop().animate({
						//take the original width/height X multipler and tag on the 'px'
						width: (oWidth * mpx) +'px',
						height: (oHeight * mpx) +'px'
						//space the animation out over 1 sec (deals in milliseconds)
				},1000);
			},
			//this is just like a mouseOut effect to take the img back to the original size
			function(){
				$(this).stop().animate({
						width: oWidth +'px',
						height: oHeight +'px'
				},1000);
			}
		);

		popReload = function (event) { 
				$(".fancy_loading").hide(); 
				MagicMagnify_findMagnifiers(true);
				
				$('#productpop a.fancybox').click(function() { 
					$.fn.fancybox.showLoading();
					$('#productpop').load($(this).attr('href')+ '?ajax=yes #contentBody', {}, popReload );	
					return false;													
				});

		};

		$("a.fancyboxinfo").fancybox({
			'hideOnContentClick'	: false,
			'frameWidth'			: 700,
			'frameHeight'			: 560,
			'overlayShow'			: true,
			'zoomSpeedIn'			: 600,
			'zoomSpeedOut'			: 500,
			'easingIn'				: 'easeOutBack',
			'easingOut'				: 'easeInBack',
			'callbackOnShow'		: function() {
										popReload(); 
									}
			
		}); 

		jQuery.fn.outerHTML = function() {
			return $('<div>').append( this.eq(0).clone() ).html();
		};

		$('#menu1 > ul > li').hover(
			function () { 

				if (!$(this).find('ul').length) { $('#contentBody').trigger('mouseover'); return; } 
				
				$("#slidemenu").height( $("#contentRight").outerHeight() );
				
				$("#slidemenu").html( $(this).find('ul').outerHTML() );	

				
				$("#slidemenu").stop(true).animate({left:$("#slidemenu").outerWidth()*-1}, { duration: 500, queue: false, 
					complete: function(){ 
						$("#slidemenu").animate({left:'0px'}, { duration: 300, queue: false });
					} 
				});
			}

		);

		$('#header, #contentBody').hover(
			function () { 
				$("#slidemenu").stop(true).animate({left:$("#slidemenu").outerWidth()*-1}, { duration: 500, queue: false	} );
			}
		);
		

		$("a.cvvpop").addClass("iframe").fancybox({
			'hideOnContentClick'	: false,
			'frameWidth'			: 570,
			'frameHeight'			: 320,
			'width'					: 570,
			'height'				: 320,
			'overlayShow'			: false,
			'zoomSpeedIn'			: 600,
			'zoomSpeedOut'			: 500,
			'easingIn'				: 'easeOutBack',
			'easingOut'				: 'easeInBack'
		}); 
		
		
		$("img").pngfix();
	});	


	

	
