// JavaScript Document

jQuery.noConflict();

// ON THE FLY CUSTOM FORMATTING FOR GIFTBOX PAGES
// also replace Quantity Field

var $jq = jQuery;


 $jq(document).ready(function() {
							
   	// GIFT BOX
	$jq("label:contains('Gift Box')").css("font-style", "italic");
	$jq("dd:has(ul:not(.required-entry))").addClass("giftbox");
	$jq("dd:has(select:not(.required-entry))").addClass("giftbox");
	
	// get rid of the default 'Please Select ...' option
	$jq(".product-options dd select option:selected").remove();
	
	// make the radio option 1 default
	$jq("dd input:radio:first").attr("checked", "checked");
	

	if($jq("label:contains('Quantity')").length>0) {
		// QUANTITY FIXED DROPDOWN
	$jq("label:contains('Quantity')").css("font-style", "italic");
	$jq("#qty").attr("value",1);
	$jq("label:contains('Qty:')").hide();
	$jq("#qty").hide();
	}
	
   
 });

function cleanUpGiftFields() {
	// remove surplus gift info from form submission
	// check the radio button
	var giftStatusTrue=$jq("dd input:radio:first").attr("checked");
	
	if(giftStatusTrue) {
		$jq("dd:has(select:not(.required-entry))").remove();
		//$jq("label:contains('Gift Box')").remove();
	}
	
}


//
	mc=new Array()
	mc[0]='23526059236253525744385630606331323039302455302723335730333444';

function mc2(e) {
op='';chars='st2-n74opr.uyqz9m:0vwk_5x16hjab3igcdel8@f'; m='39525560243040';
inp=m+mc[e];for(i=0; i<inp.length; i+=2) {id=parseInt(inp.substr(i,2));op+=chars.charAt(id-23);}
window.location.href= op;
}


