$(document).ready(function(){
	
			$('.jqzoom').hover(			
					function(){
						$('.imgzoontab').fadeIn();
						$('.normaltab').hide();
						//$('.picol-1').fadeTo('fast',0.10);
						//$('.jqZoomWindow').fadeIn('fast');					
					},function(){
						//$('.jqZoomWindow').fadeOut('fast');
						//$('.picol-1').fadeTo('fast',1.0);
						$('.imgzoontab').hide();
						$('.normaltab').show();
					}
			);	
			

			$(".jqzoom").jqzoom();
			
			$('.pipcontrol').click(function(){
				var id = this.id;
				$('.show-true').addClass('show-false');
				$('.show-true').removeClass('show-true');
				$('#d'+id).addClass('show-true');
				$('.selected').removeClass('selected');
				$('#'+id+' span.citem').addClass('selected');
				return false;
			});
			
			$('div.pinfomsg').dropShadow({left: 1, top: 1});
			
			//onload show the correct default image
			$('.large-img-c').fadeOut('fast');
			$('#largeimg-th1').fadeIn('fast');
			
			//image thumbnail click functionality
			$('.imgthumb').click(function(){
				var thisid = this.id;
				//no longer have default image as top of stack - user defined
				$('#largeimg-th1').removeClass('z-index-top');	
				$('.large-img-c').fadeOut('fast');
				$('#largeimg-'+thisid).fadeIn('fast');
				return false;
			});

			//set default image as top of stack
			$('#largeimg-th1').addClass('z-index-top');	
			
			
			//help tooltips
			$('.popup-default-state').removeClass('popup-default-state');
			$('.helpicon .popup').hide();
			
			$('.helpicon').hover(
			function(){
				$(this).children('.popup').fadeIn('fast');
			},function(){
				$(this).children('.popup').fadeOut('fast');
			});
			
			//zoom instructions
			$('#large-img-rel').mouseover(function(){
				$('#large-img-zoom-instr').fadeOut();
			});
});
