/* Sourced from WebsiteUI revision: 262 (revision dated: 2011/06/09 15:15:38) */
var UKDAJS={};(function(){var b,a;UKDAJS.Cookie={read:function(c){var e=null,d;d=document.cookie.match("(?:^|;)\\s?"+c+"=([^;]*)(?:;|$)");if(d){e=unescape(RegExp.$1)}return e},remove:function(e){var d=new Date(),c;d.setTime(d.getTime()-1);c="; expires="+d.toUTCString();document.cookie=e+"="+c+"; path=/"},removeAll:function(){var e=document.cookie.split(";"),d,c;for(d=0,c=e.length;d<c;d++){UKDAJS.Cookie.remove(e[d].split("=")[0])}},write:function(e,f,g){var d=new Date(),c;d.setTime(d.getTime()+(g*24*60*60*1000));c="; expires="+d.toUTCString();document.cookie=e+"="+escape(f)+c+"; path=/"}};UKDAJS.Number={randomIntInRange:function(d,c){if(!UKDAJS.Validate.isInt(d)){throw new TypeError("min is not an integer")}if(!UKDAJS.Validate.isInt(c)){throw new TypeError("min is not an integer")}if(d>c){throw new RangeError("min ("+d+") is greater than max ("+c+")")}return Math.floor(Math.random()*(c-d+1)+d)},surroundingIntRange:function(d,g,e){var h,f,c;if(!UKDAJS.Validate.isInt(d)){throw new TypeError("seed is not an integer")}if(!UKDAJS.Validate.isInt(g)){throw new TypeError("size is not an integer")}if(g<=0){throw new RangeError("size ("+g+") is not greater than zero")}h={};h.start=((g%2)===0)?d-((g/2)-1):d-((g-1)/2);h.end=h.start+g-1;if(e){if(typeof e.min!=="undefined"){if(!UKDAJS.Validate.isInt(e.min)){throw new TypeError("options.min is not an integer.")}else{f=e.min}}if(typeof e.max!=="undefined"){if(!UKDAJS.Validate.isInt(e.max)){throw new TypeError("options.max is not an integer.")}else{c=e.max}}if(f&&c&&f>c){throw new RangeError("options.min ("+e.min+") is greater than options.max ("+e.max+").")}if(typeof e.offset!=="undefined"){if(typeof e.offset!=="boolean"){throw new TypeError("options.max is not a boolean.")}else{if(e.offset){if(f&&f>h.start){h.start=f;h.end=f+g-1}if(c&&c<h.end){h.start=c-g+1;h.end=c}}}}if(f&&f>h.start){h.start=f}if(c&&c<h.end){h.end=c}}return h}};UKDAJS.Url={getCurrent:function(){return window.location.href},getCurrentWithNewKeyValue:function(c,d){if(typeof c!=="string"){throw new TypeError("key is not a string.")}if(typeof d!=="string"){throw new TypeError("value is not a string.")}return window.location.protocol+"//"+window.location.host+window.location.pathname+UKDAJS.Url.QueryString.getCurrentWithNewKeyValue(c,d)+window.location.hash},getWithNewKeyValue:function(f,g,e){var c,d;if(typeof f!=="string"){throw new TypeError("key is not a string.")}if(typeof g!=="string"){throw new TypeError("value is not a string.")}if(typeof e!=="string"){throw new TypeError("url is not a string.")}c=UKDAJS.Url.QueryString.get(e);if(c.length!==0){e=e.replace(c,UKDAJS.Url.QueryString.getWithNewKeyValue(f,g,e))}else{if(e.indexOf("#")!==-1){d=e.indexOf("#");e=e.slice(0,d)+UKDAJS.Url.QueryString.getWithNewKeyValue(f,g,e)+e.slice(d)}else{e+=UKDAJS.Url.QueryString.getWithNewKeyValue(f,g,e)}}return e},Hash:{get:function(d){var f="",e=/#[^$]*/,c;if(typeof d!=="string"){throw new TypeError("url is not a string.")}c=d.match(e);if(c){f=c[0]}return f},getCurrent:function(){return window.location.hash}},QueryString:{get:function(e){var c="",f=/\?[^#$]*/,d;if(typeof e!=="string"){throw new TypeError("url is not a string.")}d=e.match(f);if(d){c=d[0]}return c},getCurrent:function(){return window.location.search},getCurrentWithNewKeyValue:function(c,d){if(typeof c!=="string"){throw new TypeError("key is not a string.")}if(typeof d!=="string"){throw new TypeError("value is not a string.")}return UKDAJS.Url.QueryString.getWithNewKeyValue(c,d,UKDAJS.Url.QueryString.getCurrent())},getCurrentValue:function(c){if(typeof c!=="string"){throw new TypeError("key is not a string.")}return UKDAJS.Url.QueryString.getValue(c,UKDAJS.Url.QueryString.getCurrent())},getWithNewKeyValue:function(e,g,d){var c="",f;if(typeof e!=="string"){throw new TypeError("key is not a string.")}if(typeof g!=="string"){throw new TypeError("value is not a string.")}if(typeof d!=="string"){throw new TypeError("url is not a string.")}c=UKDAJS.Url.QueryString.get(d);f=new RegExp("([?&])"+e+"=[^&#$]*","i");if(c.search(f)!==-1){c=c.replace(f,RegExp.$1+e+"="+g)}else{if(c.length!==0){c+="&"+e+"="+g}else{c="?"+e+"="+g}}return c},getValue:function(d,c){var f=null,e;if(typeof d!=="string"){throw new TypeError("key is not a string.")}if(typeof c!=="string"){throw new TypeError("url is not a string.")}e=new RegExp("[?&]"+d+"=([^&#$]*)","i");if(c.search(e)!==-1){f=RegExp.$1}return f}}};UKDAJS.Validate={isInt:function(e){var d=false,c;if(UKDAJS.Validate.isNumber(e)){e=e.toString();c=/^-?\d+$/;d=c.test(e)}return d},isNumber:function(c){return typeof(c)==="number"},isStr:function(c){return typeof(c)==="string"},isBool:function(c){return typeof(c)==="boolean"},isArray:function(d){var c=false;if(typeof(d)==="object"&&d!==null){if(d.constructor.toString().indexOf("Array")!==-1){c=true}}return c},isIntArray:function(f){var e=false,c,d;if(UKDAJS.Validate.isArray(f)){c=f.length;if(c!==0){for(d=0;d<c;d++){if(!(UKDAJS.Validate.isInt(f[d]))){return e}}e=true}}return e},isNumberArray:function(f){var e=false,c,d;if(UKDAJS.Validate.isArray(f)){c=f.length;if(c!==0){for(d=0;d<c;d++){if(!(UKDAJS.Validate.isNumber(f[d]))){return e}}e=true}}return e},isStrArray:function(e){var f=false,c,d;if(UKDAJS.Validate.isArray(e)){c=e.length;if(c!==0){for(d=0;d<c;d++){if(!(UKDAJS.Validate.isStr(e[d]))){return f}}f=true}}return f},isBoolArray:function(f){var e=false,c,d;if(UKDAJS.Validate.isArray(f)){c=f.length;if(c!==0){for(d=0;d<c;d++){if(!(UKDAJS.Validate.isBool(f[d]))){return e}}e=true}}return e},isEmail:function(e){var d=false,c;if(UKDAJS.Validate.isStr(e)){c=/^[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,6}$/;d=c.test(e)}return d},isInArrayFormat:function(e){var c=false,d;if(UKDAJS.Validate.isStr(e)){d=/^\[.*\]$/;c=d.test(e)}return c},isValid:function(h,f,k){var g=false,c=false,l=true,e,d;switch(f){case 0:c=UKDAJS.Validate.isInt(h);break;case 1:c=UKDAJS.Validate.isNumber(h);break;case 2:c=UKDAJS.Validate.isStr(h);break;case 3:c=UKDAJS.Validate.isBool(h);break;case 4:c=UKDAJS.Validate.isArray(h);break;case 5:c=UKDAJS.Validate.isIntArray(h);break;case 6:c=UKDAJS.Validate.isNumberArray(h);break;case 7:c=UKDAJS.Validate.isStrArray(h);break;case 8:c=UKDAJS.Validate.isBoolArray(h);break;case 9:c=UKDAJS.Validate.isEmail(h);break}if(c){if(k!==null&&k!==undefined){switch(f){case 0:case 1:case 2:case 3:case 9:l=b(h,k);break;case 4:case 5:case 6:case 7:case 8:for(e=0,d=h.length;e<d;e++){if(l){l=b(h[e],k)}}break}}if(l){g=true}}return g}};b=function(g,h){var c=true,f,e,d;if(UKDAJS.Validate.isArray(h)){for(e=0,d=h.length;e<d;e++){if(c){f=h[e];c=a(g,f)}}}else{if(h!==""){c=a(g,h)}}return c};a=function(f,e){var d=false,c=e.split("_"),g=c[0],h=c[1];switch(g){case"GT":if(f>parseInt(h,10)){d=true}break;case"GTE":if(f>=parseInt(h,10)){d=true}break;case"LT":if(f<parseInt(h,10)){d=true}break;case"LTE":if(f<=parseInt(h,10)){d=true}break}return d}}());(function(a){a.extend({UKDA_FixHashAnchors:function(){var c=window.location.hash,b,d;if(c!==""){b=a(c);if(b.length===0){c=c.substring(1);b=a('A[name="'+c+'"]')}d=b.eq(0).offset();a(window).scrollTop(d.top)}}})}(jQuery));(function(a,c,b){b.extend({UKDA_PrintUrlsAsFootNotes:function(h){var k={containerId:null};h=b.extend(k,h);var n=[],d=a.protocol+"//"+a.host,f=(h.containerId!==null)?b("#"+h.containerId):b("BODY"),r=b("A",f),p,e,o,q,g,m,l;r.each(function(){p=b(this);e=p.attr("href");if(e!==undefined){o=e.slice(0,4);if(e!==""&&e!=="#"){if(o!=="http"){if(o==="mail"){e=e.substring(7)}else{e=((o.slice(0,1)!=="/"))?e=d+"/"+e:e=d+e}}if(e!==p.text()){if(p.is(":visible")){q=b.inArray(e,n);if(q!==-1){p.after(b(c.createElement("SUP")).addClass("printref").text(q+1))}else{p.after(b(c.createElement("SUP")).addClass("printref").text(n.length+1));n[n.length]=e}}}}}});if(n.length!==0){g=b(c.createElement("OL")).addClass("printrefs");for(m=0,l=n.length;m<l;m++){g.append(b(c.createElement("LI")).text(n[m]))}f.append(g)}}})}(window.location,document,jQuery));(function(b,a){a.fn.extend({UKDA_Selector:function(d){var c={selectLabel:"Please select an item: "};d=a.extend(c,d);return this.each(function(){var f=a(this),k=d,l="selector_"+new Date().getTime(),j=a("DT",f),i=a("DD",f),h=a(b.createElement("FORM")).attr("action",""),g=a(b.createElement("LABEL")).attr("for",l).text(k.selectLabel),e=a(b.createElement("SELECT")).attr("id",l);h.prependTo(f);g.appendTo(h);e.appendTo(h);f.removeClass("nojs");j.each(function(m){a(document.createElement("OPTION")).val(m).text(j.eq(m).text()).appendTo(e)});e.change(function(){var m=e.val();j.hide();i.hide();j.eq(m).show();i.eq(m).show()});e.change()})}})}(document,jQuery));(function(a){a.extend({UKDA_TrackDocsInGA:function(d){var e={asynch:true,extensions:["pdf","ppt","doc","docx","xls"]};d=a.extend(e,d);var m=a("A"),l,b,c,g,f;function k(i){return function(){_gaq.push(["_trackPageview",i])}}function h(i){return function(){pageTracker._trackPageview(i)}}m.each(function(){l=a(this);b=l.attr("href");c=false;if(b!==undefined){b=b.toLowerCase();for(g=0,f=d.extensions.length;g<f;g++){if(b.indexOf("."+d.extensions[g].toLowerCase())!==-1){c=true}}}if(c){if(d.asynch){l.click(k(b))}else{l.click(h(b))}}})}})}(jQuery));(function(e,a){var b;var d="",c=-1;e.fn.extend({UKDA_ShowMore:function(g){var f={saveStateToCookie:true,daysToCookieExpiry:0.125};g=e.extend(f,g);if(d===""){d=escape(window.location)}return this.each(function(){var k=e(this),i=g;k.removeClass("nojs");c+=1;var j="showmore_"+d+"_"+c;var m="More",n=k.attr("title");if(n){m=n}var q=e(document.createElement("A")).text("Show "+m).attr({href:"#","class":"showmore show"}).insertBefore(k);var l=e(document.createElement("A")).text("Hide "+m).attr({href:"#","class":"showmore hide"}).insertAfter(q);q.click(function(){b("show",j,k,q,l,i);return false});l.click(function(){b("hide",j,k,q,l,i);return false});var h="hide";if(i.saveStateToCookie){var o=a.read(j);if(o!==null){h=a.read(j)}}if(h==="hide"){k.hide();l.hide()}else{q.hide()}})}});b=function(h,g,k,j,f,i){k.toggle();j.toggle();f.toggle();if(i.saveStateToCookie){a.write(g,h,i.daysToCookieExpiry)}}}(jQuery,UKDAJS.Cookie));(function(b,c){var a;b.fn.extend({UKDA_SimpleForm:function(e){var d={requireInputsWithClass:"required",validateEmail:true,supportEmailAddress:"[Support Email Address]",overlayLabels:false};e=b.extend(d,e);return this.each(function(){var i=b(this),j=e;i.removeClass("nojs");var k=b("LABEL",i);var g,h,f;if(j.overlayLabels){k.each(function(){g=b(this);if(!g.hasClass("no-overlay")){h=g.attr("for");f=b("#"+h);if(f.val()!==""){g.hide()}a(g,f)}})}i.submit(function(){var o="",n,l=b("INPUT:text, TEXTAREA",i),m=j.requireInputsWithClass;l.each(function(){f=b(this);n=k.filter('[for="'+f.attr("id")+'"]').text();if(m!==null){if(f.hasClass(m)){if(f.val()===""){o+="\n"+n}else{if(j.validateEmail){var p=n.toLowerCase();if(p.indexOf("email")!==-1){if(!(c.isEmail(f.val()))){o+="\n"+n+" is not recognised as a valid email address. If you have entered it correctly, please email "+j.supportEmailAddress+" directly, and we will be happy to help."}}}}}}});if(o){o="Please fill in the following box(es):"+o;alert(o);return false}else{return true}})})}});a=function(e,d){d.focus(function(){e.hide()});d.blur(function(){if(d.val()===""){e.show()}})}}(jQuery,UKDAJS.Validate));(function(e,b,d,f){var c,a;e.extend({UKDA_GetOpenOnIndexes:function(j){var h=null,i=null,g={openOnQueryKey:null,openOnCookieName:null,openOnIndexes:null,multiple:false,rules:null,stringIndexMapArray:null};j=e.extend(g,j);if(j.openOnQueryKey!==null){h=d.getCurrentValue(j.openOnQueryKey);h=unescape(h);i=c(h,j.multiple,j.rules,j.stringIndexMapArray,"query")}if(j.openOnCookieKey!==null&&i===null){h=b.read(j.openOnCookieKey);i=c(h,j.multiple,j.rules,j.stringIndexMapArray,"cookie")}if(j.openOnIndexes!==null&&i===null){i=c(j.openOnIndexes,j.multiple,j.rules,j.stringIndexMapArray,"default")}return i}});c=function(m,g,o,p,l){var n=null,k,h;if(m!==null&&m!==""){if(l!=="default"){if(f.isInArrayFormat(m)){m=m.slice(1,-1);m=m.split(",")}if(f.isArray(m)){for(k=0,h=m.length;k<h;k++){m[k]=a(m[k],p)}}else{m=a(m,p)}}if(f.isValid(m,0,o)){n=m}if(g){if(f.isValid(m,5,o)){n=m}}}return n};a=function(h,i){var g;if(i!==null){g=e.inArray(h.toLowerCase(),i);if(g!==-1){h=g}}if(!f.isInt(h)){if(!(isNaN(h))){h=parseInt(h,10)}}return h}}(jQuery,UKDAJS.Cookie,UKDAJS.Url.QueryString,UKDAJS.Validate));(function(d,a){var f,b,e,c;d.fn.extend({UKDA_Accordion:function(h){var g={maxOneOpen:true,openOnQueryKey:null,openOnCookieKey:null,openOnIndexes:null,mapIdString:true,daysToCookieExpiry:0.125};h=d.extend(g,h);return this.each(function(){var j=d(this),l=h,n,i,k,m=[];if(j.is("OL")||j.is("UL")){n=j.children();i=n.children("OL, UL");i.detach();n.each(function(o){k=d(this);b(k,m,o,l);k.append(i.eq(o))})}else{if(j.is("DL")){n=d("DT",j);i=d("DD",j);n.each(function(o){k=d(this);b(k,m,o,l)})}}d("A.title",n).each(function(o){d(this).bind("click",{index:o},function(p){e(n,i,p.data.index,l);return false})});i.hide();f(n,i,m,l)})}});f=function(o,h,n,m){var g,l,k;g=(m.maxOneOpen)?false:true;openOnIndexes=d.UKDA_GetOpenOnIndexes({openOnQueryKey:m.openOnQueryKey,openOnCookieKey:m.openOnCookieKey,openOnIndexes:m.openOnIndexes,multiple:g,rules:["GTE_0","LT_"+o.length],stringIndexMapArray:n});if(openOnIndexes!==null){if(d.isArray(openOnIndexes)){for(l=0,k=openOnIndexes.length;l<k;l++){e(o,h,openOnIndexes[l],m)}}else{e(o,h,openOnIndexes,m)}}};b=function(j,l,g,h){var k=d.trim(j.text());j.empty();d(document.createElement("SPAN")).text(k).appendTo(d(document.createElement("A")).attr({href:"#",title:"Open "+k,"class":"title"}).appendTo(j));if(h.mapIdString){l[g]=j.prop("id").toLowerCase()}else{l[g]=k.toLowerCase()}};e=function(m,g,h,k){var j=m.eq(h),i=g.eq(h),l=d("A.title",j).eq(0);if(j.hasClass("open")){j.removeClass("open");i.hide();l.attr("title","Open "+d.trim(l.text()))}else{if(k.maxOneOpen){g.hide();m.removeClass("open");d("A.title",m).each(function(n){d(this).attr("title","Open "+d.trim(d(this).text()))})}j.addClass("open");i.show();l.attr("title","Close "+d.trim(l.text()))}c(m,k)};c=function(l,j){var i=j.openOnCookieKey,g=j.daysToCookieExpiry,k,h;if(i!==null){k="";l.each(function(m){h=d(this);if(h.hasClass("open")){if(k!==""){k+=","+m}else{k+=m}}});if(k===""){a.remove(i)}else{if(k.indexOf(",")===-1){a.write(i,k,g)}else{a.write(i,"["+k+"]",g)}}}}}(jQuery,UKDAJS.Cookie));(function(e,l,v){var s,n,w,a,p,f,o,g,i,c,b,q,j,m,r,h,u,d,t,k;e.fn.extend({UKDA_Carousel:function(y){var x={openOnQueryKey:null,openOnCookieKey:null,openOnIndexes:0,randomStartItem:true,horizontal:true,autoRotate:false,pauseOnHover:false,rotationSpeed:7500,animationSpeed:600,highlightControlPostMove:false,copyControlsAbove:false,collapseToFitHeight:false,daysToCookieExpiry:0.125};y=e.extend(x,y);return this.each(function(){var G=e(this),z=y,B="",A=e("DIV.carousel-window",G).eq(0),D=e("DIV.carousel-items",G).eq(0),H=e("DIV.carousel-controls",G).eq(0),E=e("A.previous",G).eq(0),F=e("A.next",G).eq(0),C;if(A.length===0){B+="There should be exactly one DIV.carousel-window in DIV.carousel.\n"}if(D.length===0){B+="There should be exactly one DIV.carousel-items in DIV.carousel.\n"}if(H.length!==0){if(H.children("A").length!==D.children("DIV").length){B+="There should be exactly the same number of As (links) in DIV.carousel-controls as there are DIVs (items) in DIV.carousel-items.\n"}}if(E.length===0){B+="There should be exactly one A.previous in DIV.carousel.\n"}if(F.length===0){B+="There should be exactly one A.next in DIV.carousel.\n"}if(B===""){G.removeClass("nojs");C=h(D,z);if(z.horizontal){D.css({width:(C.itemWOrH*C.totalItems)})}else{D.css({height:(C.itemWOrH*C.totalItems)})}D.children("DIV").each(function(I){e(this).attr("index",I)});if(H.length!==0){if(z.copyControlsAbove){A.before(H.clone().addClass("controls-top"));H.addClass("controls-bottom");H=e("DIV.carousel-controls",G)}w(G,D,H,C,z)}s(G,D,H,E,C,z);n(G,D,H,F,C,z);g(G,D,H,C,z);a(A,D,F,z)}else{alert(B)}})}});w=function(B,y,z,x,A){z.each(function(){e(this).children("A").each(function(C){e(this).bind("click",{index:C},function(E){var D=E.data.index;y.stop();m(B,y,z,D,A);j(y,x.offset,x.totalItems,D,A);r(B,y,z,D,A);return false})})})};s=function(C,z,A,y,x,B){y.click(function(){var E=u(z),G=E-1,F=x.totalItems-1,D;G=(G===-1)?F:G;m(C,z,A,G,B);if(B.horizontal){D=parseInt(z.css("left"),10)+x.itemWOrH;z.not(":animated").animate({left:D},B.animationSpeed,function(){i(z,x.offset,B);r(C,z,A,G,B)})}else{D=parseInt(z.css("top"),10)+x.itemWOrH;z.not(":animated").animate({top:D},B.animationSpeed,function(){i(z,x.offset,B);r(C,z,A,G,B)})}return false})};n=function(C,z,A,x,y,B){x.click(function(){var E=u(z),F=(E+1),G=0,D;F=(F===y.totalItems)?G:F;m(C,z,A,F,B);if(B.horizontal){D=parseInt(z.css("left"),10)-y.itemWOrH;z.not(":animated").animate({left:D},B.animationSpeed,function(){c(z,y.offset,B);r(C,z,A,F,B)})}else{D=parseInt(z.css("top"),10)-y.itemWOrH;z.not(":animated").animate({top:D},B.animationSpeed,function(){c(z,y.offset,B);r(C,z,A,F,B)})}return false})};a=function(B,z,x,C){if(C.autoRotate){var y,D,A;y=e(document.createElement("A"));y.addClass("pauserestart");B.before(y);D=o(y,x,D,C.rotationSpeed);A=false;y.click(function(){if(y.text()==="Pause"){D=f(y,D);A=true}else{D=o(y,x,D,C.rotationSpeed);A=false}return false});if(C.pauseOnHover){z.hover(function(){if(!A){D=f(y,D)}},function(){if(!A){D=o(y,x,D,C.rotationSpeed)}})}}};p=function(x){x.click()};f=function(x,y){x.text("Restart");x.attr({href:"#",title:"Restart"});x.removeClass("pause");x.addClass("restart");return clearInterval(y)};o=function(y,x,A,z){y.text("Pause");y.attr({href:"#",title:"Pause"});y.removeClass("restart");y.addClass("pause");return setInterval(function(){p(x)},z)};g=function(D,z,A,y,C){var E=y.offset,B=y.totalItems,x;x=(C.randomStartItem)?v.randomIntInRange(0,(B-1)):C.openOnIndexes;x=e.UKDA_GetOpenOnIndexes({openOnQueryKey:C.openOnQueryKey,openOnCookieKey:C.openOnCookieKey,openOnIndexes:x,rules:["GTE_0","LT_"+B]});m(D,z,A,x,C);if(x===0){i(z,E,C)}else{j(z,E,B,x,C)}r(D,z,A,x,C)};i=function(y,B,A){var x=y.children(),z=(A.horizontal)?"left":"top";x.eq(0).before(x.eq(x.length-1));y.css(z,B)};c=function(y,B,A){var x=y.children(),z=(A.horizontal)?"left":"top";x.eq(x.length-1).after(x.eq(0));y.css(z,B)};b=function(z,B,x,A){var y;for(y=0;y<x;y++){c(z,B,A)}};q=function(z,B,x,A){var y;for(y=0;y<x;y++){i(z,B,A)}};j=function(B,E,D,z,C){var x,A,y;y=u(B);if(y<z){x=z-y;A=(D-z)+y;if(x<=A){b(B,E,x,C)}else{q(B,E,A,C)}}else{if(y>z){x=(D-y)+z;A=y-z;if(A<=x){q(B,E,A,C)}else{b(B,E,x,C)}}else{i(B,E,C);c(B,E,C)}}};m=function(B,y,z,x,A){if(!A.highlightControlPostMove){k(B,z,x)}};r=function(B,y,z,x,A){if(A.highlightControlPostMove){k(B,z,x)}d(y,x,A);t(x,A)};h=function(y,A){var x=(A.horizontal)?y.outerWidth():y.outerHeight(),B=x*(-1),z=y.children("DIV").length;return{itemWOrH:x,offset:B,totalItems:z}};u=function(x){return parseInt(x.children("DIV").eq(1).attr("index"),10)};d=function(y,x,z){if(z.collapseToFitHeight){y.children().height(1);y.children("[index="+x+"]").height("auto")}};t=function(x,y){if(y.openOnCookieKey!==null){l.write(y.openOnCookieKey,x,y.daysToCookieExpiry)}};k=function(A,z,y){if(z.length!==0){var x;z.each(function(){x=e(this).children("A");x.each(function(B){if(e(this).hasClass("selected")){e(this).removeClass("selected")}});x.eq(y).addClass("selected")})}}}(jQuery,UKDAJS.Cookie,UKDAJS.Number));(function(l,g,c,j,h){var f,q,k,n,p,e,d,i,m,a,o,b;g.fn.extend({UKDA_Paginator:function(s){var r={openOnQueryKey:null,openOnCookieKey:null,openOnIndexes:1,fixOnClass:null,topItemsToFix:0,itemsPerPage:10,linksPreviousNext:true,linksFirstLast:true,linksNumericalMax:5,linksReal:false,controlsTextPrefix:"Page:",controlsPosition:2,progressPages:true,progressItems:true,progressPosition:2,daysToCookieExpiry:0.125};s=g.extend(r,s);return this.each(function(){var D=g(this),u=s,C=g("DIV.item",D),w=C.length,z,t=0,B=0,v=u.itemsPerPage,x,A,y;u.linksReal=(u.openOnQueryKey!==null&&u.linksReal)?true:false;if(u.fixOnClass!==null){z=C.not("."+u.fixOnClass);t=z.length;B=w-t;v=v-B}else{if(u.topItemsToFix>0){B=u.topItemsToFix;z=C.slice(B);t=w-B;v=v-B}else{z=C;t=w}}x=Math.ceil(t/v);if(x>1){A=g(l.createElement("DIV")).addClass("paginator-controls");k(A,x,u);if(!(u.linksReal)){g("A",A).click(function(){e(D,A,z,B,w,v,x,g(this).text(),y,u);return false})}A=p(D,A,u.controlsPosition);n(D,u);y=a(A);D.attr("current",0);f(D,A,z,B,w,v,x,y,u)}})}});f=function(A,x,w,y,t,s,u,v,r){var z;z=g.UKDA_GetOpenOnIndexes({openOnQueryKey:r.openOnQueryKey,openOnCookieKey:r.openOnCookieKey,openOnIndexes:r.openOnIndexes,rules:["GT_0","LTE_"+u]});e(A,x,w,y,t,s,u,z,v,r)};q=function(u,A,y,v,t,B,s){var w=s.openOnQueryKey,r="#",x,z;if(s.linksReal){switch(A){case"Prev":case"Next":break;case"First":r=h.getCurrentWithNewKeyValue(w,"1");break;case"Last":r=h.getCurrentWithNewKeyValue(w,t.toString(10));break;default:r=h.getCurrentWithNewKeyValue(w,A.toString(10));break}}x=g(l.createElement("A")).text(A).attr({href:r,title:y,"class":v});z=g(l.createElement("SPAN")).text(A).addClass(v);if(B){u.prepend(z);u.prepend(x)}else{u.append(x);u.append(z)}};k=function(t,v,w){var u,r=false,s=true;for(u=1;u<=v;u++){q(t,u,"Page "+u,"page"+u,v,r,w)}if(w.linksPreviousNext){q(t,"Prev","Previous page","previous",v,s,w);q(t,"Next","Next page","next",v,r,w)}if(w.linksFirstLast){q(t,"First","First page","first",v,s,w);q(t,"Last","Last page","last",v,r,w)}if(w.controlsTextPrefix!==null){g(l.createElement("SPAN")).text(w.controlsTextPrefix).addClass("textprefix").prependTo(t)}};n=function(v,t){var r,s,u;if(t.progressPages||t.progressItems){r=g(l.createElement("DIV"));r.addClass("paginator-progress");if(t.progressPages){s=g(l.createElement("SPAN"));s.addClass("progress-pages").appendTo(r)}if(t.progressItems){u=g(l.createElement("SPAN"));u.addClass("progress-items").appendTo(r)}r=p(v,r,t.progressPosition)}};p=function(u,s,r){var t;switch(r){case 0:u.prepend(s);break;case 1:u.append(s);break;case 2:u.prepend(s);t=s.clone(true);u.append(t);s=s.add(t);break}return s};e=function(F,z,x,B,t,s,u,v,w,r){var A,E,C,y,D;d(z,r);A=o(F,u,A,v,r);g(".page"+A,z).toggle();if(A===1){w.prev.toggle();w.first.toggle()}else{if(A===u){w.next.toggle();w.last.toggle()}}if(r.linksReal&&r.linksPreviousNext){C=r.openOnQueryKey;y=((A-1)>0)?A-1:0;D=((A+1)<=u)?A+1:u;w.prev.attr("href",h.getCurrentWithNewKeyValue(C,y.toString(10)));w.next.attr("href",h.getCurrentWithNewKeyValue(C,D.toString(10)))}i(z,u,A,r.linksNumericalMax);E=m(x,s,A);b(F,B,t,u,A,E,r)};d=function(r,s){g("A",r).each(function(){g(this).show()});if(s.controlsTextPrefix!==null){g("SPAN",r).not(".textprefix").each(function(){g(this).hide()})}else{g("SPAN",r).each(function(){g(this).hide()})}};i=function(t,w,v,s){var r,u;if(s<w){r=j.surroundingIntRange(v,s,{min:1,max:w,offset:true});for(u=w;u>0;u--){if(u<r.start||u>r.end){g("A.page"+u,t).toggle()}}}};m=function(v,t,u){var s=(t*(u-1)),r=(t*u)-1;v.each(function(w){if(w<s||w>r){g(this).hide()}else{g(this).show()}});return{startOfRange:s,endOfRange:r}};a=function(r){var u=g(".previous",r),s=g(".next",r),v=g(".first",r),t=g(".last",r);return{prev:u,next:s,first:v,last:t}};o=function(v,t,s,r,u){s=parseInt(v.attr("current"),10);switch(r){case"Prev":s--;break;case"Next":s++;break;case"First":s=1;break;case"Last":s=t;break;default:s=parseInt(r,10);break}v.attr("current",s);if(u.openOnCookieKey!==null){c.write(u.openOnCookieKey,s,u.daysToCookieExpiry)}return s};b=function(z,y,s,t,v,A,r){if(r.progressPages||r.progressItems){var u=A.startOfRange+1,x=A.endOfRange+1,w;if(r.progressPages){g("SPAN.progress-pages",z).html("Page <span>"+v+"</span> of <span>"+t+"</span>")}if(r.progressItems){if(y>0){w="Items <span>1-"+y+" and "+(u+y)+"-"+Math.min((x+y),s)+"</span> of <span>"+s+"</span>"}else{w="Items <span>"+u+"-"+Math.min((x),s)+"</span> of <span>"+s+"</span>"}g("SPAN.progress-items",z).html(w)}}}}(document,jQuery,UKDAJS.Cookie,UKDAJS.Number,UKDAJS.Url.QueryString));(function(d,b,c){var e,a;d.fn.extend({UKDA_Tabs:function(g){var f={openOnQueryKey:null,openOnCookieKey:null,openOnIndex:0,linksReal:false,daysToCookieExpiry:0.125};g=d.extend(f,g);return this.each(function(){var j=d(this),k=g,i=d("UL A",j),h=j.children("DIV");k.linksReal=(k.openOnQueryKey!==null&&k.linksReal)?true:false;j.addClass("js");if(!(k.linksReal)){i.each(function(l){d(this).bind("click",{index:l},function(m){a(i,h,m.data.index,k);return false})})}else{i.each(function(l){d(this).attr("href",c.getCurrentWithNewKeyValue(k.openOnQueryKey,l.toString(10)))})}e(i,h,k)})}});e=function(h,f,i){var g;g=d.UKDA_GetOpenOnIndexes({openOnQueryKey:i.openOnQueryKey,openOnCookieKey:i.openOnCookieKey,openOnIndex:i.openOnIndex,rules:["GTE_0","LT_"+f.length]});a(h,f,g,i)};a=function(g,f,h,i){f.hide();g.removeClass("selected");f.eq(h).show();g.eq(h).addClass("selected");if(i.openOnCookieKey!==""){b.write(i.openOnCookieKey,h,i.daysToCookieExpiry)}}}(jQuery,UKDAJS.Cookie,UKDAJS.Url.QueryString));
