(function(a){a.extend({UKDA_LinkServiceImages:function(){var d=a("#ourservices .carousel-items").children("DIV");var c,b;d.each(function(){c=a(this).children("A").eq(0);b=c.clone().prependTo(c);b.addClass("imglink")})}})})(jQuery);(function(f,d){var c,b,e,a;d.fn.extend({UKDA_DataLifeCycle:function(h){var g={autoRotate:true,rotationSpeed:7500};h=d.extend(g,h);return this.each(function(){var k=d(this),l=h;d("#overview-boxes-2col",k).addClass("js");var n=d("DIV DIV DIV",k);n.each(function(){d(this).hide()});var m=d("LI>SPAN",k);m.each(function(){d(this).replaceWith(d(f.createElement("A")).html(d(this).html()).attr("href","#"))});var j=d("A",k);j.each(function(p){d(this).bind("click",{index:p},function(q){c(k,j,n,q.data.index,l);return false})});c(k,j,n,0,l);if(l.autoRotate){var i=d(f.createElement("A"));i.addClass("pauserestart");k.prepend(i);var o=a(i,k,j,o,l.rotationSpeed);i.click(function(){if(i.text()==="Pause"){o=e(i,o)}else{o=a(i,k,j,o,l.rotationSpeed)}return false})}})}});c=function(j,i,m,h,l){var g=i.eq(h);var k=m.eq(h);m.hide();i.parent().removeClass("selected");k.show();g.parent().addClass("selected");j.attr("index",h)};b=function(i,h){var g=i.attr("index");if((parseInt(g,10)+1)===h.length){g=0}else{g=parseInt(g,10)+1}h.eq(g).click()};e=function(g,h){g.text("Restart");g.attr({href:"#",title:"Restart"});g.removeClass("pause");g.addClass("restart");return clearInterval(h)};a=function(g,i,h,k,j){g.text("Pause");g.attr({href:"#",title:"Pause"});g.removeClass("restart");g.addClass("pause");return setInterval(function(){b(i,h)},j)}})(document,jQuery);$(document).ready(function(){$("DIV.showmore").UKDA_ShowMore();$("#video-transcript A.hide").clone(true).prependTo(("#video-transcript DIV"));var a=UKDAJS.Url.QueryString.getCurrentValue("id"),b=(a===null)?false:true;$("#faqs DL.accordion").each(function(c){if(b){UKDAJS.Cookie.remove("faqsec"+(c+1))}$(this).UKDA_Accordion({maxOneOpen:false,openOnQueryKey:"id",openOnCookieKey:"faqsec"+(c+1)})});$("#reportspublications DL.accordion").UKDA_Accordion({openOnQueryKey:"type",openOnCookieKey:"reportspublications",openOnIndexes:0});$("#person DL.accordion").UKDA_Accordion({maxOneOpen:false,openOnIndexes:0});$("#newseventsarchive OL.accordion").UKDA_Accordion({openOnQueryKey:"year",openOnIndexes:0,mapIdString:false});$("#features DIV.carousel").UKDA_Carousel({randomStartItem:false,autoRotate:true,pauseOnHover:true,rotationSpeed:6250,animationSpeed:2000});$("#usefulsites DIV.carousel").UKDA_Carousel({randomStartItem:false,autoRotate:true,pauseOnHover:true,rotationSpeed:6250,animationSpeed:2000});$("#directions DIV.carousel").UKDA_Carousel({randomStartItem:false});$("#whatwedo DIV.carousel").UKDA_Carousel({collapseToFitHeight:true});$("#searchtips DIV.carousel").UKDA_Carousel({collapseToFitHeight:true});$("#datalifecycle DIV.carousel").UKDA_Carousel({collapseToFitHeight:true});$("#whatwedo-homepage DIV.carousel").UKDA_Carousel();$("#ourservices DIV.carousel").UKDA_Carousel();$("#newscurrent DIV.paginator").UKDA_Paginator({openOnQueryKey:"newspage",itemsPerPage:7,linksPreviousNext:false,linksFirstLast:false,linksNumericalMax:1000,linksReal:true,controlsTextPrefix:"More",controlsPosition:1,progressPages:false,progressItems:false});$("#eventscurrent DIV.paginator").UKDA_Paginator({openOnQueryKey:"eventspage",itemsPerPage:7,linksPreviousNext:false,linksFirstLast:false,linksNumericalMax:1000,linksReal:true,controlsTextPrefix:"More",controlsPosition:1,progressPages:false,progressItems:false});$("#site-search").UKDA_SimpleForm({overlayLabels:true});$("#site-search2").UKDA_SimpleForm({overlayLabels:true});$("#publication-search").UKDA_SimpleForm({overlayLabels:true});$(".newslettersearch").UKDA_SimpleForm({overlayLabels:true});$("#haveaquestion").UKDA_SimpleForm({supportEmailAddress:"info@data-archive.ac.uk",overlayLabels:true});$("#usedourdata").UKDA_SimpleForm({supportEmailAddress:"comms@data-archive.ac.uk",overlayLabels:true});$("#newslettersignup").UKDA_SimpleForm({supportEmailAddress:"comms@data-archive.ac.uk",overlayLabels:true});$("#departments DIV.selector").UKDA_Selector({selectLabel:"View contact details for:"});$("#international-archives").UKDA_Tabs({openOnQueryKey:"index",linksReal:true});$.UKDA_FixHashAnchors();$.UKDA_PrintUrlsAsFootNotes({containerId:"content"});$.UKDA_TrackDocsInGA()});$(document).ready(function(){$.UKDA_LinkServiceImages();$("#datalifecycle-diagram").UKDA_DataLifeCycle()});
