
(function(g){if(/1\.(0|1|2)\.(0|1|2)/.test(g.fn.jquery)||/^1.1/.test(g.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later! You are using v"+g.fn.jquery);return}g.fn._fadeIn=g.fn.fadeIn;g.blockUI=function(o){d(window,o)};g.unblockUI=function(o){h(window,o)};

g.growlUI=function(s,q,r){var o=g('<div class="growlUI"></div>');if(s){o.append("<h1>"+s+"</h1>")}if(q){o.append("<h2>"+q+"</h2>")}if(r==undefined){r=3000}g.blockUI({message:o,fadeIn:700,fadeOut:1000,centerY:false,timeout:r,showOverlay:false,css:g.blockUI.defaults.growlCSS})};g.fn.block=function(o){return this.each(function(){if(g.css(this,"position")=="static"){this.style.position="relative"}if(g.browser.msie){this.style.zoom=1}d(this,o)})};g.fn.unblock=function(o){return this.each(function(){h(this,o)})};g.blockUI.version=2.14;g.blockUI.defaults={message:"<h1>Please wait...</h1>",css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},overlayCSS:{backgroundColor:"#000",opacity:"0.6"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:"0.6",cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var e=g.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);var c=null;var f=[];function d(r,o){var C=(r==window);var s=o&&o.message!==undefined?o.message:undefined;o=g.extend({},g.blockUI.defaults,o||{});o.overlayCSS=g.extend({},g.blockUI.defaults.overlayCSS,o.overlayCSS||{});var B=g.extend({},g.blockUI.defaults.css,o.css||{});s=s===undefined?o.message:s;if(C&&c){h(window,{fadeOut:0})}if(s&&typeof s!="string"&&(s.parentNode||s.jquery)){var v=s.jquery?s[0]:s;var A={};g(r).data("blockUI.history",A);A.el=v;A.parent=v.parentNode;A.display=v.style.display;A.position=v.style.position;if(A.parent){A.parent.removeChild(v)}}var D=o.baseZ;var y=(g.browser.msie)?g('<iframe id="blockUI-layer1-IFRAME" class="blockUI" style="z-index:'+(D++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="about:blank"></iframe>'):g('<div    id="blockUI-layer1" class="blockUI" style="display:none"></div>');var x=g('<div id="blockUI-layer2" class="blockUI blockOverlay" style="z-index:'+(D++)+';display:none;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var u=C?g('<div id="blockUI-layer3" class="blockUI blockMsg blockPage" style="z-index:'+D+';display:none;position:fixed"></div>'):g('<div id="blockUI-layer3" class="blockUI blockMsg blockElement" style="z-index:'+D+';display:none;position:absolute"></div>');if(s){u.css(B)}if(!o.applyPlatformOpacityRules||!(g.browser.mozilla&&/Linux/.test(navigator.platform))){x.css(o.overlayCSS)}x.css("position",C?"fixed":"absolute");if(g.browser.msie){y.css("opacity","0.0")}g([y[0],x[0],u[0]]).appendTo(C?"body":r);var G=g.browser.msie&&(!g.boxModel||g("object,embed",C?null:r).length>0);if(e||G&&u[0].style.setExpression){if(C&&o.allowBodyStretch&&g.boxModel){g("html,body").css("height","100%")}if((e||!g.boxModel)&&!C){var H=k(r,"borderTopWidth"),w=k(r,"borderLeftWidth");var F=H?"(0 - "+H+")":0;var q=w?"(0 - "+w+")":0}g.each([y,x,u],function(t,K){var z=K[0].style;z.position="absolute";if(t<2){C?z.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+o.quirksmodeOffsetHack+') + "px"'):z.setExpression("height",'this.parentNode.offsetHeight + "px"');C?z.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):z.setExpression("width",'this.parentNode.offsetWidth + "px"');if(q){z.setExpression("left",q)}if(F){z.setExpression("top",F)}}else{if(o.centerY){if(C){z.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}z.marginTop=0}else{if(!o.centerY&&C){var I=(o.css&&o.css.top)?parseInt(o.css.top):0;var J="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+I+') + "px"';z.setExpression("top",J)}}}})}if(s){u.append(s);if(s.jquery||s.nodeType){g(s).show()}}if(g.browser.msie&&o.showOverlay){y.show()}if(o.fadeIn){if(o.showOverlay){x._fadeIn(o.fadeIn)}if(s){u.fadeIn(o.fadeIn)}}else{if(o.showOverlay){x.show()}if(s){u.show()}}j(1,r,o);if(C){c=u[0];f=g(":input:enabled:visible",c);if(o.focusInput){setTimeout(n,20)}}else{a(u[0],o.centerX,o.centerY)}if(o.timeout){var E=setTimeout(function(){C?g.unblockUI(o):g(r).unblock(o)},o.timeout);g(r).data("blockUI.timeout",E)}}function h(s,t){var r=s==window;var q=g(s);var u=q.data("blockUI.history");var v=q.data("blockUI.timeout");if(v){clearTimeout(v);q.removeData("blockUI.timeout")}t=g.extend({},g.blockUI.defaults,t||{});j(0,s,t);var o=r?g("body").children().filter(".blockUI"):g(".blockUI",s);if(r){c=f=null}if(t.fadeOut){o.fadeOut(t.fadeOut);setTimeout(function(){i(o,u,t,s)},t.fadeOut)}else{i(o,u,t,s)}}function i(o,s,r,q){o.each(function(t,u){if(this.parentNode){this.parentNode.removeChild(this)}});if(s&&s.el){s.el.style.display=s.display;s.el.style.position=s.position;if(s.parent){s.parent.appendChild(s.el)}g(s.el).removeData("blockUI.history")}if(typeof r.onUnblock=="function"){r.onUnblock(q,r)}}function j(o,t,u){var s=t==window,r=g(t);if(!o&&(s&&!c||!s&&!r.data("blockUI.isBlocked"))){return}if(!s){r.data("blockUI.isBlocked",o)}if(o&&!u.showOverlay){return}var q="mousedown mouseup keydown keypress";o?g(document).bind(q,u,l):g(document).unbind(q,l)}function l(s){if(s.keyCode&&s.keyCode==9){if(c&&s.data.constrainTabKey){var r=f;var q=!s.shiftKey&&s.target==r[r.length-1];var o=s.shiftKey&&s.target==r[0];if(q||o){setTimeout(function(){n(o)},10);return false}}}if(g(s.target).parents("div.blockMsg").length>0){return true}return g(s.target).parents().children().filter("div.blockUI").length==0}function n(o){if(!f){return}var q=f[o===true?f.length-1:0];if(q){q.focus()}}function a(v,o,z){var w=v.parentNode,u=v.style;var q=((w.offsetWidth-v.offsetWidth)/2)-k(w,"borderLeftWidth");var r=((w.offsetHeight-v.offsetHeight)/2)-k(w,"borderTopWidth");if(o){u.left=q>0?(q+"px"):"0"}if(z){u.top=r>0?(r+"px"):"0"}}function k(o,q){return parseInt(g.css(o,q))||0}})(jQuery);

(function(c){c.fn.ajaxSubmit=function(u){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof u=="function"){u={success:u}}var f=this.attr("action")||window.location.href;f=(f.match(/^([^#]+)/)||[])[1];f=f||"";u=c.extend({url:f,type:this.attr("method")||"GET"},u||{});var w={};this.trigger("form-pre-serialize",[this,u,w]);if(w.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(u.beforeSerialize&&u.beforeSerialize(this,u)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var o=this.formToArray(u.semantic);if(u.data){u.extraData=u.data;for(var g in u.data){if(u.data[g] instanceof Array){for(var h in u.data[g]){o.push({name:g,value:u.data[g][h]})}}else{o.push({name:g,value:u.data[g]})}}}if(u.beforeSubmit&&u.beforeSubmit(o,this,u)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[o,this,u,w]);if(w.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var e=c.param(o);if(u.type.toUpperCase()=="GET"){u.url+=(u.url.indexOf("?")>=0?"&":"?")+e;u.data=null}else{u.data=e}var v=this,l=[];if(u.resetForm){l.push(function(){v.resetForm()})}if(u.clearForm){l.push(function(){v.clearForm()})}if(!u.dataType&&u.target){var s=u.success||function(){};l.push(function(j){c(u.target).html(j).each(s,arguments)})}else{if(u.success){l.push(u.success)}}u.success=function(q,k){for(var n=0,j=l.length;n<j;n++){l[n].apply(u,[q,k,v])}};var d=c("input:file",this).fieldValue();var t=false;for(var i=0;i<d.length;i++){if(d[i]){t=true}}if(u.iframe||t){if(u.closeKeepAlive){c.get(u.closeKeepAlive,r)}else{r()}}else{c.ajax(u)}this.trigger("form-submit-notify",[this,u]);return this;function r(){var y=v[0];if(c(":input[name=submit]",y).length){alert('Error: Form elements must not be named "submit".');return}var q=c.extend({},c.ajaxSettings,u);var I=jQuery.extend(true,{},c.extend(true,{},c.ajaxSettings),q);var x="jqFormIO"+(new Date().getTime());var E=c('<iframe id="'+x+'" name="'+x+'" src="about:blank" />');var G=E[0];E.css({position:"absolute",top:"-1000px",left:"-1000px"});var H={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;E.attr("src","about:blank")}};var F=q.global;if(F&&!c.active++){c.event.trigger("ajaxStart")}if(F){c.event.trigger("ajaxSend",[H,q])}if(I.beforeSend&&I.beforeSend(H,I)===false){I.global&&jQuery.active--;return}if(H.aborted){return}var k=0;var A=0;var j=y.clk;if(j){var z=j.name;if(z&&!j.disabled){u.extraData=u.extraData||{};u.extraData[z]=j.value;if(j.type=="image"){u.extraData[name+".x"]=y.clk_x;u.extraData[name+".y"]=y.clk_y}}}setTimeout(function(){var L=v.attr("target"),J=v.attr("action");y.setAttribute("target",x);if(y.getAttribute("method")!="POST"){y.setAttribute("method","POST")}if(y.getAttribute("action")!=q.url){y.setAttribute("action",q.url)}if(!u.skipEncodingOverride){v.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(q.timeout){setTimeout(function(){A=true;B()},q.timeout)}var K=[];try{if(u.extraData){for(var M in u.extraData){K.push(c('<input type="hidden" name="'+M+'" value="'+u.extraData[M]+'" />').appendTo(y)[0])}}E.appendTo("body");G.attachEvent?G.attachEvent("onload",B):G.addEventListener("load",B,false);y.submit()}finally{y.setAttribute("action",J);L?y.setAttribute("target",L):v.removeAttr("target");c(K).remove()}},10);var C=0;function B(){if(k++){return}G.detachEvent?G.detachEvent("onload",B):G.removeEventListener("load",B,false);var J=true;try{if(A){throw"timeout"}var K,M;M=G.contentWindow?G.contentWindow.document:G.contentDocument?G.contentDocument:G.document;if((M.body==null||M.body.innerHTML=="")&&!C){C=1;k--;setTimeout(B,100);return}H.responseText=M.body?M.body.innerHTML:null;H.responseXML=M.XMLDocument?M.XMLDocument:M;H.getResponseHeader=function(O){var N={"content-type":q.dataType};return N[O]};if(q.dataType=="json"||q.dataType=="script"){var n=M.getElementsByTagName("textarea")[0];H.responseText=n?n.value:H.responseText}else{if(q.dataType=="xml"&&!H.responseXML&&H.responseText!=null){H.responseXML=D(H.responseText)}}K=c.httpData(H,q.dataType)}catch(L){J=false;c.handleError(q,H,"error",L)}if(J){q.success(K,"success");if(F){c.event.trigger("ajaxSuccess",[H,q])}}if(F){c.event.trigger("ajaxComplete",[H,q])}if(F&&!--c.active){c.event.trigger("ajaxStop")}if(q.complete){q.complete(H,J?"success":"error")}setTimeout(function(){E.remove();H.responseXML=null},100)}function D(n,J){if(window.ActiveXObject){J=new ActiveXObject("Microsoft.XMLDOM");J.async="false";J.loadXML(n)}else{J=(new DOMParser()).parseFromString(n,"text/xml")}return(J&&J.documentElement&&J.documentElement.tagName!="parsererror")?J:null}}};c.fn.ajaxForm=function(d){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){c(this).ajaxSubmit(d);return false}).each(function(){c(":submit,input:image",this).bind("click.form-plugin",function(g){var f=this.form;f.clk=this;if(this.type=="image"){if(g.offsetX!=undefined){f.clk_x=g.offsetX;f.clk_y=g.offsetY}else{if(typeof c.fn.offset=="function"){var h=c(this).offset();f.clk_x=g.pageX-h.left;f.clk_y=g.pageY-h.top}else{f.clk_x=g.pageX-this.offsetLeft;f.clk_y=g.pageY-this.offsetTop}}}setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},10)})})};c.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){c(":submit,input:image",this).unbind("click.form-plugin")})};c.fn.formToArray=function(t){var s=[];if(this.length==0){return s}var e=this[0];var k=t?e.getElementsByTagName("*"):e.elements;if(!k){return s}for(var l=0,q=k.length;l<q;l++){var f=k[l];var g=f.name;if(!g){continue}if(t&&e.clk&&f.type=="image"){if(!f.disabled&&e.clk==f){s.push({name:g+".x",value:e.clk_x},{name:g+".y",value:e.clk_y})}continue}var u=c.fieldValue(f,true);if(u&&u.constructor==Array){for(var h=0,d=u.length;h<d;h++){s.push({name:g,value:u[h]})}}else{if(u!==null&&typeof u!="undefined"){s.push({name:g,value:u})}}}if(!t&&e.clk){var o=e.getElementsByTagName("input");for(var l=0,q=o.length;l<q;l++){var r=o[l];var g=r.name;if(g&&!r.disabled&&r.type=="image"&&e.clk==r){s.push({name:g+".x",value:e.clk_x},{name:g+".y",value:e.clk_y})}}}return s};c.fn.formSerialize=function(d){return c.param(this.formToArray(d))};c.fn.fieldSerialize=function(e){var d=[];this.each(function(){var j=this.name;if(!j){return}var g=c.fieldValue(this,e);if(g&&g.constructor==Array){for(var h=0,f=g.length;h<f;h++){d.push({name:j,value:g[h]})}}else{if(g!==null&&typeof g!="undefined"){d.push({name:this.name,value:g})}}});return c.param(d)};c.fn.fieldValue=function(j){for(var h=[],f=0,d=this.length;f<d;f++){var g=this[f];var e=c.fieldValue(g,j);if(e===null||typeof e=="undefined"||(e.constructor==Array&&!e.length)){continue}e.constructor==Array?c.merge(h,e):h.push(e)}return h};c.fieldValue=function(d,k){var f=d.name,s=d.type,u=d.tagName.toLowerCase();if(typeof k=="undefined"){k=true}if(k&&(!f||d.disabled||s=="reset"||s=="button"||(s=="checkbox"||s=="radio")&&!d.checked||(s=="submit"||s=="image")&&d.form&&d.form.clk!=d||u=="select"&&d.selectedIndex==-1)){return null}if(u=="select"){var l=d.selectedIndex;if(l<0){return null}var q=[],e=d.options;var h=(s=="select-one");var o=(h?l+1:e.length);for(var g=(h?l:0);g<o;g++){var j=e[g];if(j.selected){var r=j.value;if(!r){r=(j.attributes&&j.attributes.value&&!(j.attributes.value.specified))?j.text:j.value}if(h){return r}q.push(r)}}return q}return d.value};c.fn.clearForm=function(){return this.each(function(){c("input,select,textarea",this).clearFields()})};c.fn.clearFields=c.fn.clearInputs=function(){return this.each(function(){var e=this.type,d=this.tagName.toLowerCase();if(e=="text"||e=="password"||d=="textarea"){this.value=""}else{if(e=="checkbox"||e=="radio"){this.checked=false}else{if(d=="select"){this.selectedIndex=-1}}}})};c.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};c.fn.enable=function(d){if(d==undefined){d=true}return this.each(function(){this.disabled=!d})};c.fn.selected=function(d){if(d==undefined){d=true}return this.each(function(){var e=this.type;if(e=="checkbox"||e=="radio"){this.checked=d}else{if(this.tagName.toLowerCase()=="option"){var f=c(this).parent("select");if(d&&f[0]&&f[0].type=="select-one"){f.find("option").selected(false)}this.selected=d}}})};function a(){if(c.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);

(function(){var c;c=jQuery.fn.flash=function(h,g,e,j){var i=e||c.replace;g=c.copy(c.pluginOptions,g);if(!c.hasFlash(g.version)){if(g.expressInstall&&c.hasFlash(6,0,65)){var f={flashvars:{MMredirectURL:location,MMplayerType:"PlugIn",MMdoctitle:jQuery("title").text()}}}else{if(g.update){i=j||c.update}else{return this}}}h=c.copy(c.htmlOptions,f,h);return this.each(function(){i.call(this,c.copy(h))})};c.copy=function(){var g={},f={};for(var h=0;h<arguments.length;h++){var e=arguments[h];if(e==undefined){continue}jQuery.extend(g,e);if(e.flashvars==undefined){continue}jQuery.extend(f,e.flashvars)}g.flashvars=f;return g};c.hasFlash=function(){if(/hasFlash\=true/.test(location)){return true}if(/hasFlash\=false/.test(location)){return false}var f=c.hasFlash.playerVersion().match(/\d+/g);var g=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String(c.pluginOptions.version).match(/\d+/g);for(var e=0;e<3;e++){f[e]=parseInt(f[e]||0);g[e]=parseInt(g[e]||0);if(f[e]<g[e]){return false}if(f[e]>g[e]){return true}}return true};c.hasFlash.playerVersion=function(){try{try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{f.AllowScriptAccess="always"}catch(g){return"6,0,0"}}catch(g){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(g){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(g){}}return"0,0,0"};c.htmlOptions={height:240,flashvars:{},pluginspage:"http://www.adobe.com/go/getflashplayer",src:"#",type:"application/x-shockwave-flash",width:320};c.pluginOptions={expressInstall:false,update:true,version:"6.0.65"};c.replace=function(e){this.innerHTML='<div class="alt">'+this.innerHTML+"</div>";jQuery(this).addClass("flash-replaced").prepend(c.transform(e))};c.update=function(f){var e=String(location).split("?");e.splice(1,0,"?hasFlash=true&");e=e.join("");var g='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+e+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+"</span>";jQuery(this).addClass("flash-update").prepend(g)};function a(){var f="";for(var e in this){if(typeof this[e]!="function"){f+=e+'="'+this[e]+'" '}}return f}function d(){var f="";for(var e in this){if(typeof this[e]!="function"){f+=e+"="+encodeURIComponent(this[e])+"&"}}return f.replace(/&$/,"")}c.transform=function(e){e.toString=a;if(e.flashvars){e.flashvars.toString=d}return"<embed "+String(e)+"/>"};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}})();

jQuery.extend(jQuery.easing,{easeInQuad:function(k,j,c,d,i){return d*(j/=i)*j+c},easeOutQuad:function(k,j,c,d,i){return -d*(j/=i)*(j-2)+c},easeInOutQuad:function(k,j,c,d,i){if((j/=i/2)<1){return d/2*j*j+c}return -d/2*((--j)*(j-2)-1)+c},easeInCubic:function(k,j,c,d,i){return d*(j/=i)*j*j+c},easeOutCubic:function(k,j,c,d,i){return d*((j=j/i-1)*j*j+1)+c},easeInOutCubic:function(k,j,c,d,i){if((j/=i/2)<1){return d/2*j*j*j+c}return d/2*((j-=2)*j*j+2)+c},easeInQuart:function(k,j,c,d,i){return d*(j/=i)*j*j*j+c},easeOutQuart:function(k,j,c,d,i){return -d*((j=j/i-1)*j*j*j-1)+c},easeInOutQuart:function(k,j,c,d,i){if((j/=i/2)<1){return d/2*j*j*j*j+c}return -d/2*((j-=2)*j*j*j-2)+c},easeInQuint:function(k,j,c,d,i){return d*(j/=i)*j*j*j*j+c},easeOutQuint:function(k,j,c,d,i){return d*((j=j/i-1)*j*j*j*j+1)+c},easeInOutQuint:function(k,j,c,d,i){if((j/=i/2)<1){return d/2*j*j*j*j*j+c}return d/2*((j-=2)*j*j*j*j+2)+c},easeInSine:function(k,j,c,d,i){return -d*Math.cos(j/i*(Math.PI/2))+d+c},easeOutSine:function(k,j,c,d,i){return d*Math.sin(j/i*(Math.PI/2))+c},easeInOutSine:function(k,j,c,d,i){return -d/2*(Math.cos(Math.PI*j/i)-1)+c},easeInExpo:function(k,j,c,d,i){return(j==0)?c:d*Math.pow(2,10*(j/i-1))+c},easeOutExpo:function(k,j,c,d,i){return(j==i)?c+d:d*(-Math.pow(2,-10*j/i)+1)+c},easeInOutExpo:function(k,j,c,d,i){if(j==0){return c}if(j==i){return c+d}if((j/=i/2)<1){return d/2*Math.pow(2,10*(j-1))+c}return d/2*(-Math.pow(2,-10*--j)+2)+c},easeInCirc:function(k,j,c,d,i){return -d*(Math.sqrt(1-(j/=i)*j)-1)+c},easeOutCirc:function(k,j,c,d,i){return d*Math.sqrt(1-(j=j/i-1)*j)+c},easeInOutCirc:function(k,j,c,d,i){if((j/=i/2)<1){return -d/2*(Math.sqrt(1-j*j)-1)+c}return d/2*(Math.sqrt(1-(j-=2)*j)+1)+c},easeInElastic:function(r,o,s,a,c){var n=1.70158;var d=0;var q=a;if(o==0){return s}if((o/=c)==1){return s+a}if(!d){d=c*0.3}if(q<Math.abs(a)){q=a;var n=d/4}else{var n=d/(2*Math.PI)*Math.asin(a/q)}return -(q*Math.pow(2,10*(o-=1))*Math.sin((o*c-n)*(2*Math.PI)/d))+s},easeOutElastic:function(r,o,s,a,c){var n=1.70158;var d=0;var q=a;if(o==0){return s}if((o/=c)==1){return s+a}if(!d){d=c*0.3}if(q<Math.abs(a)){q=a;var n=d/4}else{var n=d/(2*Math.PI)*Math.asin(a/q)}return q*Math.pow(2,-10*o)*Math.sin((o*c-n)*(2*Math.PI)/d)+a+s},easeInOutElastic:function(r,o,s,a,c){var n=1.70158;var d=0;var q=a;if(o==0){return s}if((o/=c/2)==2){return s+a}if(!d){d=c*(0.3*1.5)}if(q<Math.abs(a)){q=a;var n=d/4}else{var n=d/(2*Math.PI)*Math.asin(a/q)}if(o<1){return -0.5*(q*Math.pow(2,10*(o-=1))*Math.sin((o*c-n)*(2*Math.PI)/d))+s}return q*Math.pow(2,-10*(o-=1))*Math.sin((o*c-n)*(2*Math.PI)/d)*0.5+a+s},easeInBack:function(n,l,c,d,j,k){if(k==undefined){k=1.70158}return d*(l/=j)*l*((k+1)*l-k)+c},easeOutBack:function(n,l,c,d,j,k){if(k==undefined){k=1.70158}return d*((l=l/j-1)*l*((k+1)*l+k)+1)+c},easeInOutBack:function(n,l,c,d,j,k){if(k==undefined){k=1.70158}if((l/=j/2)<1){return d/2*(l*l*(((k*=(1.525))+1)*l-k))+c}return d/2*((l-=2)*l*(((k*=(1.525))+1)*l+k)+2)+c},easeInBounce:function(k,j,c,d,i){return d-jQuery.easing.easeOutBounce(k,i-j,0,d,i)+c},easeOutBounce:function(k,j,c,d,i){if((j/=i)<(1/2.75)){return d*(7.5625*j*j)+c}else{if(j<(2/2.75)){return d*(7.5625*(j-=(1.5/2.75))*j+0.75)+c}else{if(j<(2.5/2.75)){return d*(7.5625*(j-=(2.25/2.75))*j+0.9375)+c}else{return d*(7.5625*(j-=(2.625/2.75))*j+0.984375)+c}}}},easeInOutBounce:function(k,j,c,d,i){if(j<i/2){return jQuery.easing.easeInBounce(k,j*2,0,d,i)*0.5+c}return jQuery.easing.easeOutBounce(k,j*2-i,0,d,i)*0.5+d*0.5+c}});

(function(a){a.fn.lavaLamp=function(c){c=a.extend({fx:"linear",speed:500,click:function(){}},c||{});return this.each(function(){var d=a(this),g=function(){},i=a('<li class="back"><div class="left"></div></li>').appendTo(d),j=a("li",this),h=a("li.current",this)[0]||a(j[0]).addClass("current")[0];j.not(".back").hover(function(){e(this)},g);a(this).hover(g,function(){e(h)});j.click(function(k){f(this);return c.click.apply(this,[k,this])});f(h);function f(k){i.css({left:k.offsetLeft+"px",width:k.offsetWidth+"px"});h=k}function e(k){i.each(function(){a(this).dequeue()}).animate({width:k.offsetWidth,left:k.offsetLeft},c.speed,c.fx)}})}})(jQuery);

$.extend({URLEncode:function(k){var j="";var e=0;k=k.toString();var g=/(^[a-zA-Z0-9_.]*)/;while(e<k.length){var a=g.exec(k.substr(e));if(a!=null&&a.length>1&&a[1]!=""){j+=a[1];e+=a[1].length}else{if(k[e]==" "){j+="+"}else{var i=k.charCodeAt(e);var f=i.toString(16);j+="%"+(f.length<2?"0":"")+f.toUpperCase()}e++}}return j},URLDecode:function(d){var f=d;var a,c;var e=/(%[^%]{2})/;while((m=e.exec(f))!=null&&m.length>1&&m[1]!=""){b=parseInt(m[1].substr(1),16);c=String.fromCharCode(b);f=f.replace(m[1],c)}return f}});function readCookie(d){var f=d+"=";var a=document.cookie.split(";");for(var e=0;e<a.length;e++){var g=a[e];while(g.charAt(0)==" "){g=g.substring(1,g.length)}if(g.indexOf(f)==0){return g.substring(f.length,g.length)}}return null}var idmNameCookieValue,idmTokenCookieValue,loggedIn;var servicesAvailable=false;var submitLoginTimeout;var timeoutFocus;var currentSource=-1;var useAccessLabels=true;function accessiLabels(d,c){c=$(c);c.parent().css("position","relative");var a=Object({top:(c.position().top)+"px",left:(c.position().left)+"px","padding-left":(c.css("padding-left")),"padding-top":(c.css("padding-top")),"font-size":(c.css("font-size")),"line-height":(c.css("line-height")),width:"auto"});if($(c).attr("value")==""){$(d).css(a)}$(d).click(function(){$(this).removeAttr("style")});$(c).focus(function(){$(d).trigger("click")});$(c).blur(function(){if($(this).attr("value")==""){$(d).css(a)}})}var thanksStr="<h2>Thanks for that.</h2><p>Now you can choose which service you want below.</p>";var formStr='<fieldset><p><label for="dash-ctn-ltbx" id="dash-ctn-ltbx-lbl">Mobile Number</label><input type="text" title="Mobile Number" name="dash-ctn" tabindex="3000" name="IDToken1" id="dash-ctn-ltbx" size="10" value=""/></p><p class="omega"><label for="dash-pass-ltbx" id="dash-pass-ltbx-lbl">Password</label><input tabindex="4000" size="10" type="password" title="Password" name="dash-pass" name="IDToken2" id="dash-pass-ltbx" value=""/><input tabindex="4005" type="image" src="<AptrixLibCmpnt name="Fc_lightbox-go.gif"/>" id="lightbox-submit" alt="Go"/></p><div class="aux-links"><a href="" tabindex="4010">Register with O2</a>&nbsp;<a href="" tabindex="4020">Forgot Password?</a></div></fieldset>';function updateLi(a){$("ul.services>li").each(function(){if(a){$(this).addClass("active")}else{$(this).removeClass("active")}})}function showLightBoxLogin(i,f,a,d,g){var c=(typeof f==undefined)?729:f;var e=(typeof a==undefined)?490:a;var d=(typeof d==undefined)?"lightbox-container":d;currentSource=g;if(i){$("#lightbox-container").html('<iframe src ="'+i+'" width="'+c+'px" height="'+c+'px" scrolling="no" frameborder="0"></iframe>')}$.blockUI({message:$("#"+d),css:{display:"block",width:c,backgroundColor:"transparent",border:"none",top:((($(window).height())-e)/2)+"px",left:((($(window).width())-c)/2)+"px",cursor:"pointer"},overlayCSS:{backgroundColor:"#000",opacity:"0.8"},allowBodyStretch:true,constrainTabKey:true,focusInput:true});servicesAvailable=false;updateLi(servicesAvailable);if(g==1||loggedIn){$("#lightbox-form").hide();$("#lightbox-login-thankyou").attr("style","display:none");$("#visit-myO2-learn").hide();$("#visit-myO2").show();$("ul#services>li:first").focus()}else{$("#lightbox-form").hide();$("h3.choose-service").removeAttr("style");$("#lightbox-login-thankyou").attr("style","display:none");$("#visit-myO2-learn").show();$("#visit-myO2").hide()}if($("#dash-ctn").val()!=""&&$("#dash-pass").val()!=""){$("#dash-ctn-ltbx").val($("#dash-ctn").fieldValue());$("#dash-pass-ltbx").val($("#dash-pass").fieldValue());updateLi(true);servicesAvailable=true}if(g==1){timeoutFocus=setTimeout(function(){$("div.blockUI #lightbox-login #visit-myO2 input.serviceButton").focus()},1000)}else{timeoutFocus=setTimeout(function(){$("div.blockUI #lightbox-login #visit-myO2-learn input.serviceButton").focus()},1000)}doActivateServiceButtons();updateLi(true);$(".blockUI").keyup(doHandleLighboxLoginKeyUp);$("a.blockClose").click(function(){$("#dash-ctn-ltbx").val("");$("#dash-pass-ltbx").val("");myWindowClose()});$("div.blockOverlay").each(function(){$(this).click(myWindowClose);$(this).css("cursor","pointer");$(this).keyup(function(h){if(h.keyCode==27){$("#dash-ctn-ltbx").val("");$("#dash-pass-ltbx").val("");myWindowClose()}})})}function myWindowClose(){$.unblockUI();return false}idmNameCookieValue=readCookie("IMDataGivenName");if(idmNameCookieValue!=null){idmNameCookieValue=idmNameCookieValue.replace(/\+/g," ")}idmTokenCookieValue=readCookie("iPlanetDirectoryPro");loggedIn=(idmTokenCookieValue!=null);function initFirstAndSecondLevelNav(){$("ul#level1-nav-list>li:last, ul#level2-nav-list>li:last").addClass("last");$("ul#level1-nav-list>li.active:last, ul#level2-nav-list>li.active:last").each(function(){$(this).addClass("last-active")});$("ul#level2-nav-list>li>a").css({"padding-right":"14px","margin-right":"0"})}function onMyO2Click(){showLightBoxLogin(false,473,300,"lightbox-login",0);return false}function onDashboardSubmit(){if(($("#dash-ctn").val()=="")||($("#dash-pass").val()=="")){alert("Please enter a username and password!!")}else{showLightBoxLogin(false,473,300,"lightbox-login",1)}return false}function onDashboardKeyUp(a){if(a.keyCode==13){if(($("#dash-ctn").val()=="")||($("#dash-pass").val()=="")){alert("Please enter a username and password!!")}else{showLightBoxLogin(false,473,300,"lightbox-login",1)}}return false}function doBodyTopInit(){initFirstAndSecondLevelNav();$("#level1-nav-list>li#my-o2>a").click(onMyO2Click);$("#dash-submit").click(onDashboardSubmit);$("form#portal-login").keyup(onDashboardKeyUp);if(loggedIn){$("form#portal-login").attr("action",$("#dash-default-logout-action").val());if(idmNameCookieValue!=null){$("form#portal-login").html('<p class="welcome-message">Hello, '+idmNameCookieValue+'</p><p id="logout-box"><a id="logout-link" href="'+$("#dash-default-logout-action").val()+'">Logout</a></p>')}else{$("form#portal-login").html('<p class="welcome-message"></p><p id="logout-box"><a id="logout-link" href="'+$("#dash-default-logout-action").val()+'">Logout</a></p>')}}$("form#portal-login").css("display","block")}function onServiceButtonKeyUp(c){if(c.keyCode==13){var a=$("input.service-action",$(this).parent()).val();var d=$("#dash-default-action").val()+"?org=o2ext&goto="+a;$("#portal-login").attr("action",d);if(loggedIn){if($("loggedin-action",$(this).parent())!=null){window.top.location.href=$("input.loggedin-action",$(this).parent()).val()}else{window.top.location.href=a}}else{if(currentSource==1){doPortalFormSubmit()}else{$("#lightbox-login-sel-action").text($(this).attr("alt"));doShowLightboxUsrnameAndPasswordPrompt();$(".serviceButton").each(function(){$(this).attr("disabled",true)});$("input#dash-ctn-ltbx").focus()}}}}function onServiceButtonClick(){var a=$("input.service-action",$(this).parent()).val();var c=$("#dash-default-action").val()+"?org=o2ext&goto="+a;$("#portal-login").attr("action",c);if(loggedIn){if($("loggedin-action",$(this).parent())!=null){window.top.location.href=$("input.loggedin-action",$(this).parent()).val()}else{window.top.location.href=a}}else{if(currentSource==1){doPortalFormSubmit()}else{$("#lightbox-login-sel-action").text($(this).attr("alt"));doShowLightboxUsrnameAndPasswordPrompt();$(".serviceButton").each(function(){$(this).attr("disabled",true)});$("input#dash-ctn-ltbx").focus()}}return false}function doHandleLighboxLoginSubmit(){if($("input#dash-pass-ltbx").val()!=""&&$("input#dash-ctn-ltbx").val()!=""){servicesAvailable=true;doPortalFormSubmit()}else{alert("Please enter a username and password");$("input#dash-ctn-ltbx").focus()}return false}function onLightBoxPromptCloseKeyUp(a){if(a.keyCode==13){onLightBoxPromptCloseClick()}}function onLightBoxPromptCloseClick(){$("#lightbox-submit").unbind("keyup");$("input#dash-pass-ltbx").unbind("keyup");$("#lightbox-form").unbind("keyup");$(".serviceButton").each(function(){$(this).removeAttr("disabled")});$("#lightbox-form").hide();doActivateServiceButtons();if(currentSource==1){timeoutFocus=setTimeout(function(){$("div.blockUI #lightbox-login #visit-myO2 input.serviceButton").focus()},1000)}else{timeoutFocus=setTimeout(function(){$("div.blockUI #lightbox-login #visit-myO2-learn input.serviceButton").focus()},1000)}return false}function doShowLightboxUsrnameAndPasswordPrompt(){$("#lightbox-form").show();setTimeout(function(){$("#lightbox-submit").keyup(doHandleLighboxLoginKeyUp);$("input#dash-pass-ltbx").keyup(function(a){if(a.keyCode==13){doHandleLighboxLoginSubmit()}});$("#lightbox-submit").click(doHandleLighboxLoginSubmit);$("#lightbox-form").keyup(function(a){if(a.keyCode==13){doHandleLighboxLoginSubmit()}});$("#lightbox-login-prompt-close").click(onLightBoxPromptCloseClick);$("#lightbox-login-prompt-close").keyup(onLightBoxPromptCloseKeyUp)},1000)}function doActionSetCheck(){if($("#portal-login").attr("action")!=theActionUrl){submitLoginTimeout=setTimeout(doActionSetCheck,2000)}else{doPortalFormSubmit()}}function doPortalFormSubmit(){$("#dash-ctn-lbl").trigger("click");$("#dash-pass-lbl").trigger("click");$("#dash-ctn").val($("#dash-ctn-ltbx").val());$("#dash-pass").val($("#lightbox-login :password").fieldValue());myWindowClose();$("#portal-login").submit()}function doActivateServiceButtons(){$(".serviceButton").each(function(){var a=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);if(!a){$(this).fadeTo("fast",0.75)}$(this).focus(onFocus);$(this).mouseover(onFocus);$(this).blur(onBlur);$(this).mouseleave(onBlur);$(this).click(onServiceButtonClick);$(this).keyup(onServiceButtonKeyUp);$(this).removeAttr("disabled")})}function onFocus(){var a=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);if(!a){$(this).fadeTo("fast",1)}}function onBlur(){var a=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);if(!a){$(this).fadeTo("fast",0.75)}}$(document).ready(function(){if(useAccessLabels){$("input.accessi-label").each(function(){p=$(this).attr("id");accessiLabels("#"+p+"-lbl","#"+p)});$("#accessibility-link").focus(function(){if($("div.blockUI #lightbox-login")!=null){$("div.blockUI #lightbox-login *:visible input:first").each(function(){$(this).focus()})}})}});function doHandleLighboxLoginKeyUp(a){if(a.keyCode==27){$("#dash-ctn-ltbx").val("");$("#dash-pass-ltbx").val("");myWindowClose()}}

if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(g,e,o,i,k,n,r,j,a,f){if(!document.getElementById){return}this.DETECT_KEY=f?f:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(g){this.setAttribute("swf",g)}if(e){this.setAttribute("id",e)}if(o){this.setAttribute("width",o)}if(i){this.setAttribute("height",i)}if(k){this.setAttribute("version",new deconcept.PlayerVersion(k.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(n){this.addParam("bgcolor",n)}var d=r?r:"high";this.addParam("quality",d);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var l=(j)?j:window.location;this.setAttribute("xiRedirectUrl",l);this.setAttribute("redirectUrl","");if(a){this.setAttribute("redirectUrl",a)}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,c){this.attributes[a]=c},getAttribute:function(a){return this.attributes[a]},addParam:function(a,c){this.params[a]=c},getParams:function(){return this.params},addVariable:function(a,c){this.variables[a]=c},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var a=new Array();var c;var d=this.getVariables();for(c in d){a[a.length]=c+"="+d[c]}return a},getSWFHTML:function(){var e="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}e='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';e+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var d=this.getParams();for(var a in d){e+=[a]+'="'+d[a]+'" '}var c=this.getVariablePairs().join("&");if(c.length>0){e+='flashvars="'+c+'"'}e+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}e='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';e+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var d=this.getParams();for(var a in d){e+='<param name="'+a+'" value="'+d[a]+'" />'}var c=this.getVariablePairs().join("&");if(c.length>0){e+='<param name="flashvars" value="'+c+'" />'}e+="</object>"}return e},write:function(a){if(this.getAttribute("useExpressInstall")){var c=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(c)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var d=(typeof a=="string")?document.getElementById(a):a;d.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var d=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){d=new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var f=1;var c=3;while(f){try{c++;f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);d=new deconcept.PlayerVersion([c,0,0])}catch(g){f=null}}}else{try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(g){try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");d=new deconcept.PlayerVersion([6,0,21]);f.AllowScriptAccess="always"}catch(g){if(d.major==6){return d}}try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(f!=null){d=new deconcept.PlayerVersion(f.GetVariable("$version").split(" ")[1].split(","))}}}return d};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(e){var d=document.location.search||document.location.hash;if(e==null){return d}if(d){var c=d.substring(1).split("&");for(var a=0;a<c.length;a++){if(c[a].substring(0,c[a].indexOf("="))==e){return c[a].substring((c[a].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var d=document.getElementsByTagName("OBJECT");for(var c=d.length-1;c>=0;c--){d[c].style.display="none";for(var a in d[c]){if(typeof d[c][a]=="function"){d[c][a]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function show(a){showdiv(a)}function hideallids(){for(var a=1;a<=HowManyDropDowns;a++){hidediv([a])}}function hidediv(a){var d="linkB"+a;var c="link"+a;if(document.getElementById){document.getElementById(d).style.display="none";document.getElementById(c).className="title_link"}else{if(document.layers){document.id.display="none";document.ClassID.className="title_link"}else{document.all.id.style.display="none";document.all.ClassID.className="title_link"}}}function showdiv(a){var d="linkB"+a;var c="link"+a;if(document.getElementById){if(document.getElementById(d).style.display=="block"){document.getElementById(d).style.display="none";document.getElementById(c).className="title_link"}else{hideallids();document.getElementById(d).style.display="block";document.getElementById(c).className="title_link_active"}}else{if(document.layers){if(document.id.display=="block"){document.id.display="none";document.ClassID.className="title_link"}else{hideallids();document.id.display="block";document.ClassID.className="title_link_active"}}else{if(document.all.id.style.display=="block"){document.all.id.style.display="none";document.all.ClassID.className="title_link"}else{hideallids();document.all.id.style.display="block";document.all.ClassID.className="title_link_active"}}}}function limitText(d,c,a){if(d.value.length>a){d.value=d.value.substring(0,a)}else{c.value=a-d.value.length}}function MM_findObj(g,f){var e,c,a;if(!f){f=document}if((e=g.indexOf("?"))>0&&parent.frames.length){f=parent.frames[g.substring(e+1)].document;g=g.substring(0,e)}if(!(a=f[g])&&f.all){a=f.all[g]}for(c=0;!a&&c<f.forms.length;c++){a=f.forms[c][g]}for(c=0;!a&&f.layers&&c<f.layers.length;c++){a=MM_findObj(g,f.layers[c].document)}if(!a&&f.getElementById){a=f.getElementById(g)}return a}function MM_validateForm(){var e,c,a,l,h,f,d,j,k="",g=MM_validateForm.arguments;for(e=0;e<(g.length-2);e+=3){h=g[e+2];val=MM_findObj(g[e]);if(val){l=val.name;if((val=val.value)!=""){if(h.indexOf("isEmail")!=-1){c=val.indexOf("@");if(c<1||c==(val.length-1)){k+="- "+l+" must contain an e-mail address.\n"}}else{if(h!="R"){f=parseFloat(val);if(isNaN(val)){k+="- "+l+" must contain a number.\n"}if(h.indexOf("inRange")!=-1){c=h.indexOf(":");d=h.substring(8,c);j=h.substring(c+1);if(f<d||j<f){k+="- "+l+" must contain a number between "+d+" and "+j+".\n"}}}}}else{if(h.charAt(0)=="R"){k+="- "+l+" is required.\n"}}}}if(document.updatePersonalDetails.billingPersonTitle.value=="Not_Selected"){k+="- Query type must be selected.\n"}if(document.updatePersonalDetails.customerType.value=="Not_Selected"){k+="- Customer type must be selected.\n"}if(k){alert("The following error(s) occurred:\n"+k)}document.MM_returnValue=(k=="")}function anchorshow(a){var e=a;var c=e.split("#");var d=document.getElementById(c[1]);show(c[1])}var thumbnailviewer2={enableTitle:true,enableTransition:true,hideimgmouseout:false,iefilterstring:"progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)",iefiltercapable:document.compatMode&&window.createPopup?true:false,preloadedimages:[],targetlinks:[],alreadyrunflag:false,loadimage:function(a){var d=a.getAttribute("href");var g=document.getElementById(a.getAttribute("rev").split("::")[0]);var c=a.getAttribute("rev").split("::")[1];var f=(thumbnailviewer2.enableTitle&&a.getAttribute("title"))?a.getAttribute("title"):"";var e='<img src="'+d+'" style="border-width: 0" />';if(typeof c!="undefined"){e='<a href="'+c+'">'+e+"</a>"}if(f!=""){e+="<br />"+f}if(this.iefiltercapable){g.style.filter=this.iefilterstring;g.filters[0].Apply()}g.innerHTML=e;this.featureImage=g.getElementsByTagName("img")[0];this.featureImage.onload=function(){if(thumbnailviewer2.iefiltercapable){g.filters[0].Play()}};this.featureImage.onerror=function(){if(thumbnailviewer2.iefiltercapable){g.filters[0].Stop()}}},hideimage:function(a){var c=document.getElementById(a.getAttribute("rev").split("::")[0]);c.innerHTML=""},cleanup:function(){if(this.featureImage){this.featureImage.onload=null;this.featureImage.onerror=null;this.featureImage=null}this.showcontainer=null;for(var a=0;a<this.targetlinks.length;a++){this.targetlinks[a].onclick=null;this.targetlinks[a].onmouseover=null;this.targetlinks[a].onmouseout=null}},addEvent:function(c,d,a){var a=(window.addEventListener)?a:"on"+a;if(c.addEventListener){c.addEventListener(a,d,false)}else{if(c.attachEvent){c.attachEvent(a,d)}}},init:function(){this.iefiltercapable=(this.iefiltercapable&&this.enableTransition);var c=document.getElementsByTagName("a");for(var a=0;a<c.length;a++){if(c[a].getAttribute("rel")&&/enlargeimage:/i.test(c[a].getAttribute("rel"))){var d=c[a].getAttribute("rel").split("::")[1];if(d=="mouseover"){this.preloadedimages[this.preloadedimages.length]=new Image();this.preloadedimages[this.preloadedimages.length-1].src=c[a].href;c[a]["onclick"]=function(){return false}}c[a]["on"+d]=function(){thumbnailviewer2.loadimage(this);return false};if(this.hideimgmouseout){c[a]["onmouseout"]=function(){thumbnailviewer2.hideimage(this)}}this.targetlinks[this.targetlinks.length]=c[a]}}}};if(document.addEventListener){thumbnailviewer2.addEvent(document,function(){thumbnailviewer2.alreadyrunflag=1;thumbnailviewer2.init()},"DOMContentLoaded")}else{if(document.all&&document.getElementsByTagName("a").length>0){thumbnailviewer2.alreadyrunflag=1;thumbnailviewer2.init()}}thumbnailviewer2.addEvent(window,function(){if(!thumbnailviewer2.alreadyrunflag){thumbnailviewer2.init()}},"load");thumbnailviewer2.addEvent(window,function(){thumbnailviewer2.cleanup()},"unload");
/* 	
 * TRACK TOPNAV CLICKS - TH20090811
 * 	First and second level tracked - plus home link
 */
function doMastheadClick()
{
	if (!clickSent) {		
		cb = trackStub + ($(this).attr("id")).replace("_","/");
		if (typeof console != "undefined") console.log(cb);
		pTr._trackEvent("Navigation","Click",$(this).attr("id"));
		clickSent=true;
	}
}

var trackStub = "/O2Metrics/TopNav/";
var clickSent = false;
var pTr = 0;

function doLightboxLoginClicks()
{
	/*if (typeof console != "undefined")
	{
		console.log("hello",$(this).parent().attr("id"));
	}*/
	pTr._trackEvent("Login-Lightbox","Click",$(this).parent().attr("id"));

}

function doGeneralEventsTracking()
{
	pTr._trackEvent("Navigation","Click",$(this).attr("id"));
	$.log("Event tracking: Navigation,Click," + $(this).attr("id"));
}

function trackClicks () {	//Currently handles masthead and login-lightbox clicks
	if(typeof _gat != 'undefined')
	{
		pTr = _gat._getTracker("UA-1807669-3");
		$("#home-link,#level2-nav-list>li").click(doMastheadClick);
		$("#level1-nav-list>li:not(#level2-nav-list>li)").click(doMastheadClick);
		$("#lightbox-login .services input[type='image']").click(doLightboxLoginClicks);
		$(".best-seller-product a").click(doGeneralEventsTracking);
		
	}
}
/* _gat object needs about 250ms to get up to speed...*/
$(document).ready(function() {
	_waitForgat = setTimeout(trackClicks,250);
});

/* 	
 * TRACK TOPNAV CLICKS - END
 */

