$(document).ready(function(){
		/*$('#bespoke_nav').hide();
		
		$('#bespoke a').click(function(event){
			event.preventDefault();
			$("#bespoke_nav").slideToggle("slow");
		});*/
   		
		jQuery.fn.fadeToggle = function(speed, easing) {
   			return this.animate({opacity: 'toggle'}, speed, easing);  
		};


		$("#resource_output_layer").hide();
		
		$("#copyright").click(function(event){
     		//$("#resource_output_layer").fadeIn(999);
			$("#resource_output_layer").fadeToggle('slow');
   		});
		
});


// Make calls to other operations from this file. 


// fired at the end of the page once all html has loaded
function onDOMload () {
	if(typeof sIFR == "function"){
		switchFonts();
	};
	if(typeof buildTransitions == "function") {
		buildTransitions();
	};
};

// fired once all content has loaded
function onPageLoad () {
	
};

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function MM_jumpMenu2(targ,selObj,restore){ //v3.0

  eval(targ+".location='/basket/?action=delivery_update&method="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu3(targ,selObj,restore){ //v3.0

  eval(targ+".location='/basket/?action=delivery_update&country="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu_Option(targ,selObj,restore,id){ //v3.0

  eval(targ+".location='/bespoke/details.php?action=option_update&option_id="+selObj.options[selObj.selectedIndex].value+"&id="+id+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu_Size(targ,selObj,restore,id,option_id){ //v3.0

  eval(targ+".location='/bespoke/details.php?action=size_update&size_id="+selObj.options[selObj.selectedIndex].value+"&id="+id+"&option_id="+option_id+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu_Express_Option(targ,selObj,restore,id, position, box_position, product_id){ //v3.0
  eval(targ+".location='/express/details.php?action=option_update&option_id="+selObj.options[selObj.selectedIndex].value+"&id="+id+"&product_id="+product_id+"&position="+position+"&box_position="+box_position+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu_Express_Size(targ,selObj,restore,id, position, box_position, product_id){ //v3.0
  eval(targ+".location='/express/details.php?action=size_update&size_id="+selObj.options[selObj.selectedIndex].value+"&id="+id+"&product_id="+product_id+"&position="+ position +"&box_position="+box_position+"'");
  if (restore) selObj.selectedIndex=0;
}

function imposeMaxLength(Event, Object, MaxLen)
{
 	var keynum;
 	if(window.event) // IE
 	  {
 	  keynum = Event.keyCode;
 	  }
 	else if(Event.which) // Netscape/Firefox/Opera
 	  {
 	  keynum = Event.which;
 	  }
 	keychar = String.fromCharCode(keynum);
	if (keynum != 8) {
  		return (Object.value.length <= MaxLen);
	}
}

document.onload = onPageLoad();