
$(document).ready(function(){
						   
// caching to stop flicker bug in IE6
if (typeof document.body.style.maxHeight == "undefined") { try { document.execCommand('BackgroundImageCache', false, true); } catch(e) { } }						   
						   
//$("p").addClass("selected");

//Code for example F

$("ul.contact_box_fade").addClass("unfade");

$("a.steve").click(function(){$("p").addClass("font_size_2"); return false;});


$("a.buttonAaddclass").click(function(){ $("p").addClass("font_size_1"); return false;});
$("a.buttonAAaddclass").click(function(){ $("p").addClass("font_size_2"); return false;});
$("a.buttonremoveclass").click(function(){ $("p").removeClass("font_size_1 font_size_2"); return false;});

$("a.high_contrast").click(function(){ $(" h1, h2, p, #content, li, a").addClass("dark_contrast"); return false;});
$("a.high_contrast").click(function(){ $("body").addClass("body_contrast"); return false;});
$("a.high_contrast").click(function(){ $(".contact_box_fade, #footer, .linkedin_box, .rss").addClass("remove_background"); return false;});
$("a.normal_contrast").click(function(){ $("body, h1, h2, p, #content, li, a, .contact_box_fade, #footer, .linkedin_box, .rss").removeClass("dark_contrast remove_background body_contrast"); return false;});

//show code example F
$("a.codeButtonF").click(function(){$("pre.codeF").toggle(); return false;});

//$("#contact_box_fade").slideDown("slow");

});


$(document).ready(function(){

	$("a#contactLink").click(function(){
		if ($("#contactForm").is(":hidden")){
			$("#contactForm").slideDown("fast");    
			return false;
		}
		else{
			$("#contactForm").slideUp("fast");                
			return false;
		}
	});
	return false;
	});

function closeForm(){
	$("#messageSent").show("slow");
	setTimeout('$("#messageSent").hide();$("#contactForm").slideUp("slow")', 2000); 
	return false;
}


$(document).ready(function(){

	$("a#infoLink").click(function(){
		if ($("#infoBox").is(":hidden")){
			$("#infoBox").slideDown("fast");    
			return false;
		}
		else{
			$("#infoBox").slideUp("fast");                
			return false;
		}
	});
	return false;
	});

function closeForm(){
	$("#messageSent").show("slow");
	setTimeout('$("#messageSent").hide();$("#infoBox").slideUp("slow")', 2000); 
	return false;
}

	/* <![CDATA[ */


	var Zoom = {
	
		// configure class
		init : function() { 
			this.addTargets();
			},
			
		addEvent : function(el, evType, fn) {
			el = this.$(el);
			if (el.addEventListener) el.addEventListener(evType, fn, false);
			else if (el.attachEvent) { var r = el.attachEvent("on" + evType, fn); return r; }
			else el["on" + evType] = fn;
			},
		
		$ : function() {
		  var els = new Array();
			for (var i = 0; i < arguments.length; i++) {
		  	var el = arguments[i];
		    if (typeof el == "string") el = document.getElementById(el);
			  if (arguments.length == 1) return el;
		    els.push(el);
			  }
			return els;
			},
			
		getElementsByClassName : function(className, tag, parent) {
			var els = (this.$(parent) || document.body).getElementsByTagName((tag || "*")), matches = new Array();
			for (var i = 0; i < els.length; i++) { if (this.hasClassName(els[i], className)) matches.push(els[i]); }
			return matches;
			},
			
		hasClassName : function(el, className) { // function from Zoom() class at extensions.js
			var re = new RegExp("(^|\\s)" + className + "(\\s|$)");
			return this.$(el).className.match(re);
			},

		addTargets : function() {
			var links = this.getElementsByClassName("new_window"); // do not specify <a> only as <area> can also be used
			for (var i = 0; i < links.length; i++) {
				// this.addEvent(links[i], "click", this.launchPopup(links[i].href));
				links[i].onclick = function(){return Zoom.launchPopup(this.href);}; 
				links[i].title += " (opens in a new browser window)";
				}
			},
			
		launchPopup : function(url) {
			var attr = "toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes";
			if (url.toLowerCase().indexOf("arcadia.peoplebank.com/pbank/owa/arcadia.arcadiagroupcategories") != -1) attr = "dependent=no,width=700,height=440,screenX=100,screenY=100,status=yes,scrollbars=no";
			else if (url.toLowerCase().indexOf("arcadia.peoplebank.com/pbank/owa/arcadia.arcadiagroupreg_cv") != -1) attr = "dependent=no,width=700,height=480,screenX=100,screenY=100,status=yes,scrollbars=yes";
			else if (url.toLowerCase().indexOf("arcadia.peoplebank.com/pbank/owa/arcadia.arcadiagrouplogin") != -1) attr = "dependent=no,width=700,height=480,screenX=100,screenY=100,status=yes,scrollbars=yes";	
			else if (url.toLowerCase().indexOf("gecapitalbank.co.uk") != -1) attr = "dependent=no,width=640,height=450,screenX=100,screenY=100,status=yes,scrollbars=yes";
			else if (url.toLowerCase().indexOf("arcadiagroup.co.uk/promostores/") != -1) attr = "dependent=no,width=690,height=420,screenX=100,screenY=100,status=yes,scrollbars=auto";
			else if (url.toLowerCase().indexOf("burtonmenswear.co.uk/promostores/burton/gift_card/index.html") != -1) attr = "dependent=no,width=740,height=480,screenX=100,screenY=100,status=yes,scrollbars=auto";
			else if (url.toLowerCase().indexOf("voucherexpress.co.uk") != -1 || url.indexOf("portal.prepaytec.com") != -1) attr = "dependent=no,width=660,height=450,screenX=100,screenY=100,status=yes,scrollbars=yes";
			var newWin = window.open(url, "zoomPopup", attr);
			newWin.focus(); return false;
			}

		}
	
	function loadZoom() {
		Zoom.init();		
		}

	Zoom.addEvent(window, "load", loadZoom);

/* ]]> */