jQuery(document).ready(function(){
				            var options = {
				            		zoomType: 'reverse',
				            	    zoomWidth: 388,
				            	    zoomHeight: 382,
				            	    xOffset: 20,
				            	    yOffset: 0,
				            	    lens: true,
				            	    position: 'right',
				            	    showEffect: 'show',
				            	    hideEffect: 'fadeout',
				            	    fadeoutSpeed: 'slow',
				            	    title: true,
				            	    preloadText:'loading zoom....'
				            }
				            
			            	jQuery(".jqzoom").jqzoom(options);
			            	jQuery(".jqzoom").mouseover(function()
			            	{
			            		jQuery("div.product-shop").hide();
			            		jQuery("div.product-collateral").hide();
			            	});
			            	
			            	jQuery(".jqzoom").mouseout(function()
			            	{
			            		jQuery("div.product-shop").show();
			            		jQuery("div.product-collateral").show();
			            	});
				            
				            //select options removing prices
				            var options=jQuery("option");
				            var pos=0;
				            var str="";
				            options.each(
				            	function()
				            	{
				            		pos=jQuery(this).text().indexOf('+');
				            		if (pos>0)
				            		{
				            			str=jQuery(this).text();
				            			str=str.substr(0,pos-1)
				            			jQuery(this).attr("text",str);
				            		}
				            	}
				            );
				            
				            var labels=jQuery("span.label label");
				            var sHTML = "";
				            jQuery("span.label label").each(function(){
				            	var parentContainer = jQuery(this).parents("span.label");
			                    var checkboxInput = parentContainer.prevAll("input.checkbox");
			                    var checkboxInputId = checkboxInput.attr("id");
			                    var optionID;
			                    
			                    if(checkboxInputId){ 
				                    if(jQuery.trim(checkboxInputId.substr(0,8))=='options_'){
				                    	optionID = checkboxInput.attr("value");
				                    }else{
				                    	optionID = checkboxInputId.substr(4)
				                    }
				            	}else{
				            		optionID = '';
				            	}
					            	
			            		sHTML=jQuery(this).html();
			            		pos=sHTML.indexOf('<');
			            		if (pos>=0)
			            		{
			            			sHref=jQuery.trim(sHTML.substr(0,pos));
			            			sHref='/'+sHref.replace(' ','_')+'.html';
			            			// jQuery(this).attr("innerHTML",sHTML+"<span rel='"+optionID+"' class='more-info'><a href='"+sHref.toLowerCase()+"'>?</a></span>");
			            			jQuery(this).attr("innerHTML",sHTML+"<span rel='"+optionID+"' class='more-info'><a href='#'><img src='/skin/frontend/christopherward/default/images/question-mark.jpg' border='' alt=''></a></span>");
			            		}
				            });
				            

				            jQuery(".more-info a").click(function(){
				            	return false;
				            });

				            jQuery(".more-info").hover(
				                function () {
				                	 // append the Hint div after the ? sign
				                	var optionID = jQuery(this).attr("rel");
				                	jQuery("div.rel-"+optionID).insertAfter(this);
				                	jQuery("div.rel-"+optionID).css({'position':'absolute','top':'5px','right':'-130px','zindex':'9999'});
				                    jQuery("div.rel-"+optionID).fadeIn("fast");
				                     // raise parent's container z-index to show the hint properly
				                    jQuery(this).parents("li:has(input)").css({'z-index':'15'});
				                    jQuery(this).parents("dt.text").css({'z-index':'15'});
				                  }, 
				                  function () {
				                	  var optionID = jQuery(this).attr("rel");
				                	  jQuery("div.rel-"+optionID).fadeOut("fast");
				                	  jQuery(this).parents("li:has(input)").css({'z-index':'10'});
				                	  jQuery(this).parents("dt.text").css({'z-index':'10'});
				                  }
				            )

				            var prices=jQuery("span.price-notice");
				            prices.each(
				            	function()
				            	{
				            		sHTML=jQuery(this).html();
				            		jQuery(this).attr("innerHTML",sHTML.substr(sHTML.indexOf('+')+1));
				            	}
				            );
				            jQuery('.product-options').show();
				        });	


function fnShowHide(id,fieldType)
{
	if(jQuery("#chk_"+id).is(":checked"))
	{
		jQuery("#option_"+id).show();
	}
	else
	{
		jQuery("#option_"+id).hide();
		
		switch(fieldType)
		{
			case 'field':
				jQuery("#options_"+id+"_text").attr('value','');
			break;
			case 'drop_down':
				jQuery("#select_"+id).attr('value','');
			break;
		}
	}

}
