Object.create=function(B){function A(){}A.prototype=B;return new A()};if(typeof NWK==="undefined"||!NWK){var NWK=window.NWK||{}}NWK={modules:[],init:function(){alert("NWK")},namespace:function(D){if(!D||!D.length){return null}var C=D.split(".");var A=NWK;for(var B=(C[0]=="NWK")?1:0;B<C.length;++B){A[C[B]]=A[C[B]]||{};A=A[C[B]]}return A},register:function(B,A){this.modules.push(A)},create:function(A,B){A=Object.create(B);this.register(A);return A},initializeModule:function(A){if(A){A.init()}}};NWK.namespace("component");NWK.namespace("widget");NWK.namespace("util");(function(A){A.extend(A.fn,{validate:function(B){if(!this.length){B&&B.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return }var C=A.data(this[0],"validator");if(C){return C}C=new A.validator(B,this[0]);A.data(this[0],"validator",C);if(C.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){C.cancelSubmit=true});this.submit(function(D){if(C.settings.debug){D.preventDefault()}function E(){if(C.settings.submitHandler){C.settings.submitHandler.call(C,C.currentForm);return false}return true}if(C.cancelSubmit){C.cancelSubmit=false;return E()}if(C.form()){if(C.pendingRequest){C.formSubmitted=true;return false}return E()}else{C.focusInvalid();return false}})}return C},valid:function(){if(A(this[0]).is("form")){return this.validate().form()}else{var C=false;var B=A(this[0].form).validate();this.each(function(){C|=B.element(this)});return C}},removeAttrs:function(D){var B={},C=this;A.each(D.split(/\s/),function(E,F){B[F]=C.attr(F);C.removeAttr(F)});return B},rules:function(E,B){var G=this[0];if(E){var D=A.data(G.form,"validator").settings;var I=D.rules;var J=A.validator.staticRules(G);switch(E){case"add":A.extend(J,A.validator.normalizeRule(B));I[G.name]=J;if(B.messages){D.messages[G.name]=A.extend(D.messages[G.name],B.messages)}break;case"remove":if(!B){delete I[G.name];return J}var H={};A.each(B.split(/\s/),function(K,L){H[L]=J[L];delete J[L]});return H}}var F=A.validator.normalizeRules(A.extend({},A.validator.metadataRules(G),A.validator.classRules(G),A.validator.attributeRules(G),A.validator.staticRules(G)),G);if(F.required){var C=F.required;delete F.required;F=A.extend({required:C},F)}return F}});A.extend(A.expr[":"],{blank:function(B){return !A.trim(B.value)},filled:function(B){return !!A.trim(B.value)},unchecked:function(B){return !B.checked}});A.format=function(B,C){if(arguments.length==1){return function(){var D=A.makeArray(arguments);D.unshift(B);return A.format.apply(this,D)}}if(arguments.length>2&&C.constructor!=Array){C=A.makeArray(arguments).slice(1)}if(C.constructor!=Array){C=[C]}A.each(C,function(D,E){B=B.replace(new RegExp("\\{"+D+"\\}","g"),E)});return B};A.validator=function(B,C){this.settings=A.extend({},A.validator.defaults,B);this.currentForm=C;this.init()};A.extend(A.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:A([]),errorLabelContainer:A([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(B){this.lastActive=B;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,B,this.settings.errorClass);this.errorsFor(B).hide()}},onfocusout:function(B){if(!this.checkable(B)&&(B.name in this.submitted||!this.optional(B))){this.element(B)}},onkeyup:function(B){if(B.name in this.submitted||B==this.lastElement){this.element(B)}},onclick:function(B){if(B.name in this.submitted){this.element(B)}},highlight:function(C,B){A(C).addClass(B)},unhighlight:function(C,B){A(C).removeClass(B)}},setDefaults:function(B){A.extend(A.validator.defaults,B)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:A.format("Please enter no more than {0} characters."),minlength:A.format("Please enter at least {0} characters."),rangelength:A.format("Please enter a value between {0} and {1} characters long."),range:A.format("Please enter a value between {0} and {1}."),max:A.format("Please enter a value less than or equal to {0}."),min:A.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=A(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||A(this.currentForm);this.containers=A(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var B=(this.groups={});A.each(this.settings.groups,function(E,F){A.each(F.split(/\s/),function(H,G){B[G]=E})});var D=this.settings.rules;A.each(D,function(E,F){D[E]=A.validator.normalizeRule(F)});function C(F){var E=A.data(this[0].form,"validator");E.settings["on"+F.type]&&E.settings["on"+F.type].call(E,this[0])}A(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",C).delegate("click",":radio, :checkbox",C);if(this.settings.invalidHandler){A(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();A.extend(this.submitted,this.errorMap);this.invalid=A.extend({},this.errorMap);if(!this.valid()){A(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var B=0,C=(this.currentElements=this.elements());C[B];B++){this.check(C[B])}return this.valid()},element:function(C){C=this.clean(C);this.lastElement=C;this.prepareElement(C);this.currentElements=A(C);var B=this.check(C);if(B){delete this.invalid[C.name]}else{this.invalid[C.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return B},showErrors:function(C){if(C){A.extend(this.errorMap,C);this.errorList=[];for(var B in C){this.errorList.push({message:C[B],element:this.findByName(B)[0]})}this.successList=A.grep(this.successList,function(D){return !(D.name in C)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(A.fn.resetForm){A(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(D){var C=0;for(var B in D){C++}return C},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{A(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(B){}}},findLastActive:function(){var B=this.lastActive;return B&&A.grep(this.errorList,function(C){return C.element.name==B.name}).length==1&&B},elements:function(){var C=this,B={};return A([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&C.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in B||!C.objectLength(A(this).rules())){return false}B[this.name]=true;return true})},clean:function(B){return A(B)[0]},errors:function(){return A(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=A([]);this.toHide=A([]);this.formSubmitted=false;this.currentElements=A([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(B){this.reset();this.toHide=this.errorsFor(B)},check:function(C){C=this.clean(C);if(this.checkable(C)){C=this.findByName(C.name)[0]}var G=A(C).rules();var D=false;for(method in G){var F={method:method,parameters:G[method]};try{var B=A.validator.methods[method].call(this,C.value.replace(/\r/g,""),C,F.parameters);if(B=="dependency-mismatch"){D=true;continue}D=false;if(B=="pending"){this.toHide=this.toHide.not(this.errorsFor(C));return }if(!B){this.formatAndAdd(C,F);return false}}catch(E){this.settings.debug&&window.console&&console.log("exception occured when checking element "+C.id+", check the '"+F.method+"' method");throw E}}if(D){return }if(this.objectLength(G)){this.successList.push(C)}return true},customMetaMessage:function(B,D){if(!A.metadata){return }var C=this.settings.meta?A(B).metadata()[this.settings.meta]:A(B).metadata();return C&&C.messages&&C.messages[D]},customMessage:function(C,D){var B=this.settings.messages[C];return B&&(B.constructor==String?B:B[D])},findDefined:function(){for(var B=0;B<arguments.length;B++){if(arguments[B]!==undefined){return arguments[B]}}return undefined},defaultMessage:function(B,C){return this.findDefined(this.customMessage(B.name,C),this.customMetaMessage(B,C),!this.settings.ignoreTitle&&B.title||undefined,A.validator.messages[C],"<strong>Warning: No message defined for "+B.name+"</strong>")},formatAndAdd:function(B,D){var C=this.defaultMessage(B,D.method);if(typeof C=="function"){C=C.call(this,D.parameters,B)}this.errorList.push({message:C,element:B});this.errorMap[B.name]=C;this.submitted[B.name]=C},addWrapper:function(B){if(this.settings.wrapper){B=B.add(B.parents(this.settings.wrapper))}return B},defaultShowErrors:function(){for(var C=0;this.errorList[C];C++){var B=this.errorList[C];this.settings.highlight&&this.settings.highlight.call(this,B.element,this.settings.errorClass);this.showLabel(B.element,B.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var C=0;this.successList[C];C++){this.showLabel(this.successList[C])}}if(this.settings.unhighlight){for(var C=0,D=this.validElements();D[C];C++){this.settings.unhighlight.call(this,D[C],this.settings.errorClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return A(this.errorList).map(function(){return this.element})},showLabel:function(C,D){var B=this.errorsFor(C);if(B.length){B.removeClass().addClass(this.settings.errorClass);B.attr("generated")&&B.html(D)}else{B=A("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(C),generated:true}).addClass(this.settings.errorClass).html(D||"");if(this.settings.wrapper){B=B.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(B).length){this.settings.errorPlacement?this.settings.errorPlacement(B,A(C)):B.insertAfter(C)}}if(!D&&this.settings.success){B.text("");typeof this.settings.success=="string"?B.addClass(this.settings.success):this.settings.success(B)}this.toShow=this.toShow.add(B)},errorsFor:function(B){return this.errors().filter("[for='"+this.idOrName(B)+"']")},idOrName:function(B){return this.groups[B.name]||(this.checkable(B)?B.name:B.id||B.name)},checkable:function(B){return/radio|checkbox/i.test(B.type)},findByName:function(B){var C=this.currentForm;return A(document.getElementsByName(B)).map(function(D,E){return E.form==C&&E.name==B&&E||null})},getLength:function(C,B){switch(B.nodeName.toLowerCase()){case"select":return A("option:selected",B).length;case"input":if(this.checkable(B)){return this.findByName(B.name).filter(":checked").length}}return C.length},depend:function(C,B){return this.dependTypes[typeof C]?this.dependTypes[typeof C](C,B):true},dependTypes:{"boolean":function(C,B){return C},string:function(C,B){return !!A(C,B.form).length},"function":function(C,B){return C(B)}},optional:function(B){return !A.validator.methods.required.call(this,A.trim(B.value),B)&&"dependency-mismatch"},startRequest:function(B){if(!this.pending[B.name]){this.pendingRequest++;this.pending[B.name]=true}},stopRequest:function(B,C){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[B.name];if(C&&this.pendingRequest==0&&this.formSubmitted&&this.form()){A(this.currentForm).submit()}else{if(!C&&this.pendingRequest==0&&this.formSubmitted){A(this.currentForm).triggerHandler("invalid-form",[this])}}},previousValue:function(B){return A.data(B,"previousValue")||A.data(B,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(B,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(B,C){B.constructor==String?this.classRuleSettings[B]=C:A.extend(this.classRuleSettings,B)},classRules:function(C){var D={};var B=A(C).attr("class");B&&A.each(B.split(" "),function(){if(this in A.validator.classRuleSettings){A.extend(D,A.validator.classRuleSettings[this])}});return D},attributeRules:function(C){var E={};var B=A(C);for(method in A.validator.methods){var D=B.attr(method);if(D){E[method]=D}}if(E.maxlength&&/-1|2147483647|524288/.test(E.maxlength)){delete E.maxlength}return E},metadataRules:function(B){if(!A.metadata){return{}}var C=A.data(B.form,"validator").settings.meta;return C?A(B).metadata()[C]:A(B).metadata()},staticRules:function(C){var D={};var B=A.data(C.form,"validator");if(B.settings.rules){D=A.validator.normalizeRule(B.settings.rules[C.name])||{}}return D},normalizeRules:function(C,B){A.each(C,function(F,E){if(E===false){delete C[F];return }if(E.param||E.depends){var D=true;switch(typeof E.depends){case"string":D=!!A(E.depends,B.form).length;break;case"function":D=E.depends.call(B,B);break}if(D){C[F]=E.param!==undefined?E.param:true}else{delete C[F]}}});A.each(C,function(D,E){C[D]=A.isFunction(E)?E(B):E});A.each(["minlength","maxlength","min","max"],function(){if(C[this]){C[this]=Number(C[this])}});A.each(["rangelength","range"],function(){if(C[this]){C[this]=[Number(C[this][0]),Number(C[this][1])]}});if(A.validator.autoCreateRanges){if(C.min&&C.max){C.range=[C.min,C.max];delete C.min;delete C.max}if(C.minlength&&C.maxlength){C.rangelength=[C.minlength,C.maxlength];delete C.minlength;delete C.maxlength}}if(C.messages){delete C.messages}return C},normalizeRule:function(C){if(typeof C=="string"){var B={};A.each(C.split(/\s/),function(){B[this]=true});C=B}return C},addMethod:function(B,D,C){A.validator.methods[B]=D;A.validator.messages[B]=C;if(D.length<3){A.validator.addClassRules(B,A.validator.normalizeRule(B))}},methods:{required:function(D,C,E){if(!this.depend(E,C)){return"dependency-mismatch"}switch(C.nodeName.toLowerCase()){case"select":var B=A("option:selected",C);return B.length>0&&(C.type=="select-multiple"||(A.browser.msie&&!(B[0].attributes.value.specified)?B[0].text:B[0].value).length>0);case"input":if(this.checkable(C)){return this.getLength(D,C)>0}default:return A.trim(D).length>0}},remote:function(F,C,G){if(this.optional(C)){return"dependency-mismatch"}var D=this.previousValue(C);if(!this.settings.messages[C.name]){this.settings.messages[C.name]={}}this.settings.messages[C.name].remote=typeof D.message=="function"?D.message(F):D.message;G=typeof G=="string"&&{url:G}||G;if(D.old!==F){D.old=F;var B=this;this.startRequest(C);var E={};E[C.name]=F;A.ajax(A.extend(true,{url:G,mode:"abort",port:"validate"+C.name,dataType:"json",data:E,success:function(I){if(I){var H=B.formSubmitted;B.prepareElement(C);B.formSubmitted=H;B.successList.push(C);B.showErrors()}else{var J={};J[C.name]=I||B.defaultMessage(C,"remote");B.showErrors(J)}D.valid=I;B.stopRequest(C,I)}},G));return"pending"}else{if(this.pending[C.name]){return"pending"}}return D.valid},minlength:function(C,B,D){return this.optional(B)||this.getLength(A.trim(C),B)>=D},maxlength:function(C,B,D){return this.optional(B)||this.getLength(A.trim(C),B)<=D},rangelength:function(D,B,E){var C=this.getLength(A.trim(D),B);return this.optional(B)||(C>=E[0]&&C<=E[1])},min:function(C,B,D){return this.optional(B)||C>=D},max:function(C,B,D){return this.optional(B)||C<=D},range:function(C,B,D){return this.optional(B)||(C>=D[0]&&C<=D[1])},email:function(C,B){return this.optional(B)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(C)},url:function(C,B){return this.optional(B)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(C)},date:function(C,B){return this.optional(B)||!/Invalid|NaN/.test(new Date(C))},dateISO:function(C,B){return this.optional(B)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(C)},dateDE:function(C,B){return this.optional(B)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(C)},number:function(C,B){return this.optional(B)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(C)},numberDE:function(C,B){return this.optional(B)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(C)},digits:function(C,B){return this.optional(B)||/^\d+$/.test(C)},creditcard:function(F,C){if(this.optional(C)){return"dependency-mismatch"}if(/[^0-9-]+/.test(F)){return false}var G=0,E=0,B=false;F=F.replace(/\D/g,"");for(n=F.length-1;n>=0;n--){var D=F.charAt(n);var E=parseInt(D,10);if(B){if((E*=2)>9){E-=9}}G+=E;B=!B}return(G%10)==0},accept:function(C,B,D){D=typeof D=="string"?D:"png|jpe?g|gif";return this.optional(B)||C.match(new RegExp(".("+D+")$","i"))},equalTo:function(C,B,D){return C==A(D).val()}}})})(jQuery);(function(C){var B=C.ajax;var A={};C.ajax=function(E){E=C.extend(E,C.extend({},C.ajaxSettings,E));var D=E.port;if(E.mode=="abort"){if(A[D]){A[D].abort()}return(A[D]=B.apply(this,arguments))}return B.apply(this,arguments)}})(jQuery);(function(A){A.each({focus:"focusin",blur:"focusout"},function(C,B){A.event.special[B]={setup:function(){if(A.browser.msie){return false}this.addEventListener(C,A.event.special[B].handler,true)},teardown:function(){if(A.browser.msie){return false}this.removeEventListener(C,A.event.special[B].handler,true)},handler:function(D){arguments[0]=A.event.fix(D);arguments[0].type=B;return A.event.handle.apply(this,arguments)}}});A.extend(A.fn,{delegate:function(D,C,B){return this.bind(D,function(E){var F=A(E.target);if(F.is(C)){return B.apply(F,arguments)}})},triggerEvent:function(B,C){return this.triggerHandler(B,[A.event.fix({type:B,target:C})])}})})(jQuery);(function(B){B.fn.ajaxSubmit=function(N){if(!this.length){A("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof N=="function"){N={success:N}}var E=this.attr("action")||window.location.href;E=(E.match(/^([^#]+)/)||[])[1];E=E||"";N=B.extend({url:E,type:this.attr("method")||"GET"},N||{});var P={};this.trigger("form-pre-serialize",[this,N,P]);if(P.veto){A("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(N.beforeSerialize&&N.beforeSerialize(this,N)===false){A("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var J=this.formToArray(N.semantic);if(N.data){N.extraData=N.data;for(var F in N.data){if(N.data[F] instanceof Array){for(var G in N.data[F]){J.push({name:F,value:N.data[F][G]})}}else{J.push({name:F,value:N.data[F]})}}}if(N.beforeSubmit&&N.beforeSubmit(J,this,N)===false){A("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[J,this,N,P]);if(P.veto){A("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var D=B.param(J);if(N.type.toUpperCase()=="GET"){N.url+=(N.url.indexOf("?")>=0?"&":"?")+D;N.data=null}else{N.data=D}var O=this,I=[];if(N.resetForm){I.push(function(){O.resetForm()})}if(N.clearForm){I.push(function(){O.clearForm()})}if(!N.dataType&&N.target){var L=N.success||function(){};I.push(function(Q){B(N.target).html(Q).each(L,arguments)})}else{if(N.success){I.push(N.success)}}N.success=function(T,R){for(var S=0,Q=I.length;S<Q;S++){I[S].apply(N,[T,R,O])}};var C=B("input:file",this).fieldValue();var M=false;for(var H=0;H<C.length;H++){if(C[H]){M=true}}if(N.iframe||M){if(N.closeKeepAlive){B.get(N.closeKeepAlive,K)}else{K()}}else{B.ajax(N)}this.trigger("form-submit-notify",[this,N]);return this;function K(){var U=O[0];if(B(":input[name=submit]",U).length){alert('Error: Form elements must not be named "submit".');return }var S=B.extend({},B.ajaxSettings,N);var e=jQuery.extend(true,{},B.extend(true,{},B.ajaxSettings),S);var T="jqFormIO"+(new Date().getTime());var a=B('<iframe id="'+T+'" name="'+T+'" src="about:blank" />');var c=a[0];a.css({position:"absolute",top:"-1000px",left:"-1000px"});var d={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;a.attr("src","about:blank")}};var b=S.global;if(b&&!B.active++){B.event.trigger("ajaxStart")}if(b){B.event.trigger("ajaxSend",[d,S])}if(e.beforeSend&&e.beforeSend(d,e)===false){e.global&&jQuery.active--;return }if(d.aborted){return }var R=0;var W=0;var Q=U.clk;if(Q){var V=Q.name;if(V&&!Q.disabled){N.extraData=N.extraData||{};N.extraData[V]=Q.value;if(Q.type=="image"){N.extraData[name+".x"]=U.clk_x;N.extraData[name+".y"]=U.clk_y}}}setTimeout(function(){var h=O.attr("target"),f=O.attr("action");U.setAttribute("target",T);if(U.getAttribute("method")!="POST"){U.setAttribute("method","POST")}if(U.getAttribute("action")!=S.url){U.setAttribute("action",S.url)}if(!N.skipEncodingOverride){O.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(S.timeout){setTimeout(function(){W=true;X()},S.timeout)}var g=[];try{if(N.extraData){for(var j in N.extraData){g.push(B('<input type="hidden" name="'+j+'" value="'+N.extraData[j]+'" />').appendTo(U)[0])}}a.appendTo("body");c.attachEvent?c.attachEvent("onload",X):c.addEventListener("load",X,false);U.submit()}finally{U.setAttribute("action",f);h?U.setAttribute("target",h):O.removeAttr("target");B(g).remove()}},10);var Y=0;function X(){if(R++){return }c.detachEvent?c.detachEvent("onload",X):c.removeEventListener("load",X,false);var g=true;try{if(W){throw"timeout"}var h,k;k=c.contentWindow?c.contentWindow.document:c.contentDocument?c.contentDocument:c.document;if((k.body==null||k.body.innerHTML=="")&&!Y){Y=1;R--;setTimeout(X,100);return }d.responseText=k.body?k.body.innerHTML:null;d.responseXML=k.XMLDocument?k.XMLDocument:k;d.getResponseHeader=function(m){var l={"content-type":S.dataType};return l[m]};if(S.dataType=="json"||S.dataType=="script"){var f=k.getElementsByTagName("textarea")[0];d.responseText=f?f.value:d.responseText}else{if(S.dataType=="xml"&&!d.responseXML&&d.responseText!=null){d.responseXML=Z(d.responseText)}}h=B.httpData(d,S.dataType)}catch(j){g=false;B.handleError(S,d,"error",j)}if(g){S.success(h,"success");if(b){B.event.trigger("ajaxSuccess",[d,S])}}if(b){B.event.trigger("ajaxComplete",[d,S])}if(b&&!--B.active){B.event.trigger("ajaxStop")}if(S.complete){S.complete(d,g?"success":"error")}setTimeout(function(){a.remove();d.responseXML=null},100)}function Z(f,g){if(window.ActiveXObject){g=new ActiveXObject("Microsoft.XMLDOM");g.async="false";g.loadXML(f)}else{g=(new DOMParser()).parseFromString(f,"text/xml")}return(g&&g.documentElement&&g.documentElement.tagName!="parsererror")?g:null}}};B.fn.ajaxForm=function(C){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){B(this).ajaxSubmit(C);return false}).each(function(){B(":submit,input:image",this).bind("click.form-plugin",function(E){var D=this.form;D.clk=this;if(this.type=="image"){if(E.offsetX!=undefined){D.clk_x=E.offsetX;D.clk_y=E.offsetY}else{if(typeof B.fn.offset=="function"){var F=B(this).offset();D.clk_x=E.pageX-F.left;D.clk_y=E.pageY-F.top}else{D.clk_x=E.pageX-this.offsetLeft;D.clk_y=E.pageY-this.offsetTop}}}setTimeout(function(){D.clk=D.clk_x=D.clk_y=null},10)})})};B.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){B(":submit,input:image",this).unbind("click.form-plugin")})};B.fn.formToArray=function(N){var M=[];if(this.length==0){return M}var D=this[0];var H=N?D.getElementsByTagName("*"):D.elements;if(!H){return M}for(var I=0,K=H.length;I<K;I++){var E=H[I];var F=E.name;if(!F){continue}if(N&&D.clk&&E.type=="image"){if(!E.disabled&&D.clk==E){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}continue}var O=B.fieldValue(E,true);if(O&&O.constructor==Array){for(var G=0,C=O.length;G<C;G++){M.push({name:F,value:O[G]})}}else{if(O!==null&&typeof O!="undefined"){M.push({name:F,value:O})}}}if(!N&&D.clk){var J=D.getElementsByTagName("input");for(var I=0,K=J.length;I<K;I++){var L=J[I];var F=L.name;if(F&&!L.disabled&&L.type=="image"&&D.clk==L){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}}}return M};B.fn.formSerialize=function(C){return B.param(this.formToArray(C))};B.fn.fieldSerialize=function(D){var C=[];this.each(function(){var H=this.name;if(!H){return }var F=B.fieldValue(this,D);if(F&&F.constructor==Array){for(var G=0,E=F.length;G<E;G++){C.push({name:H,value:F[G]})}}else{if(F!==null&&typeof F!="undefined"){C.push({name:this.name,value:F})}}});return B.param(C)};B.fn.fieldValue=function(H){for(var G=[],E=0,C=this.length;E<C;E++){var F=this[E];var D=B.fieldValue(F,H);if(D===null||typeof D=="undefined"||(D.constructor==Array&&!D.length)){continue}D.constructor==Array?B.merge(G,D):G.push(D)}return G};B.fieldValue=function(C,I){var E=C.name,N=C.type,O=C.tagName.toLowerCase();if(typeof I=="undefined"){I=true}if(I&&(!E||C.disabled||N=="reset"||N=="button"||(N=="checkbox"||N=="radio")&&!C.checked||(N=="submit"||N=="image")&&C.form&&C.form.clk!=C||O=="select"&&C.selectedIndex==-1)){return null}if(O=="select"){var J=C.selectedIndex;if(J<0){return null}var L=[],D=C.options;var G=(N=="select-one");var K=(G?J+1:D.length);for(var F=(G?J:0);F<K;F++){var H=D[F];if(H.selected){var M=H.value;if(!M){M=(H.attributes&&H.attributes.value&&!(H.attributes.value.specified))?H.text:H.value}if(G){return M}L.push(M)}}return L}return C.value};B.fn.clearForm=function(){return this.each(function(){B("input,select,textarea",this).clearFields()})};B.fn.clearFields=B.fn.clearInputs=function(){return this.each(function(){var D=this.type,C=this.tagName.toLowerCase();if(D=="text"||D=="password"||C=="textarea"){this.value=""}else{if(D=="checkbox"||D=="radio"){this.checked=false}else{if(C=="select"){this.selectedIndex=-1}}}})};B.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};B.fn.enable=function(C){if(C==undefined){C=true}return this.each(function(){this.disabled=!C})};B.fn.selected=function(C){if(C==undefined){C=true}return this.each(function(){var D=this.type;if(D=="checkbox"||D=="radio"){this.checked=C}else{if(this.tagName.toLowerCase()=="option"){var E=B(this).parent("select");if(C&&E[0]&&E[0].type=="select-one"){E.find("option").selected(false)}this.selected=C}}})};function A(){if(B.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);(function(A){A.jScrollPane={active:[]};A.fn.jScrollPane=function(C){C=A.extend({},A.fn.jScrollPane.defaults,C);var B=function(){return false};return this.each(function(){var S=A(this);S.css("overflow","hidden");var d=this;if(A(this).parent().is(".jScrollPaneContainer")){var AO=C.maintainPosition?S.position().top:0;var P=A(this).parent();var l=P.innerWidth();var AP=P.outerHeight();var Q=AP;A(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",P).remove();S.css({top:0})}else{var AO=0;this.originalPadding=S.css("paddingTop")+" "+S.css("paddingRight")+" "+S.css("paddingBottom")+" "+S.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(S.css("paddingLeft"))||0)+(parseInt(S.css("paddingRight"))||0);var l=S.innerWidth();var AP=S.innerHeight();var Q=AP;S.wrap(A("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:AP+"px",width:l+"px"}).attr("tabindex",C.tabIndex));A(document).bind("emchange",function(AQ,AR,p){S.jScrollPane(C)})}if(C.reinitialiseOnImageLoad){var R=A.data(d,"jScrollPaneImagesToLoad")||A("img",S);var I=[];if(R.length){R.each(function(p,AQ){A(this).bind("load readystatechange",function(){if(A.inArray(p,I)==-1){I.push(AQ);R=A.grep(R,function(AT,AS){return AT!=AQ});A.data(d,"jScrollPaneImagesToLoad",R);var AR=A.extend(C,{reinitialiseOnImageLoad:false});S.jScrollPane(AR)}}).each(function(AR,AS){if(this.complete||this.complete===undefined){this.src=this.src}})})}}var AA=this.originalSidePaddingTotal;var AK=l-C.scrollbarWidth-C.scrollbarMargin-AA;var x={height:"auto",width:AK+"px"};if(C.scrollbarOnLeft){x.paddingLeft=C.scrollbarMargin+C.scrollbarWidth+"px"}else{x.paddingRight=C.scrollbarMargin+"px"}S.css(x);var y=S.outerHeight();var u=AP/y;if(u<0.99){var J=S.parent();J.append(A("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:C.scrollbarWidth+"px"}).append(A("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:C.scrollbarWidth+"px"}).append(A("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:C.scrollbarWidth+"px"}),A("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:C.scrollbarWidth+"px"}))));var AL=A(">.jScrollPaneTrack",J);var T=A(">.jScrollPaneTrack .jScrollPaneDrag",J);var AN;var G=[];var AC;var v=function(){if(AC>4||AC%4==0){AJ(AG+AN*h)}AC++};if(C.enableKeyboardNavigation){J.bind("keydown.jscrollpane",function(p){switch(p.keyCode){case 38:AN=-1;AC=0;v();G[G.length]=setInterval(v,100);return false;case 40:AN=1;AC=0;v();G[G.length]=setInterval(v,100);return false;case 33:case 34:return false;default:}}).bind("keyup.jscrollpane",function(AQ){if(AQ.keyCode==38||AQ.keyCode==40){for(var p=0;p<G.length;p++){clearInterval(G[p])}return false}})}if(C.showArrows){var r;var X;var O=function(p){A("html").unbind("mouseup",O);r.removeClass("jScrollActiveArrowButton");clearInterval(X)};var f=function(){A("html").bind("mouseup",O);r.addClass("jScrollActiveArrowButton");AC=0;v();X=setInterval(v,100)};J.append(A("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp",tabindex:-1}).css({width:C.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){r=A(this);AN=-1;f();this.blur();return false}).bind("click",B),A("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown",tabindex:-1}).css({width:C.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){r=A(this);AN=1;f();this.blur();return false}).bind("click",B));var U=A(">.jScrollArrowUp",J);var M=A(">.jScrollArrowDown",J);if(C.arrowSize){Q=AP-C.arrowSize-C.arrowSize;AL.css({height:Q+"px",top:C.arrowSize+"px"})}else{var AD=U.height();C.arrowSize=AD;Q=AP-AD-M.height();AL.css({height:Q+"px",top:AD+"px"})}}var AH=A(this).css({position:"absolute",overflow:"visible"});var D;var e;var h;var AG=0;var b=u*AP/2;var g=function(AQ,AS){var AR=AS=="X"?"Left":"Top";return AQ["page"+AS]||(AQ["client"+AS]+(document.documentElement["scroll"+AR]||document.body["scroll"+AR]))||0};var q=function(){return false};var AF=function(){z();D=T.offset(false);D.top-=AG;e=Q-T[0].offsetHeight;h=2*C.wheelSpeed*e/y};var E=function(p){AF();b=g(p,"Y")-AG-D.top;A("html").bind("mouseup",Y).bind("mousemove",t);if(A.browser.msie){A("html").bind("dragstart",q).bind("selectstart",q)}return false};var Y=function(){A("html").unbind("mouseup",Y).unbind("mousemove",t);b=u*AP/2;if(A.browser.msie){A("html").unbind("dragstart",q).unbind("selectstart",q)}};var AJ=function(AQ){AQ=AQ<0?0:(AQ>e?e:AQ);AG=AQ;T.css({top:AQ+"px"});var AR=AQ/e;S.data("jScrollPanePosition",(AP-y)*-AR);AH.css({top:((AP-y)*AR)+"px"});S.trigger("scroll");if(C.showArrows){U[AQ==0?"addClass":"removeClass"]("disabled");M[AQ==e?"addClass":"removeClass"]("disabled")}};var t=function(p){AJ(g(p,"Y")-D.top-b)};var AB=Math.max(Math.min(u*(AP-C.arrowSize*2),C.dragMaxHeight),C.dragMinHeight);T.css({height:AB+"px"}).bind("mousedown",E);var w;var V;var L;var AE=function(){if(V>8||V%4==0){AJ((AG-((AG-L)/2)))}V++};var AM=function(){clearInterval(w);A("html").unbind("mouseup",AM).unbind("mousemove",o)};var o=function(p){L=g(p,"Y")-D.top-b};var Z=function(p){AF();o(p);V=0;A("html").bind("mouseup",AM).bind("mousemove",o);w=setInterval(AE,100);AE();return false};AL.bind("mousedown",Z);J.bind("mousewheel",function(AQ,AS){AS=AS||(AQ.wheelDelta?AQ.wheelDelta/120:(AQ.detail)?-AQ.detail/3:0);AF();z();var AR=AG;AJ(AG-AS*h);var p=AR!=AG;return !p});var F;var c;function j(){var p=(F-AG)/C.animateStep;if(p>1||p<-1){AJ(AG+p)}else{AJ(F);z()}}var z=function(){if(c){clearInterval(c);delete F}};var AI=function(AS,p){if(typeof AS=="string"){$e=A(AS,S);if(!$e.length){return }AS=$e.offset().top-S.offset().top}J.scrollTop(0);z();var AR=y-AP;AS=AS>AR?AR:AS;S.data("jScrollPaneMaxScroll",AR);var AQ=AS/AR*e;if(p||!C.animateTo){AJ(AQ)}else{F=AQ;c=setInterval(j,C.animateInterval)}};S[0].scrollTo=AI;S[0].scrollBy=function(AQ){var p=-parseInt(AH.css("top"))||0;AI(p+AQ)};AF();AI(-AO,true);A("*",this).bind("focus",function(AT){var AS=A(this);var AV=0;while(AS[0]!=S[0]){AV+=AS.position().top;AS=AS.offsetParent()}var p=-parseInt(AH.css("top"))||0;var AU=p+AP;var AR=AV>p&&AV<AU;if(!AR){var AQ=AV-C.scrollbarMargin;if(AV>p){AQ+=A(this).height()+15+C.scrollbarMargin-AP}AI(AQ)}});if(location.hash){setTimeout(function(){AI(location.hash)},A.browser.safari?100:0)}A(document).bind("click",function(AQ){$target=A(AQ.target);if($target.is("a")){var p=$target.attr("href");if(p&&p.substr(0,1)=="#"&&p.length>1){setTimeout(function(){AI(p,!C.animateToInternalLinks)},A.browser.safari?100:0)}}});function a(p){A(document).bind("mousemove.jScrollPaneDragging",W);A(document).bind("mouseup.jScrollPaneDragging",N)}var m;var H;function k(){direction=m<0?-1:1;S[0].scrollBy(m/2)}function K(){if(H){clearInterval(H);H=undefined}}function W(AR){var AS=S.parent().offset().top;var p=AS+AP;var AQ=g(AR,"Y");m=AQ<AS?AQ-AS:(AQ>p?AQ-p:0);if(m==0){K()}else{if(!H){H=setInterval(k,100)}}}function N(p){A(document).unbind("mousemove.jScrollPaneDragging").unbind("mouseup.jScrollPaneDragging");K()}J.bind("mousedown.jScrollPane",a);A.jScrollPane.active.push(S[0])}else{S.css({height:AP+"px",width:l-this.originalSidePaddingTotal+"px",padding:this.originalPadding});S[0].scrollTo=S[0].scrollBy=function(){};S.parent().unbind("mousewheel").unbind("mousedown.jScrollPane").unbind("keydown.jscrollpane").unbind("keyup.jscrollpane")}})};A.fn.jScrollPaneRemove=function(){A(this).each(function(){$this=A(this);var B=$this.parent();if(B.is(".jScrollPaneContainer")){$this.css({top:"",height:"",width:"",padding:"",overflow:"",position:""});B.after($this).remove()}})};A.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false,tabIndex:0,enableKeyboardNavigation:true,animateToInternalLinks:false};A(window).bind("unload",function(){var C=A.jScrollPane.active;for(var B=0;B<C.length;B++){C[B].scrollTo=C[B].scrollBy=null}})})(jQuery);(function(A){A.event.special.mousewheel={setup:function(){var B=A.event.special.mousewheel.handler;if(A.browser.mozilla){A(this).bind("mousemove.mousewheel",function(C){A.data(this,"mwcursorposdata",{pageX:C.pageX,pageY:C.pageY,clientX:C.clientX,clientY:C.clientY})})}if(this.addEventListener){this.addEventListener((A.browser.mozilla?"DOMMouseScroll":"mousewheel"),B,false)}else{this.onmousewheel=B}},teardown:function(){var B=A.event.special.mousewheel.handler;A(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((A.browser.mozilla?"DOMMouseScroll":"mousewheel"),B,false)}else{this.onmousewheel=function(){}}A.removeData(this,"mwcursorposdata")},handler:function(D){var B=Array.prototype.slice.call(arguments,1);D=A.event.fix(D||window.event);A.extend(D,A.data(this,"mwcursorposdata")||{});var E=0,C=true;if(D.wheelDelta){E=D.wheelDelta/120}if(D.detail){E=-D.detail/3}D.data=D.data||{};D.type="mousewheel";B.unshift(E);B.unshift(D);return A.event.handle.apply(this,B)}};A.fn.extend({mousewheel:function(B){return B?this.bind("mousewheel",B):this.trigger("mousewheel")},unmousewheel:function(B){return this.unbind("mousewheel",B)}})})(jQuery);(function($){$.jPlayerCount=0;var methods={jPlayer:function(options){$.jPlayerCount++;var config={ready:null,cssPrefix:"jqjp",swfPath:"js",volume:80,oggSupport:false,position:"absolute",width:0,height:0,top:0,left:0,quality:"high",bgcolor:"#ffffff"};$.extend(config,options);var configWithoutOptions={id:$(this).attr("id"),swf:config.swfPath+((config.swfPath!="")?"/":"")+"Jplayer.swf",fid:config.cssPrefix+"_flash_"+$.jPlayerCount,aid:config.cssPrefix+"_audio_"+$.jPlayerCount,hid:config.cssPrefix+"_force_"+$.jPlayerCount,i:$.jPlayerCount};$.extend(config,configWithoutOptions);$.fn["jPlayerReady"+config.i]=config.ready;$(this).prepend('<audio id="'+config.aid+'"></audio>');var audioArray=$("#"+config.aid).get();var configForAudioFormat={canPlayMP3:Boolean((audioArray[0].canPlayType)?((""!=audioArray[0].canPlayType("audio/mpeg"))&&("no"!=audioArray[0].canPlayType("audio/mpeg"))):false),canPlayOGG:Boolean((audioArray[0].canPlayType)?((""!=audioArray[0].canPlayType("audio/ogg"))&&("no"!=audioArray[0].canPlayType("audio/ogg"))):false),audio:audioArray[0]};$.extend(config,configForAudioFormat);var configForHtmlAudio={html5:Boolean((config.oggSupport)?((config.canPlayOGG)?true:config.canPlayMP3):config.canPlayMP3)};$.extend(config,configForHtmlAudio);$(this).data("jPlayer.config",config);var events={setButtons:function(e,playing){var playId=$(this).data("jPlayer.cssId.play");var pauseId=$(this).data("jPlayer.cssId.pause");var prefix=$(this).data("jPlayer.config").cssPrefix;if(playId!=null&&pauseId!=null){if(playing){var style=$(this).data("jPlayer.cssDisplay.pause");$("#"+playId).css("display","none");$("#"+pauseId).css("display",style)}else{var style=$(this).data("jPlayer.cssDisplay.play");$("#"+playId).css("display",style);$("#"+pauseId).css("display","none")}}}};var eventsForFlash={setFile:function(e,f){var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);m.fl_setFile_mp3(f.mp3);$(this).trigger("jPlayer.setButtons",false)},play:function(e){var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);var r=m.fl_play_mp3();if(r){$(this).trigger("jPlayer.setButtons",true)}},pause:function(e){var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);var r=m.fl_pause_mp3();if(r){$(this).trigger("jPlayer.setButtons",false)}},stop:function(e){var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);var r=m.fl_stop_mp3();if(r){$(this).trigger("jPlayer.setButtons",false)}},playHead:function(e,p){var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);var r=m.fl_play_head_mp3(p);if(r){$(this).trigger("jPlayer.setButtons",true)}},playHeadTime:function(e,t){var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);var r=m.fl_play_head_time_mp3(t);if(r){$(this).trigger("jPlayer.setButtons",true)}},volume:function(e,v){$(this).data("jPlayer.config").volume=v;var fid=$(this).data("jPlayer.config").fid;var m=$(this).data("jPlayer.getMovie")(fid);m.fl_volume_mp3(v)}};var eventsForHtmlAudio={setFile:function(e,f){$("#"+$(this).data("jPlayer.config").aid).remove();$(this).prepend('<audio id="'+$(this).data("jPlayer.config").aid+'"></audio>');var audioArray=$("#"+$(this).data("jPlayer.config").aid).get();$(this).data("jPlayer.config").audio=audioArray[0];$(this).data("jPlayer.config").audio.volume=$(this).data("jPlayer.config").volume/100;if($(this).data("jPlayer.config").oggSupport&&$(this).data("jPlayer.config").canPlayOGG){$(this).data("jPlayer.config").audio.src=f.ogg}else{$(this).data("jPlayer.config").audio.src=f.mp3}$(this).trigger("jPlayer.setButtons",false)},play:function(e){$(this).data("jPlayer.config").audio.play();$(this).trigger("jPlayer.setButtons",true);clearInterval($(this).data("jPlayer.interval.jPlayerController"));$(this).data("jPlayer.interval.jPlayerController",window.setInterval($(this).jPlayerController,50,$(this),false))},pause:function(e){$(this).data("jPlayer.config").audio.pause();$(this).trigger("jPlayer.setButtons",false);clearInterval($(this).data("jPlayer.interval.jPlayerController"))},stop:function(e){$(this).data("jPlayer.config").audio.currentTime=0;$(this).trigger("jPlayer.pause");$(this).jPlayerController($(this),true)},playHead:function(e,p){$(this).data("jPlayer.config").audio.currentTime=($(this).data("jPlayer.config").audio.buffered)?p*$(this).data("jPlayer.config").audio.buffered.end()/100:p*$(this).data("jPlayer.config").audio.duration/100;$(this).trigger("jPlayer.play")},playHeadTime:function(e,t){$(this).data("jPlayer.config").audio.currentTime=t/1000;$(this).trigger("jPlayer.play")},volume:function(e,v){$(this).data("jPlayer.config").volume=v;$(this).data("jPlayer.config").audio.volume=v/100;$(this).jPlayerVolume(v)}};if(config.html5){$.extend(events,eventsForHtmlAudio)}else{$.extend(events,eventsForFlash)}for(var event in events){var e="jPlayer."+event;$(this).unbind(e);$(this).bind(e,events[event])}var getMovie=function(fid){return document[fid]};$(this).data("jPlayer.getMovie",getMovie);var checkForFlash=function(version){var flashIsInstalled=false;var flash;if(window.ActiveXObject){try{flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));flashIsInstalled=true}catch(e){}}else{if(navigator.plugins&&navigator.mimeTypes.length>0){flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(flashVersion>=version){flashIsInstalled=true}}}}return flashIsInstalled};if(!config.html5){if(checkForFlash(8)){if($.browser.msie){var html_obj='<object id="'+config.fid+'"';html_obj+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';html_obj+=' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';html_obj+=' type="application/x-shockwave-flash"';html_obj+=' width="'+config.width+'" height="'+config.height+'">';html_obj+="</object>";var obj_param=new Array();obj_param[0]='<param name="movie" value="'+config.swf+'" />';obj_param[1]='<param name="quality" value="high" />';obj_param[2]='<param name="FlashVars" value="id='+escape(config.id)+"&fid="+escape(config.fid)+"&vol="+config.volume+'" />';obj_param[3]='<param name="allowScriptAccess" value="always" />';obj_param[4]='<param name="bgcolor" value="'+config.bgcolor+'" />';var ie_dom=document.createElement(html_obj);for(var i=0;i<obj_param.length;i++){ie_dom.appendChild(document.createElement(obj_param[i]))}$(this).html(ie_dom)}else{var html_embed='<embed name="'+config.fid+'" id="'+config.fid+'" src="'+config.swf+'"';html_embed+=' width="'+config.width+'" height="'+config.height+'" bgcolor="'+config.bgcolor+'"';html_embed+=' quality="high" FlashVars="id='+escape(config.id)+"&fid="+escape(config.fid)+"&vol="+config.volume+'"';html_embed+=' allowScriptAccess="always"';html_embed+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';$(this).html(html_embed)}}else{$(this).html("<p>Flash 8 or above is not installed. <a href='http://get.adobe.com/flashplayer'>Get Flash!</a></p>")}}var html_hidden='<div id="'+config.hid+'"></div>';$(this).append(html_hidden);$(this).css({position:config.position,top:config.top,left:config.left});$("#"+config.hid).css({"text-indent":"-9999px"});if(config.html5){var self=$(this);window.setTimeout(function(){self.volume(config.volume);self.jPlayerReady()},100)}return $(this)},setFile:function(f1,f2){var f={mp3:f1,ogg:f2};$(this).trigger("jPlayer.setFile",f);return $(this)},play:function(){$(this).trigger("jPlayer.play");return $(this)},pause:function(){$(this).trigger("jPlayer.pause");return $(this)},stop:function(){$(this).trigger("jPlayer.stop");return $(this)},playHead:function(p){$(this).trigger("jPlayer.playHead",p);return $(this)},playHeadTime:function(t){$(this).trigger("jPlayer.playHeadTime",t);return $(this)},volume:function(v){$(this).trigger("jPlayer.volume",v);return $(this)},jPlayerId:function(fn,id){if(id!=null){var isValid=eval("$(this)."+fn);if(isValid!=null){$(this).data("jPlayer.cssId."+fn,id);var jPlayerId=$(this).data("jPlayer.config").id;eval('var myHandler = function(e) { $("#'+jPlayerId+'").'+fn+"(e); return false; }");$("#"+id).click(myHandler).hover($(this).jPlayerRollOver,$(this).jPlayerRollOut).data("jPlayerId",jPlayerId);var display=$("#"+id).css("display");$(this).data("jPlayer.cssDisplay."+fn,display);if(fn=="pause"){$("#"+id).css("display","none")}}else{alert("Unknown function assigned in: jPlayerId( fn="+fn+", id="+id+" )")}}else{id=$(this).data("jPlayer.cssId."+fn);if(id!=null){return id}else{alert("Unknown function id requested: jPlayerId( fn="+fn+" )");return false}}return $(this)},loadBar:function(e){var lbId=$(this).data("jPlayer.cssId.loadBar");if(lbId!=null){var offset=$("#"+lbId).offset();var x=e.pageX-offset.left;var w=$("#"+lbId).width();var p=100*x/w;$(this).playHead(p)}},playBar:function(e){$(this).loadBar(e)},onProgressChange:function(fn){$.fn["jPlayerOnProgressChange"+$(this).data("jPlayer.config").i]=fn;return $(this)},jPlayerOnProgressChange:function(loadPercent,playedPercentRelative,playedPercentAbsolute,playedTime,totalTime){var lbId=$(this).data("jPlayer.cssId.loadBar");if(lbId!=null){$("#"+lbId).width(loadPercent+"%")}var pbId=$(this).data("jPlayer.cssId.playBar");if(pbId!=null){$("#"+pbId).width(playedPercentRelative+"%")}$(this)["jPlayerOnProgressChange"+$(this).data("jPlayer.config").i](loadPercent,playedPercentRelative,playedPercentAbsolute,playedTime,totalTime);$(this).jPlayerForceUpdate();return true},jPlayerController:function(self,override){var playedTime=0;var totalTime=0;var playedPercentAbsolute=0;var loadPercent=0;var playedPercentRelative=0;if(self.data("jPlayer.config").audio.readyState>=1){playedTime=self.data("jPlayer.config").audio.currentTime*1000;totalTime=self.data("jPlayer.config").audio.duration*1000;playedPercentAbsolute=100*playedTime/totalTime;loadPercent=(self.data("jPlayer.config").audio.buffered)?100*self.data("jPlayer.config").audio.buffered.end()/self.data("jPlayer.config").audio.duration:100;playedPercentRelative=(self.data("jPlayer.config").audio.buffered)?100*self.data("jPlayer.config").audio.currentTime/self.data("jPlayer.config").audio.buffered.end():playedPercentAbsolute}if(override){self.jPlayerOnProgressChange(loadPercent,0,0,0,totalTime)}else{self.jPlayerOnProgressChange(loadPercent,playedPercentRelative,playedPercentAbsolute,playedTime,totalTime);if(self.data("jPlayer.config").audio.ended){clearInterval(self.data("jPlayer.interval.jPlayerController"));self.jPlayerOnSoundComplete()}}},volumeMin:function(){$(this).volume(0);return $(this)},volumeMax:function(){$(this).volume(100);return $(this)},volumeBar:function(e){var vbId=$(this).data("jPlayer.cssId.volumeBar");if(vbId!=null){var offset=$("#"+vbId).offset();var x=e.pageX-offset.left;var w=$("#"+vbId).width();var p=100*x/w;$(this).volume(p)}},volumeBarValue:function(e){$(this).volumeBar(e)},jPlayerVolume:function(v){var vbvId=$(this).data("jPlayer.cssId.volumeBarValue");if(vbvId!=null){$("#"+vbvId).width(v+"%");$(this).jPlayerForceUpdate();return true}},onSoundComplete:function(fn){$.fn["jPlayerOnSoundComplete"+$(this).data("jPlayer.config").i]=fn;return $(this)},jPlayerOnSoundComplete:function(){$(this).trigger("jPlayer.setButtons",false);$(this)["jPlayerOnSoundComplete"+$(this).data("jPlayer.config").i]();return true},jPlayerBufferState:function(b){var lbId=$(this).data("jPlayer.cssId.loadBar");if(lbId!=null){var prefix=$(this).data("jPlayer.config").cssPrefix;if(b){$("#"+lbId).addClass(prefix+"_buffer")}else{$("#"+lbId).removeClass(prefix+"_buffer")}return true}else{return false}},bufferMsg:function(){},jPlayerBufferMsg:function(msg){var bmId=$(this).data("jPlayer.cssId.bufferMsg");if(bmId!=null){$("#"+bmId).html(msg);return true}else{return false}},jPlayerForceUpdate:function(){var hid=$(this).data("jPlayer.config").hid;$("#"+hid).html(Math.random())},jPlayerRollOver:function(){var jPlayerId=$(this).data("jPlayerId");var prefix=$("#"+jPlayerId).data("jPlayer.config").cssPrefix;$(this).addClass(prefix+"_hover")},jPlayerRollOut:function(){var jPlayerId=$(this).data("jPlayerId");var prefix=$("#"+jPlayerId).data("jPlayer.config").cssPrefix;$(this).removeClass(prefix+"_hover")},jPlayerReady:function(){$(this)["jPlayerReady"+$(this).data("jPlayer.config").i]()},jPlayerGetInfo:function(info){return $(this).data("jPlayer.config")[info]}};$.each(methods,function(i){$.fn[i]=this})})(jQuery);function Omniture_SendExpandedSubchannelLink(){Omniture_SendMicroData("Expanded Subchannel Link","event21")}function Omniture_SendDLData(){Omniture_SendMicroData("Dynamic Lead","event20")}function BindBoxTracking(){$("div.box").each(function(){if($(this).attr("evar")&&$(this).attr("evar")!=""){var A=$(this).attr("evar");$(this).find("div.content a").click(function(){Omniture_SendMicroData(A,"event8","evar9")})}})}function BindCColumnBoxTracking(){var A=$("#sub div.box").each(function(){var B=this;$(this).find("div.content a").unbind().click(function(){var C="Box in C-Column";if($(B).attr("evar")){C=$(B).attr("evar")}Omniture_SendMicroData(C,"event8","evar9")})})}function BindPartnerLinksTracking(){var A=$("ul.partnerLinks").each(function(){var B=this;$(this).find("a").unbind().click(function(){if($(B).attr("evar")){var C=$(B).attr("evar");Omniture_SendMicroData(C,"event8","evar9")}})})}function BindSignalOrNoise(){$("div.poll h1.topic a").unbind().click(function(){Omniture_SendMicroData("Signal Or Noise - Title","event8","evar9")});$("div.poll a.more").unbind().click(function(){Omniture_SendMicroData("Signal Or Noise - What is this?","event8","evar9")});$("div.poll input.submit").unbind().click(function(){Omniture_SendMicroData("Signal Or Noise - Submit Button","event8","evar9")});$("div.poll div.handle").mouseup(function(){Omniture_SendMicroData("Signal Or Noise - Slider","event8","evar9")})}function BindNewstweet(){$("div.nw-twitter div.branding a").unbind().click(function(){Omniture_SendMicroData("Newstweet - Title","event8","evar9")});$("div.nw-twitter span.paused").mouseup(function(){Omniture_SendMicroData("Newstweet - Pause Button","event8","evar9")});$("div.nw-twitter a.twitter-link").unbind().click(function(){Omniture_SendMicroData("Newstweet - Sign In or Create Account","event8","evar9")});$("div.nw-twitter a.twitter-logo").unbind().click(function(){Omniture_SendMicroData("Newstweet - Twitter Logo","event8","evar9")});$("div.nw-twitter a.more").unbind().click(function(){Omniture_SendMicroData("Newstweet - What is this?","event8","evar9")})}function BindInlineAdInArticles(){$("div.story div.ad div.mediumRectangle").unbind().mousedown(function(){Omniture_SendMicroData("Ad - Article Inline Rectangle","event8","evar9");return true})}function BindHeaderTracking(){$("#header a.tabHome").click(function(){Omniture_SendMicroData("Tab - Home","event8","evar9")});$("#header a.tabUSEdition").click(function(){Omniture_SendMicroData("Tab - US Edition","event8","evar9")});$("#header a.tabMagazine").click(function(){Omniture_SendMicroData("Tab - Magazine","event8","evar9")});$("#header a.tabInternational").click(function(){Omniture_SendMicroData("Tab - International","event8","evar9")});$("#header a.tabMSNBC").click(function(){Omniture_SendMicroData("Tab - MSNBC","event8","evar9")});$("#header a.tabMSN").click(function(){Omniture_SendMicroData("Tab - MSN","event8","evar9")});$("#header #site-search-submit").click(function(){Omniture_SendMicroData("Header - Search Submit","event8","evar9")});$("#header #web-search-submit").click(function(){Omniture_SendMicroData("Header - Web Search Submit","event8","evar9")});$("#header a#login").click(function(){Omniture_SendMicroData("Tab - Login","event8","evar9")});$("#header a.logout").click(function(){Omniture_SendMicroData("Tab - Logout","event8","evar9")});$("#header a.edit").click(function(){Omniture_SendMicroData("Tab - Edit Profile","event8","evar9")});$("#head input.search-submit").click(function(){Omniture_SendMicroData("Header - Search Submit","event8","evar9")})}function BindMenuTracking(){$("#mainNav a").click(function(){var A="Menu - "+$(this).find("span").html();Omniture_SendMicroData(A,"event8","evar9")});$("#subNav a").click(function(){var A="Submenu - "+$(this).html();Omniture_SendMicroData(A,"event8","evar9")});$("#main-nav a").click(function(){var A="Header Nav - "+$(this).find("span").html();Omniture_SendMicroData(A,"event8","evar9")})}function BindFeatureWellTracking(){$("#main #content div.featurewell").each(function(){var A=this;$(this).find("a").click(function(){var B="Feature Well";if($(A).attr("evar")){B=$(A).attr("evar")}Omniture_SendMicroData(B,"event8","evar9")})})}function BindBlogHeaderLinksTracking(){$("#blog-nav a").click(function(){var A="Header Blog Nav - "+$(this).find("span").html();Omniture_SendMicroData(A,"event8","evar9")})}function BindNewsweekopediaLinksTracking(){$("#newsweekopedia-links a").click(function(){Omniture_SendMicroData("Newsweekopedia Click","event8","evar9")})}function BindFeatureAreaTracking(){$("#carousel li.package div.control").click(function(){var A=$(this).parents("li.package").prevAll("li.package").length+1;var B="Feature Area "+A+" - Tab Click";Omniture_SendMicroData(B,"event8","evar9")});$("#carousel li.package div.content").click(function(){var A=$(this).parents("li.package").prevAll("li.package").length+1;var B="Feature Area "+A+" - Click";Omniture_SendMicroData(B,"event8","evar9")})}function BindHomepageContentTracking(){$(".the-take a").click(function(){Omniture_SendMicroData("The Take","event8","evar9")});$(".in-the-know a").click(function(){Omniture_SendMicroData("In The Know","event8","evar9")});$(".dynamic-box a").click(function(){Omniture_SendMicroData("Dynamic Box","event8","evar9")});$(".contributors .content-wrapper a").click(function(){Omniture_SendMicroData("Contributors","event8","evar9")});$(".blogsList a").click(function(){Omniture_SendMicroData("Blog List","event8","evar9")});$(".internal-promo a").click(function(){Omniture_SendMicroData("Internal Promo","event8","evar9")})}function BindNewsSlashWeekTabsTracking(){$("#newsSlashWeek a.tab").click(function(){Omniture_SendMicroData("News/Week_Tabs","event8","evar9")})}function BindNewsSlashWeekContentTracking(){$("#newsSlashWeek a.channel").click(function(){Omniture_SendMicroData("News/Week_Sections","event8","evar9")});$("#newsSlashWeek a.image").click(function(){Omniture_SendMicroData("News/Week_Creatives","event8","evar9")});$("#newsSlashWeek li.article").each(function(){if($(this).hasClass("first")){$(this).find("a.article").click(function(){Omniture_SendMicroData("News/Week_Lead Link","event8","evar9")})}else{$(this).find("a.article").click(function(){Omniture_SendMicroData("News/Week_Story Links","event8","evar9")})}})}function BindSiteWideBannerTracking(){$("#site-banner #Area1 a").click(function(){Omniture_SendMicroData("Site Wide Banner - Area 1","event8","evar9")});$("#site-banner #Area2 a").click(function(){Omniture_SendMicroData("Site Wide Banner - Area 2","event8","evar9")});$("#site-banner #Area3 a").click(function(){Omniture_SendMicroData("Site Wide Banner - Area 3","event8","evar9")})}function BindReaderCommentTracking(){$("div.readerComment a.readerCommentViewAll").click(function(){Omniture_SendMicroData("Reader Comment - View All","event8","evar9")});$("div.readerComment a.readerCommentAddComment").click(function(){Omniture_SendMicroData("Reader Comment - Add Comment","event8","evar9")})}function BindTHPTracking(){$("div.TopHeadlines a").unbind();$("div.convWisdom a").unbind();$("div.TopHeadlines a").click(function(){Omniture_SendMicroData("Breaking News","event18")});$("div.convWisdom a").click(function(){Omniture_SendMicroData("Conventional Wisdom","event19")})}function BindExternalLinkFrame(){$("body.externalLink #aggregate-nav a").unbind().click(function(){Omniture_SendMicroData("SW_External link frame_menu tabs","event8","evar9")});$("body.externalLink #global-search").unbind().click(function(){Omniture_SendMicroData("SW_External link frame_search","event8","evar9")});$("body.externalLink div.header-logo a").unbind().click(function(){Omniture_SendMicroData("SW_External link frame_home","event8","evar9")});$("body.externalLink span.remove-frame").click(function(){Omniture_SendMicroData("SW_External link frame_close","event8","evar9")})}function BindThisWeeksMagazineOnHomepage(){$("body.homepage div.this-weeks-mag div.tab-content a").unbind().click(function(){Omniture_SendMicroData("HP - This Weeks Magazine","event8","evar9",true)})}function BindYourTakeOnHomepage(){$("body.homepage div.your-take a").click(function(){Omniture_SendMicroData("HP - Your Take","event8","evar9",true)})}function BindStoryPage(){$("#ToolBox-top li.facebook a").click(function(){Omniture_SendMicroData("SP_new top share bar_facebook","event8","evar9")});$("#ToolBox-top li.digg-submit a").click(function(){Omniture_SendMicroData("SP_new top share bar_digg","event8","evar9")});$("#ToolBox-top li.twitter a").click(function(){Omniture_SendMicroData("SP_new top share bar_twitter","event8","evar9")});$("#ToolBox-top li.linkedin a").click(function(){Omniture_SendMicroData("SP_new top share bar_linkedin","event8","evar9")});$("#ToolBox-top li.yahoo a").click(function(){Omniture_SendMicroData("SP_new top share bar_buzz","event8","evar9")});$("#ToolBox-top li.delicious a").click(function(){Omniture_SendMicroData("SP_new top share bar_delicious","event8","evar9")});$("#ToolBox-top li.stumbleupon a").click(function(){Omniture_SendMicroData("SP_new top share bar_stumbleupon","event8","evar9")});$("#ToolBox-top li.reddit a").click(function(){Omniture_SendMicroData("SP_new top share bar_reddit","event8","evar9")});$("#ToolBox-top li.fark a").click(function(){Omniture_SendMicroData("SP_new top share bar_fark","event8","evar9")});$("#ToolBox-top li.newsvine a").click(function(){Omniture_SendMicroData("SP_new top share bar_newsvine","event8","evar9")});$("#ToolBox-top li.comments-counter a").click(function(){Omniture_SendMicroData("SP_new top share bar_comments","event8","evar9")});$("#ToolBox-top li.print a").click(function(){Omniture_SendMicroData("SP_new top share bar_print","event8","evar9")});$("#ToolBox-top li.email a").click(function(){Omniture_SendMicroData("SP_new top share bar_email","event8","evar9")});$("#ToolBox-bottom li.facebook a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_facebook","event8","evar9")});$("#ToolBox-bottom li.digg-submit a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_digg","event8","evar9")});$("#ToolBox-bottom li.twitter a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_twitter","event8","evar9")});$("#ToolBox-bottom li.linkedin a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_linkedin","event8","evar9")});$("#ToolBox-bottom li.yahoo a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_buzz","event8","evar9")});$("#ToolBox-bottom li.delicious a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_delicious","event8","evar9")});$("#ToolBox-bottom li.stumbleupon a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_stumbleupon","event8","evar9")});$("#ToolBox-bottom li.reddit a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_reddit","event8","evar9")});$("#ToolBox-bottom li.fark a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_fark","event8","evar9")});$("#ToolBox-bottom li.newsvine a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_newsvine","event8","evar9")});$("#ToolBox-bottom li.comments-counter a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_comments","event8","evar9")});$("#ToolBox-bottom li.print a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_print","event8","evar9")});$("#ToolBox-bottom li.email a").click(function(){Omniture_SendMicroData("SP_new bottom share bar_email","event8","evar9")})}function BindArticleRelatedContentTracking(){$("div.related-cloud ul a").click(function(){Omniture_SendMicroData("SP_Article bottom_related content box","event8","evar9")});$("div.articleInfo div.related-cloud ul a").unbind().click(function(){Omniture_SendMicroData("SP_Article top_related content box","event8","evar9")})}function BindScopeTracking(){$("div.scope-container h3 a").unbind().click(function(){Omniture_SendMicroData("Daily Scope_Main Link","event8","evar9")});$("div.scope-container ul a").unbind().click(function(){Omniture_SendMicroData("Daily Scope_More Links","event8","evar9")})}function BindWhichIsQuizTracking(){$("div.which-is-quiz-tease h2 a").click(function(){Omniture_SendMicroData("Which_Is_Quiz Tease - Full Page Link","event8","evar9")});$("div.which-is-quiz-tease input[type=submit]").click(function(){Omniture_SendMicroData("Which_Is_Quiz Tease - Select Answer","event8","evar9")})}function BindWhichIsQuizDetailTracking(){$("#whichis-container.noresults .which-is-quiz input[type=submit]").click(function(){Omniture_SendMicroData("LP - Green Rankings_Select","event8","evar9")});$("#whichis-container.noresults .which-is-quiz a.see-results").click(function(){Omniture_SendMicroData("LP - Green Rankings_Select","event8","evar9")});$("#whichis-container.noresults .email-button").click(function(){Omniture_SendMicroData("LP - Green Rankings_Share_Email","event8","evar9")});$("#whichis-container.noresults .facebook-button").click(function(){Omniture_SendMicroData("LP - Green Rankings_Share_Facebook","event8","evar9")});$("#whichis-container.noresults .twitter-button").click(function(){Omniture_SendMicroData("LP - Green Rankings_Share_Twitter","event8","evar9")});$("#whichis-container.noresults #comment-form input[type=image]").click(function(){Omniture_SendMicroData("LP - Green Rankings_Share_Submit","event8","evar9")});$("#whichis-container.results .which-is-quiz input[type=submit]").click(function(){Omniture_SendMicroData("RP - Green Rankings_Select","event8","evar9")});$("#whichis-container.results .which-is-quiz a.see-results").click(function(){Omniture_SendMicroData("RP - Green Rankings_Select","event8","evar9")});$("#whichis-container.results .email-button").click(function(){Omniture_SendMicroData("RP - Green Rankings_Share_Email","event8","evar9")});$("#whichis-container.results .facebook-button").click(function(){Omniture_SendMicroData("RP - Green Rankings_Share_Facebook","event8","evar9")});$("#whichis-container.results .twitter-button").click(function(){Omniture_SendMicroData("RP - Green Rankings_Share_Twitter","event8","evar9")});$("#whichis-container.results #comment-form input[type=image]").click(function(){Omniture_SendMicroData("RP - Green Rankings_Share_Submit","event8","evar9")});$("#whichis-container.results .related-articles a").click(function(){Omniture_SendMicroData("RP - Green Rankings_Share_Submit","event8","evar9")})}function BindMyTakeTracking(){$("#my-take-landing #saveSelection").click(function(){Omniture_SendMicroData("My Take Personalized LP_Submit","event8","evar9")});$("body.homepage #my-take-initial #customize-now").click(function(){Omniture_SendMicroData("Personalized My Take","event8","evar9")});$("#mesothorax #my-take-initial #customize-now").click(function(){Omniture_SendMicroData("SP_Personalized My Take","event8","evar9")});$("#mesothorax .articlecontent .global-inline-box").click(function(){Omniture_SendMicroData("SP_Inline Box My Take","event8","evar9")})}function Omniture_SendMicroData(customLinkName,event,evar,ignoreHomepagePrefix){if($("body").hasClass("homepage")&&(ignoreHomepagePrefix==null||ignoreHomepagePrefix==false)){customLinkName="HP - "+customLinkName}if(event&&evar){s.linkTrackVars="events,"+evar;eval("s."+evar+" = '"+customLinkName+"';")}else{if(event){s.linkTrackVars="events"}}s.pageName=null;s.linkTrackEvents=event;s.events=event;s.tl(this,"o",customLinkName)}function BindSubNavMenuExpanded(){$("#subNavExpanded a").click(function(){Omniture_SendExpandedSubchannelLink()})}$(document).ready(function(){BindSubNavMenuExpanded();BindBoxTracking();BindCColumnBoxTracking();BindPartnerLinksTracking();BindSiteWideBannerTracking();BindReaderCommentTracking();BindHeaderTracking();BindMenuTracking();BindBlogHeaderLinksTracking();BindNewsweekopediaLinksTracking();BindFeatureAreaTracking();BindHomepageContentTracking();BindFeatureWellTracking();BindSignalOrNoise();BindNewstweet();BindInlineAdInArticles();BindExternalLinkFrame();BindThisWeeksMagazineOnHomepage();BindYourTakeOnHomepage();BindStoryPage();BindNewsSlashWeekTabsTracking();BindNewsSlashWeekContentTracking();BindArticleRelatedContentTracking();BindScopeTracking();BindWhichIsQuizTracking();BindWhichIsQuizDetailTracking();BindMyTakeTracking()});function translateToHCode(){if(typeof (nw_section)!="undefined"){nw_section=nw_section.replace(/\//," - ")}if(typeof (nw_subsection)!="undefined"){nw_subsection=nw_subsection.replace(/\//," - ")}if(typeof (nw_page_name)!="undefined"){s.pageName=nw_page_name.replace(/<[a-zA-Z\/][^>]*>/g,"");s.pageName=s.pageName.replace(/\;jsessionid\=.{23}/g,"")}else{s.pageName="nw - "+document.location.pathname+" - "+document.title;s.pageName=s.pageName.replace(/<[a-zA-Z\/][^>]*>/g,"");s.pageName=s.pageName.replace(/\;jsessionid\=.{23}/g,"")}if(typeof (nw_channel)!="undefined"){s.channel=(nw_channel.indexOf("nw - ")>=0)?nw_channel:"nw - "+nw_channel}else{if(typeof (nw_section)!="undefined"){s.channel=(nw_section.indexOf("nw - ")>=0)?nw_section.split("/")[0]:"nw - "+nw_section.split("/")[0]}else{if(typeof (nw_hierarchy)!="undefined"){s.channel=(nw_hierarchy.indexOf("nw - ")>=0)?nw_hierarchy.split("|")[0]:"nw - "+nw_hierarchy.split("|")[0]}else{s.channel="nw - nocategory"}}}s.server="newsweek.com";s.pageType="";if(typeof (nw_sectionfront)!="undefined"){nw_sectionfront=nw_sectionfront.toLowerCase();s.prop1=(nw_sectionfront.indexOf("nw - ")>=0)?nw_sectionfront:"nw - "+nw_sectionfront}if(typeof (nw_subsection)!="undefined"){nw_subsection=nw_subsection.toLowerCase();s.prop2=(nw_subsection.indexOf("nw - ")>=0)?nw_subsection:"nw - "+nw_subsection}if(typeof (nw_content_type)!="undefined"){s.prop3=nw_content_type.toLowerCase()}if(typeof (nw_source)!="undefined"){s.prop4=nw_source.toLowerCase()}else{s.prop4="newsweek.com"}if(typeof (nw_author)!="undefined"){s.prop5=nw_author.toLowerCase()}if(typeof (nw_search_keywords)!="undefined"){s.prop6=nw_search_keywords.toLowerCase()}if(typeof (nw_search_type)!="undefined"){s.prop7=nw_search_type.toLowerCase()}s.prop8="";s.prop9="";s.prop10="";s.prop11="";if(typeof (nw_content_id)!="undefined"){s.prop12=nw_content_id;if(typeof (nw_application)!="undefined"&&nw_application){s.prop13=""}if(typeof (nw_headline)!="undefined"&&nw_content_id!=""){s.prop13=nw_headline+" - "+nw_content_id}}if(typeof (nw_page_num)!="undefined"){s.prop14=nw_page_num}if(typeof (nw_printed)!="undefined"){s.prop19="printed page"}if(typeof (nw_search_result_count)!="undefined"){s.prop21=nw_search_result_count}if(typeof (nw_blog_name)!="undefined"){s.prop25=nw_blog_name}if(typeof (nw_application)!="undefined"){s.prop32=nw_application}if(typeof (nw_pub_date)!="undefined"){s.prop33=nw_pub_date}s.campaign="";s.state="";s.zip="";s.events="";s.products="";s.purchaseID="";s.eVar1="";s.eVar2="";s.eVar3="";s.eVar4="";s.eVar5="";s.eVar6="";s.eVar7="";s.eVar8="";s.eVar9="";s.eVar10="";if(typeof (nw_hierarchy)!="undefined"){s.hier1=nw_hierarchy.toLowerCase()}else{s.hier1="nocategory"}s.hier2="newsweek.com|"+s.hier1}function multimediaAdCall(){if(document.getElementById("wpni_adi_leaderboard")){placeAd2(commercialNode,"leaderboard","AJAX","")}if(document.getElementById("wpni_adi_articleFlex")){placeAd2(commercialNode,"articleFlex","AJAX","")}}function peekAdCall(D){if(typeof (placeAd2)=="function"){var A="";var C="";var B=D.split(":");if(B.length>1){A=B[1]}if(B.length>2){C=B[2]}if(C===""&&typeof (commercialNode)!="undefined"){C=commercialNode}placeAd2(C,"88x31|"+A,false,"")}return false}function quickReadDelayedAdCall(){if(document.getElementById("wpni_adi_468x60_quickread")){placeAd2("module/quickread","468x60|quickread","AJAX","")}}function quickReadAdCall(){window.setTimeout(quickReadDelayedAdCall,250)}var flexCreativeIntervalId;function checkFlexCreative(){var B=document.getElementById("flex_creative");if(B&&B.scrollHeight&&B.scrollHeight>50){if(B.scrollHeight>280){B.style.position="absolute";B.style.padding="0 0 13px 0";var A=document.getElementById("topTenVertical");if(A&&A.offsetTop&&A.offsetTop>850){B.style.height=A.offsetTop-50+"px"}}clearInterval(flexCreativeIntervalId)}}flexCreativeIntervalId=setInterval(checkFlexCreative,500);function AddHandler(F,B,C,E){var D=function(G){F[C](G,E)};if(F.addEventListener){F.addEventListener(B,D,false)}else{if(F.attachEvent){F.attachEvent("on"+B,D)}else{var A=F["on"+B];if(A){D=function(G){A(G);F[C](G,E)}}F["on"+B]=D}}}function GetEventXY(A){if(A===null){A=window.event}return[A.clientX+document.documentElement.scrollLeft,A.clientY+document.documentElement.scrollTop]}function getMouseY(A){if(A===null){A=event}return A.clientY+document.documentElement.scrollTop}function getMouseX(A){if(A===null){A=event}return A.clientX+document.documentElement.scrollLeft}function getPointerX(A){return((A!==null)?A.pageX:getMouseX(window.event))}function getPointerY(A){return((A!==null)?A.pageY:getMouseY(window.event))}(function(){try{document.execCommand("BackgroundImageCache",false,true)}catch(A){}})();function CharCounter(A){this.nodetype=A.updateEl.nodeName.toLowerCase();this.field=A.field;this.updateEl=A.updateEl;this.currLength=(A.field.value.length>0)?A.field.value.length:0;this.maxLength=A.maxChars;if(this.currLength!=0){this.updateCharCounter()}this.bindFieldEvents()}CharCounter.prototype={disabledKeyCodes:[37,39,38,40],ctrl:false,maxReached:false,maxLength:null,currLength:null,updateEl:null,field:null,nodeType:null,getFieldLength:function(){return this.field.value.length},checkCharLimit:function(){this.currLength=this.getFieldLength();if((this.maxLength-this.currLength)<20){this.updateEl.style.color="#5c0002"}if((this.maxLength-this.currLength)<10){this.updateEl.style.color="#990000"}if((this.maxLength-this.currLength)>20){this.updateEl.style.color="#666666"}if(this.currLength===this.maxLength){this.maxReached=true}return false},updateCharCounter:function(){var A=(this.maxLength-this.getFieldLength()!=1)?"s":"";if(this.nodetype=="textarea"||this.nodetype=="input"){this.updateEl.value=(this.maxLength-this.getFieldLength());return }this.updateEl.innerHTML=(this.maxLength-this.getFieldLength())+" char"+A+" left"},onControlKey:function(B){var A=(document.all)?B.modifiers&B.CONTROL_MASK:B.ctrlKey;return A},handleKeyEvent:function(B){var A=this.getKeyCode(B);for(i in this.disabledKeyCodes){if(A==this.disabledKeyCodes[i]){return }}if(!this.checkCharLimit()){this.updateCharCounter();return }if(this.ctrl&&this.getKeyCode(B)==86){if(this.getFieldLength()>this.maxLength){this.updateEl.innerHTML="Please enter up to "+this.maxLength+" chars";return }}else{if(this.getFieldLength()>this.maxLength){this.updateEl.innerHTML=this.maxLength-this.getFieldLength()+" chars left";return }}this.updateEl.innerHTML="You have 0 chars left"},getKeyCode:function(A){if(A.keyCode){code=A.keyCode}else{if(A.which){code=A.which}}return code},bindFieldEvents:function(){var A=this;$(this.field).keyup(function(B){A.handleKeyEvent(B)})}};NWK.util.DisableContextMenu=function(A){document.oncontextmenu=function(D){if(!D){D=window.event}var B=(D.target)?D.target:D.srcElement;for(var C=0;C<A.length;C++){if(B.className.indexOf(A[C])!=-1||B.parentNode.className.indexOf(A[C])!=-1){B=null;return false}}}};NWK.util.DisableContextMenu(["peekOff","peekSelected","ctrl","thpButton","quickGuide","next","prev"]);NWK.util.Cookie={read:function(C){if(!C){return null}if(document.cookie.length>0){var B=C+"=";var D=document.cookie.split(";");for(var A=0;A<D.length;A++){var E=D[A];while(E.charAt(0)==" "){E=E.substring(1,E.length);if(E.indexOf(B)==0){return E.substring(B.length,E.length)}}}}return null},create:function(C,D,E,A){if(!A){A=""}else{A="; expires="+A}if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));A="; expires="+B.toGMTString()}document.cookie=C+"="+D+A+"; path=/"},remove:function(A){this.create(A,"",-1)}};var DateCalculator=function(A){if(A==undefined){this.offset=(new Date()).getTimezoneOffset()*60*1000}else{this.offset=A}};DateCalculator.prototype.newUTCDate=function(A){if(!A){A=new Date()}return new Date(A.getTime()+this.offset)};DateCalculator.prototype.utcToLocalDate=function(A){return new Date(A.getTime()-this.offset)};DateCalculator.prototype.parseIso8601Date=function(A){var B=Date.UTC(A.substring(0,4),A.substring(5,7)-1,A.substring(8,10),A.substring(11,13),A.substring(14,16),A.substring(17,19));return new Date(B+this.offset)};function detectProxy(A){if(typeof (proxyUrl)!="undefined"){var B=proxyUrl+"?url="+encodeURIComponent(A);return B}else{return A}}function getRealTopByObj(A){yPos=0;if(A){yPos=A.offsetTop;tempEl=A.offsetParent;while(tempEl!==null){yPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent}}return yPos}function getRealTop(A){thisObj=A;yPos=getRealTopByObj(A);return yPos}function getRealLeftByObj(A){xPos=0;if(A){xPos=A.offsetLeft;tempEl=A.offsetParent;while(tempEl!==null){xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent}}return xPos}function getRealLeft(A){thisObj=A;xPos=getRealLeftByObj(A);return xPos}function GetObjPos(B){var C=0,A=0;var D=null;if(B){C=B.offsetLeft;A=B.offsetTop;D=B.offsetParent;while(D!==null){C+=D.offsetLeft;A+=D.offsetTop;D=D.offsetParent}}return[C,A]}function GetPos(A){var C=0;var B=0;if(A.offsetParent){C=A.offsetLeft;B=A.offsetTop;while(A==A.offsetParent){C+=A.offsetLeft;B+=A.offsetTop}}return[C,B]}function evalScripts(html){var re=/<script.*?>([\s\S]*?)<\//igm;var match;while(match=re.exec(html)){eval(match[1])}}NWK.util.FormValidation={isValid:true,disabledkeyCodes:[9],errMsg:{required:{msg:function(A){return"Please enter a "+A.name},test:function(A){return(A.value)?A.value.length>0||A.value==A.defaultValue:false}}},init:function(B,A){var B=B;this.bindForm(B)},bindForm:function(A){var B=this;$(A).find('input[type = "submit"]').click(function(){if(!B.validateForm(A)){return false}});this.bindFields(A)},bindFields:function(A){var B=this;for(var C=0;C<A.elements.length;C++){$(A.elements[C]).keyup(function(D){if(D.keyCode===9){return }return B.validateField(this)})}},validateForm:function(B){B.valid=true;for(var A=0;A<B.elements.length;A++){this.hideErrors(B.elements[A]);if(!this.validateField(B.elements[A])){B.valid=false}}return B.valid},validateField:function(C){var D=[];for(var A in this.errMsg){var B=new RegExp("(^|\\s)"+A+"(\\s|$)");if(B.test(C.className)&&!this.errMsg[A].test(C)){D.push(this.errMsg[A].msg(C))}}if(D.length){this.showErrors(C,D)}else{this.hideErrors(C)}if(D.length>0){return false}return true},hideErrors:function(B){var A=B.nextSibling;if(A&&A.nodeName=="UL"&&A.className=="errors"){B.parentNode.removeChild(A)}},showErrors:function(E,F){var D=E.nextSibling;var C=null;if(!D||(D.nodeName!="UL"||D.className!="errors")){C=document.createElement("ul");C.className="errors";$(C).insertAfter(E)}if(C!==null){for(var B=0;B<F.length;B++){var A=document.createElement("li");A.innerHTML=F[B];C.appendChild(A)}}},checkRequired:function(A){return A.value.length>0&&A.value!=A.defaultValue},getInputsByName:function(B){var D=[];D.numChecked=0;var A=document.getElementsByTagName("input");for(var C=0;C<A.length;C++){if(A[C].name==B){D.push(A[C]);if(A[C].checked){D.numChecked++}}}return D}};NWK.register("Form Validation",NWK.util.FormValidation);function hasFlash(B){var A=swfobject.getFlashPlayerVersion();if(document.getElementById&&(A.major===0)){document.getElementById(B).innerHTML="<a href='http://www.adobe.com/go/getflashplayer'><img src='http://bc.newsweek.com/media/nw_flash_install_ccol.jpg' border=0></a>"}else{if(document.getElementById&&(A.major>0&&A.major<8)){document.getElementById(B).innerHTML="<a href='http://www.adobe.com/go/getflashplayer'><img src='http://bc.newsweek.com/media/nw_flash_upgrade_ccol.jpg' border=0></a>"}else{return true}}return false}Interval=function(A){this.delay=A||1000;this.timeout=null;this.bindable=jQuery(this)};Interval.prototype.listen=function(A,B){this.bindable.bind(A,B)};Interval.prototype.setDelay=function(A){this.delay=A};Interval.prototype.start=function(A){if(!this.timeout){this.scheduleUpdate()}};Interval.prototype.restart=function(A){this.stop();this.start()};Interval.prototype.stop=function(A){if(this.timeout){clearTimeout(this.timeout);this.timeout=undefined}};Interval.prototype.scheduleUpdate=function(){var A=this;this.timeout=setTimeout(function(){A.scheduleUpdate();A.execute()},this.delay)};Interval.prototype.execute=function(){this.bindable.trigger("run")};var Paths={Current:null,InferRootPath:function(){var A=window.location.pathname;A=A.substring(0,A.lastIndexOf("/"));if(A.indexOf("/id")>-1){A=A.substring(0,A.indexOf("/id"))}if(A.indexOf("/profile")>-1){A=A.substring(0,A.indexOf("/profile"))}return window.location.protocol+"//"+window.location.host+A},Init:function(){var A=Paths.InferRootPath();this.RootPath=A;this.FilePath=A;this.StaticContentRoot=A;this.RegistrationHost=A;this.SearchHost=A;if(typeof (rootpath)!="undefined"){this.RootPath=rootpath}if(typeof (filepath)!="undefined"){this.FilePath=filepath}if(typeof (staticContentRoot)!="undefined"){this.StaticContentRoot=staticContentRoot}if(typeof (registrationHost)!="undefined"){this.RegistrationHost=registrationHost}if(typeof (searchHost)!="undefined"){this.SearchHost=searchHost}}};Paths.Current=new Paths.Init();function resizeDiv(B,D,A){var C=document.getElementById(B);C.style.height=(D+10)+"px";if(C.hasChildNodes){if(A!=false){window.onload=function(){C.childNodes[0].height=D+"px"}}}}function resizeDivBasedOnOther(C,B){var A=0;$(B).each(function(){if($(this).height()>A){A=$(this).height()}});$(C).height(A)}function setHome(A){if($.browser.msie){A.style.behavior="url(#default#homepage)";A.setHomePage("http://www.newsweek.com");return false}return true}function RegexValidate(A,C){if(C!=null&&C.length>0){var B=new RegExp(C);return A.match(B)}else{return false}}function StringTrim(A){A=A.replace(/^\s+/g,"");return A.replace(/\s+$/g,"")}var TimedQueue=function(C,B){this.interval=new Interval(C);this.items=B||[];this.bindable=$(this);var A=this;this.interval.listen("run",function(){A.execute()})};TimedQueue.prototype.listen=function(A,B){this.bindable.bind(A,B)};TimedQueue.prototype.setDelay=function(A){this.interval.setDelay=A};TimedQueue.prototype.clear=function(){this.items=[]};TimedQueue.prototype.addItems=function(A){for(var B=0;B<A.length;B++){this.items.push(A[B])}};TimedQueue.prototype.addItemsReversed=function(A){for(var B=0;B<A.length;B++){this.items.unshift(A[B])}};TimedQueue.prototype.setNextItem=function(A){this.items.unshift(A)};TimedQueue.prototype.start=function(){this.interval.start()};TimedQueue.prototype.stop=function(){this.interval.stop()};TimedQueue.prototype.restart=function(){this.interval.restart()};TimedQueue.prototype.execute=function(){var A=this.items.shift();if(A){this.bindable.trigger("pop",[A,this.items.length])}};function getScrollTop(){if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else{if(document.body){return document.body.scrollTop}else{if(window.pageYOffset){return window.pageYOffset}}}return 0}function getScrollLeft(){if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}else{if(document.body){return document.body.scrollLeft}else{if(window.pageXOffset){return window.pageXOffset}}}return 0}NWK.widget.AggregatedHeader={init:function(B){var C=parent.document;var D=C.getElementsByTagName("frame")[0];var A=C.getElementsByTagName("frame")[1];this.setUrl(A);this.routeHeaderLinks(B)},setUrl:function(A){var B=A.getAttribute("src");var E=B.split("/",1);var C=B.split("/",3);C=C[2];var D=B.search(C)+C.length-1;D=B.substring(D+1);this.removeFrame(B);$("#newsweek-aggregate-header .current-url .protocol").text(E+"//");$("#newsweek-aggregate-header .current-url .host").text(C);$("#newsweek-aggregate-header .current-url .path").text(D)},routeHeaderLinks:function(A){$("#newsweek-aggregate-header a").click(function(B){parent.document.location=$(this).attr("href");B.preventDefault()});$("#newsweek-aggregate-header #global-search input.search-submit").click(function(B){parent.document.location=A+"search?q="+$("#newsweek-aggregate-header #global-search input.text").val();B.preventDefault()})},removeFrame:function(A){$("#newsweek-aggregate-header .remove-frame").click(function(){parent.document.location=A})}};NWK.widget.BoxFlipper={init:function(){$("div.boxFlipper").each(function(A){var B={node:$(this).parent().parent().parent().parent(".box"),content:$(this).parent().parent().parent(".bot").siblings(".content"),flipper:this,pageNum:1,itemsPerPage:$(this).parent().parent().parent(".bot").siblings(".content").children().length,totalItems:$(this).parent().parent().parent().parent(".box").attr("data")};NWK.widget.BoxFlipper.setFlipperHandler(B)})},setFlipperHandler:function(A){$("ul li a",A.flipper).click(function(){if($(this).attr("class")=="prev"){A.pageNum--}else{A.pageNum++}var B=Paths.Current.RootPath+"id/"+RegexValidate(this.id,"[0-9]+")+"/page/"+A.pageNum+"/items/"+A.itemsPerPage+"/output/ajaxbox";if($(A.node).parent().hasClass("BoxCollectionAlt")){B+="/alt/1"}var C=NWK.widget.BoxFlipper.loadBoxPage;NWK.widget.BoxFlipper.ajaxRequest(B,C,A);return false})},ajaxRequest:function(A,C,B){$.ajax({dataType:"html",url:detectProxy(A),success:function(D){C(B,D)},error:function(D){}})},loadBoxPage:function(A,B){$(A.content).html(B);if(A.pageNum==1){$("ul.controls",A.flipper).removeClass("prev").removeClass("prevNext").addClass("next");$("ul.controls li a.prev",A.flipper).css("visibility","hidden");$("ul.controls li a.next",A.flipper).css("visibility","visible");return }if(A.pageNum>1&&A.itemsPerPage*A.pageNum<A.totalItems){$("ul.controls",A.flipper).removeClass("next").removeClass("prev").addClass("prevNext");$("ul.controls li a",A.flipper).css("visibility","visible");return }if(A.pageNum*A.itemsPerPage>=A.totalItems){$("ul.controls",A.flipper).removeClass("next").removeClass("prevNext").addClass("prev");$("ul.controls li a.prev",A.flipper).css("visibility","visible");$("ul.controls li a.next",A.flipper).css("visibility","hidden");return }}};NWK.widget.Carousel={carousel:null,strLoadingImg:"",intvObj:null,interval:10000,arrSections:[],nav:null,carouselPackage:[],currIndex:0,carouselPos:[],navIntvObj:null,observers:[],init:function(){var A=this;this.carousel=$("#carousel");this.nav=$("ul.packages",this.carousel);this.carouselPackage=$("li.package",this.nav);this.carouselPos=GetObjPos(document.getElementById("carousel"));this.bindHover();this.start()},bindHover:function(){var A=this;$(this.carouselPackage).each(function(B){$(this).mouseover(function(){var C=this;A.intvObj.stop();if(A.navIntvObj===null){A.navIntvObj=new Interval(400)}A.navIntvObj.listen("run",function(D){A.getPackageByMouse(C,B);A.navIntvObj.stop()});A.navIntvObj.start()});$(this).mouseout(function(){A.intvObj.restart();if(A.navIntvObj!==null){A.navIntvObj.stop();A.navIntvObj=null}})})},getPackageByMouse:function(C,A){if($(C).hasClass("selected")){return }$(this.carouselPackage).removeClass("selected").removeClass("first").removeClass("previous");$(C).addClass("selected");$(C).prev().addClass("previous");if($(this.carouselPackage[3]).hasClass("last")!=true){$(this.carouselPackage[3]).addClass("last")}if($(C).hasClass("last")){$(C).removeClass("last")}$("div.content div.package-content",C).css("display","none");var B=$("div.content div.package-content",C);this.showContent(B,A);this.notify(B)},start:function(){var B=this;var A=this.carouselPackage.length;if(this.intvObj===null){this.intvObj=new Interval(parseInt(this.interval))}this.intvObj.listen("run",function(C){if(B.currIndex==A-1){B.currIndex=0}else{B.currIndex++}B.selectPackage(B.carouselPackage[B.currIndex],B.currIndex)});this.intvObj.start()},selectPackage:function(D,A){var C=this;if($(D).hasClass("selected")){return }$(this.carouselPackage).each(function(E){$(this).removeClass("selected").removeClass("first").removeClass("previous");if(E==(A-1)){$(this).addClass("previous")}if(A==C.carouselPackage.length-1){$(this).removeClass("last")}else{if($(C.carouselPackage[3]).hasClass("last")!=true){$(C.carouselPackage[3]).addClass("last")}}$("div.content div.package-content",this).css("display","none")});$(D).addClass("selected");var B=$("div.content div.package-content",D);this.showContent(B,A);this.notify(B)},showContent:function(B,A){$(B).parent().css({"margin-top":-(A*75)+-3+"px"});if($.browser.msie){$(B).parent().css({"margin-top":-(A*75)+-3+"px"});$(B).show()}else{$(B).fadeIn(300)}this.currIndex=A},hideContent:function(){$("div.content div.package-content",this.carouselPackage[this.currIndex]).hide()},subscribe:function(A){if(A){this.observers.push(A)}},notify:function(B){if(this.observers.length>0){for(var C in this.observers){var A=this.observers[C];A.obj[A.callback](B)}}}};NWK.widget.CommentsReply={isInitReply:false,source:"",textVal:"",replyId:"",init:function(){$("a.reply").click(function(C){var B=GetObjPos(this);var A=function(){var D=null;if(document.getElementById("nw-comments")!=null){D=GetObjPos(document.getElementById("nw-comments"))}else{D=GetObjPos(document.getElementById("nw-comments-sn"))}return D}();NWK.widget.CommentsReply.replyId=($(this).attr("id")).match(/\d+$/);NWK.widget.CommentsReply.source=this;NWK.widget.CommentsReply.getForm(C,B,A);return false})},getForm:function(D,B,A){var E=20;var C=-(A[0]-B[0]);if(B[0]<$(document).width()/2){C=(A[0]-B[0])-$(D.target).width()}$("#replyToId").val(this.replyId);$("#reply-form input[name='ReturnUrl']").val(location.href);NWK.widget.DialogBox.init({evt:D,html:$("#reply-form-div").html(),bIsModal:true,adjCoords:[C,E]});NWK.widget.CommentsSubmit.form=$("#reply-form");NWK.widget.CommentsSubmit.init()},resetForm:function(){$(".closeModal, #overlay").click(function(){if($("#reply-box")){$("input[name = 'replyToId']").val("-1")}NWK.widget.CommentsSubmit.init();return false})}};NWK.register("Comment Reply",NWK.widget.CommentsReply);NWK.widget.CommentsReport={isInitNwReport:false,reportId:"",source:"",init:function(){$("a.report").click(function(C){var B=GetObjPos(this);var A=function(){var D=null;if(document.getElementById("nw-comments")!=null){D=GetObjPos(document.getElementById("nw-comments"))}else{D=GetObjPos(document.getElementById("nw-comments-sn"))}return D}();NWK.widget.CommentsReport.reportId=($(this).attr("id")).match(/\d+$/);NWK.widget.CommentsReport.source=this;NWK.widget.CommentsReport.getForm(C,B,A);return false})},getForm:function(E,B,A){var C=20;var D=-(A[0]-B[0]);if(B[0]<$(document).width()/2){D=(A[0]-B[0])-$(E.target).width()}NWK.widget.DialogBox.init({evt:E,html:$("#report-form-div").html(),bIsModal:true,adjCoords:[D,C],width:$("#report-box").width()});$("#report-post-id").val(NWK.widget.CommentsReport.reportId);NWK.widget.CommentsSubmit.form=$("#report-abuse-form");NWK.widget.CommentsSubmit.init()}};NWK.register("Comment Report",NWK.widget.CommentsReport);NWK.widget.CommentsSubmit={form:null,msg:null,isActive:false,defaultVal:"",textarea:null,successMsg:function(){if($(this.form).attr("id")=="reply-form"){return"Your reply has been successfully submitted.  It may take a few minutes for it to appear."}else{if($(this.form).attr("id")=="report-abuse-form"){return"Your report has been successfully submitted."}else{return"Your comment has been successfully submitted.  It may take a few minutes for it to appear."}}},errorMsg:function(A){if($(this.form).attr("id")=="reply-form"){if(A=="113"){return"Your reply has been flagged as spam. A moderator will review your comment shortly."}else{return"Your reply could not be submitted at this time. Please try again later."}}else{if($(this.form).attr("id")=="report-abuse-form"){return"Your report could not be submitted at this time. Please try again or contact NWK.com"}else{if(A=="113"){return"Your comment has been flagged as spam. A moderator will review your comment shortly."}else{return"Your comment could not be submitted at this time. Please try again later."}}}},init:function(){this.textarea=$("textarea",this.form);this.defaultVal=$(this.textarea).val();if($("#comment-form span.message").text()!==""&&$("#comment-form span.message").text()!==" "){this.isActive=true;this.isRedirect();return }if(this.isActive){return }$(this.textarea).focus(function(){if($(this).val()==NWK.widget.CommentsSubmit.defaultVal){$(this).val("")}});var A={beforeSubmit:function(C,B){if(!NWK.widget.CommentsSubmit.validatePost()){return false}NWK.widget.CommentsSubmit.isActive=true;$("#overlay2, .closeModal").unbind("click");$("<span class='loading2'></span>").insertAfter($("span.message",NWK.widget.CommentsSubmit.form));$(NWK.widget.CommentsSubmit.msg).text("Submitting");$(NWK.widget.CommentsSubmit.form).find("input.submit").attr("disabled","disabled");$(NWK.widget.CommentsSubmit.textarea).attr("disabled","disabled").css("background","#f5edc9")},success:function(B){var C=parseInt($(B).children().children().children().children().children("ErrorCode").text());if(C!==""&&C===0){$(NWK.widget.CommentsSubmit.msg).text(NWK.widget.CommentsSubmit.successMsg());$(".loading2").fadeOut(400).remove();setTimeout(function(){$(NWK.widget.CommentsSubmit.textarea).removeAttr("disabled").css("background","#fff").val("Enter Your Comment");$(NWK.widget.CommentsSubmit.form).find("input.submit").removeAttr("disabled");NWK.widget.CommentsSubmit.form=$("#comment-form");if($("#dialog")){NWK.widget.Overlay.hideOverlay()}$(NWK.widget.CommentsSubmit.msg).html("");NWK.widget.CommentsSubmit.resetForm()},5000)}else{NWK.widget.CommentsSubmit.proxyErr(B,C);return }return false},error:function(B,D,C){NWK.widget.CommentsSubmit.proxyErr()}};if(this.checkAuthentication()){$(this.form).ajaxForm(A)}else{if(typeof document.commentForm!="undefined"){$("#comment-form input[name='ReturnUrl']").val(location.href)}$(this.form).submit(function(){if(!NWK.widget.CommentsSubmit.validatePost()){return false}})}},checkAuthentication:function(){if((typeof isAuthenticated!="undefined"&&isAuthenticated)||$(this.form).attr("id")=="report-abuse-form"){return true}return false},validatePost:function(){NWK.widget.CommentsSubmit.msg=$("span.message",NWK.widget.CommentsSubmit.form);if($(this.textarea).val().length>3000){$(NWK.widget.CommentsSubmit.msg).css("color","#bf1b02").text("Please enter up to 3000 characters.").slideDown(250);return false}else{if($.trim($(this.textarea).val())===this.defaultVal||$("textarea",NWK.widget.CommentsSubmit.form).val()===""){$(NWK.widget.CommentsSubmit.msg).css("color","#bf1b02").text("Please enter a comment.").slideDown(250);return false}}return true},proxyErr:function(B,A){$(NWK.widget.CommentsSubmit.msg).css("color","#bf1b02").text(NWK.widget.CommentsSubmit.errorMsg(A)).fadeIn(function(){$(".loading2").fadeOut(400).remove()});setTimeout(function(){$(NWK.widget.CommentsSubmit.textarea).removeAttr("disabled").css("background","#fff");if(document.getElementById("dialog")){NWK.widget.Overlay.hideOverlay()}$(NWK.widget.CommentsSubmit.msg).text("");NWK.widget.CommentsSubmit.resetForm()},5000)},resetForm:function(){$(this.form).focus(function(){if($(this).val()==NWK.widget.CommentsSubmit.defaultVal){$(this).val("")}});$(this.form).find("input.submit").attr("disabled",false);NWK.widget.CommentsSubmit.isActive=false},isRedirect:function(){setTimeout(function(){$("span.message",NWK.widget.CommentsSubmit.form).text("");$(NWK.widget.CommentsSubmit.textarea).removeAttr("disabled").css("background","#fff");NWK.widget.CommentsSubmit.isActive=false;NWK.widget.CommentsSubmit.init()},5000)}};NWK.register("Comments Submit",NWK.widget.CommentsSubmit);NWK.widget.CommentsToolbar={init:function(){if(readCookie("ShowCommentToolbar")!=null){var A=$("#nw-comments li.threaded, #nw-comments li.top-level");if(A.length){A.each(function(){var B=$(this).attr("postId");var D=self.document.createElement("div");D.className="toolbar";var C='<div class="featured"><input type="checkbox" id="toolbar_'+B+'_chkFeatured"/><label for="toolbar_'+B+'_chkFeatured">Featured</label><span class="separator">|</span><span class="positionLabel">In Position:</span><select id="toolbar_{PostId}_selPosition" disabled="disabled"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="buttons"><input type="button" value="Save"/></div>';$(D).html(C);this.insertBefore(D,this.firstChild);$(D).find("div.featured input").click(function(){var E=$(this).parent();if(this.checked){E.find("select").removeAttr("disabled")}else{E.find("select").attr("disabled","disabled")}});$(D).find("div.buttons input").click(function(){var I=$(this).parent().parent().parent();if(I.length){var F=I.attr("postId");if(F&&!isNaN(parseInt(F,10))){$(this).val("Saving...");$(this).attr("disabled","disabled");var E=I.find("div.featured input").get(0);var H=I.find("div.featured select").get(0);var G=this;$.ajax({type:"GET",url:Paths.Current.RootPath+"savefeaturedcomment.aspx?pageId="+masterPageId+"&postId="+F+"&isFeatured="+E.checked+"&position="+H.options[H.selectedIndex].value,dataType:"xml",error:function(){alert("There was an error while trying to save.");$(G).val("Save");$(G).removeAttr("disabled")},success:function(K){if($("GenericResult Succeeded",K).length==1&&$("GenericResult Succeeded",K).text().toLowerCase()=="true"){if(E.checked){I.children("div.post-content").addClass("featured")}else{I.children("div.post-content").removeClass("featured")}}else{var J=$("GenericResult Message",K).text();if(J&&J.length>0){alert("There was an error while trying to save - "+J)}else{alert("There was an error while trying to save.")}}$(G).val("Save");$(G).removeAttr("disabled")}})}}})});this.LoadStartingState()}}},LoadStartingState:function(){$.ajax({type:"GET",url:Paths.Current.RootPath+"getfeaturedcomments.aspx?pageId="+masterPageId,dataType:"xml",success:function(E){if($("FeaturedCommentsResult Succeeded",E).length==1&&$("FeaturedCommentsResult Succeeded",E).text().toLowerCase()=="true"&&$("FeaturedCommentsResult FeaturedComments",E).length==1){var B=$("FeaturedCommentsResult FeaturedComments FeaturedComment",E);if(B.length>0){for(var G=0;G<B.length;G++){var I=B.get(G);var D=parseInt($("PostId",I).text());var A=parseInt($("DisplayOrder",I).text());var J=$("#nw-comments li[postId="+D+"]");if(J.length){var H=J.children("div.toolbar");if(H.length){$(H).find("div.featured input").get(0).checked=true;var F=$(H).find("div.featured select").get(0);$(F).removeAttr("disabled");for(var C=0;C<F.options.length;C++){if(F.options[C].value==A){F.selectedIndex=C;break}}}J.children("div.post-content").addClass("featured")}}}}}})}};function readCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null}NWK.widget.DialogBox={isActive:false,dBoxTimer:0,isTimerSet:false,currentBox:null,eventType:null,init:function(B,A){if(this.isActive||!B.evt){return }NWK.widget.DialogBox.isActive=true;this.eventType=B.evt.type.toLowerCase();var C={dBoxHtml:$("<div id='dialog'></div>"),target:(B.evt.target),targetPos:function(){try{if(this.target){if(this.target.nodeName.toLowerCase()==="a"||this.target.nodeName.toLowerCase()==="img"||this.target.nodeName.toLowerCase()==="form"||this.target.className==="submit"){return GetObjPos(this.target)}else{if(B.mPos){return B.mPos}}}}catch(D){}},url:function(){var D;if(this.target.nodeName.toLowerCase()==="a"&&B.isAjax){D=$(this.target).attr("href")}if(B.link&&B.link!=""){D=B.link}return D},isAjax:(B.isAjax)?B.isAjax:false,output:(typeof B.output=="string")?B.output:null,bIsModal:(!B.bIsModal)?false:true,bIsScroll:(B.bIsScrollable)?B.bIsScrollable:false,adjCoords:(typeof B.adjCoords==="object")?B.adjCoords:0,width:(B.width)?B.width:0,height:(B.height)?B.height:0,align:function(){var F=this.targetPos();var D=$(document).width();var E=(F[0]>D/2)?"right":"default";return E},html:(B.html)?B.html:null,wrapper:(B.wrapper)?B.wrapper:"",adCall:(B.adCall)?B.adCall:null,errorMsg:(B.errorMsg)?B.errorMsg:"We are currently unable to process your request",callback:(A!=""&&typeof A==="function")?A:null};this.currentBox=C;NWK.widget.DialogBox.getBoxContent(C)},getBoxContent:function(A){if(A.isAjax){this.getAjaxRequest(A)}else{this.showDBox(A)}},getAjaxRequest:function(B){var A=B.url()+"/output/"+B.output+"/align/"+B.align();$.ajax({dataType:"html",url:detectProxy(A),success:function(C){B.html=C;NWK.widget.DialogBox.showDBox(B)},error:function(C,E,D){$(B.dBoxHtml).html(B.errorMsg);return }})},setCoord:function(E){if(E.bIsScroll){var A=getScrollTop();window.onscroll=function(H){var F=getScrollTop();var G=setTimeout(function(){$("#dialog").css({top:(F+120)+"px"})},250)}}else{window.onscroll=null;var D=E.targetPos();var B=$(document).width();var C=$(E.target).width();if(D[0]>B/2){$(E.dBoxHtml).attr("style","left:"+(D[0]-(E.width+E.adjCoords[0]))+"px;top:"+(D[1]+(E.adjCoords[1]))+"px;")}else{$(E.dBoxHtml).attr("style","left:"+(D[0]+C+E.adjCoords[0])+"px;top:"+(D[1]+(E.adjCoords[1]))+"px")}}},showDBox:function(B){if(B.target){if(B.output=="quickread"&&!$(B.target).hasClass("dBoxActive")){$(B.target).addClass("dBoxActive")}}if(B.bIsModal){$(B.dBoxHtml).append(B.html);this.setCoord(B);NWK.widget.Overlay.init(B);if(B.callback){B.callback()}return }NWK.widget.Overlay.checkEmbedded();this.setCoord(B);$(B.dBoxHtml).insertBefore("#skeleton");this.showAd(B);if(B.wrapper!==""){$("#dialog").append(B.wrapper)}if($("#innerContent")){$("#innerContent").append(B.html);if(B.output=="quickread"){var A;if(B.align()=="right"){A='<div class="arrowRightDS"><img class="transp" width="15" height="32" src="'+staticContentRoot+'/site/images/dialog/preview_arrow_right.png"/></div>'}else{A='<div class="arrowLeftDS"><img class="transp" width="15" height="32" src="'+staticContentRoot+'/site/images/dialog/preview_arrow_left.png"/></div>'}$(A).insertBefore("#quick-read div.closeBtn")}}if(B.wrapper===""&&document.getElementById("innerContent")===null){$(B.dBoxHtml).append(B.html)}$(B.dBoxHtml).css("display","block");NWK.widget.DialogBox.closeHandlers(B);$(window).resize(function(){NWK.widget.DialogBox.setCoord(B)});if(B.callback){B.callback()}},closeHandlers:function(A){$(document).mousemove(function(B){if(NWK.widget.DialogBox.eventType=="mouseover"){if(B.target!=A.target){NWK.widget.DialogBox.hideDBox_OnMouseout(A);var C=NWK.widget.DialogBox.getDBoxInfo(B,A)}return }else{}return false});$(document).click(function(B){if(NWK.widget.DialogBox.eventType=="click"&&B.target!=A.target&&B.target.nodeName.toLowerCase()!="a"){var C=NWK.widget.DialogBox.getDBoxInfo(B,A);NWK.widget.DialogBox.hideDBox_OnClick(B,A,C);C=null;$(this).unbind("click");return false}return });$(".close-dialog").click(function(B){window.clearTimeout(NWK.widget.DialogBox.dBoxTimer);NWK.widget.DialogBox.dBoxTimer=0;if(A.target){$(A.target).removeClass("dBoxActive")}$(A.dBoxHtml).fadeOut(100,function(){NWK.widget.DialogBox.isActive=false;NWK.widget.DialogBox.isTimerSet=false;NWK.widget.Overlay.checkEmbedded();$("#dialog").remove();$(window).unbind("resize")})})},getDBoxInfo:function(B,D){var A=document.getElementById("dialog");var C={mPos:GetEventXY(B),dBoxHt:parseFloat($(A).height()),dBoxWt:parseFloat($(A).width()),dBoxPos:GetObjPos(A)};return C},hideDBox_OnClick:function(B,D,C){function A(){window.clearTimeout(NWK.widget.DialogBox.dBoxTimer);NWK.widget.DialogBox.dBoxTimer=0;if(D.target){$(D.target).removeClass("dBoxActive")}$(D.dBoxHtml).fadeOut(100,function(){NWK.widget.DialogBox.isActive=false;NWK.widget.DialogBox.isTimerSet=false;NWK.widget.Overlay.checkEmbedded();$("#dialog").remove();$(window).unbind("resize")})}if(B.target.className=="closeBtn transp"){A()}else{if(B.target.nodeName.toLowerCase()==="a"){A()}else{if((C.mPos[1]>(C.dBoxPos[1]+C.dBoxHt)||C.mPos[1]<C.dBoxPos[1])||((C.mPos[0]>(C.dBoxPos[0]+C.dBoxWt)||C.mPos[0]<C.dBoxPos[0]))&&$(D.dBoxHtml)){A()}else{NWK.widget.DialogBox.closeHandlers(D)}}}},hideDBox_OnMouseout:function(A){$("#dialog").remove();$(A.target).removeClass("dBoxActive");NWK.widget.Overlay.checkEmbedded();$(window).unbind("resize");$(document).unbind("mousemove");NWK.widget.DialogBox.isActive=false;NWK.widget.DialogBox.isTimerSet=false},showAd:function(A){if(typeof (A.adCall)==="function"){A.adCall()}}};NWK.widget.DiggTopFive={html:"",init:function(A){if(!document.getElementById("digg-widget-container")){return }this.id=(A&&typeof A.id=="string")?""+A.id+"":"digg-widget-container";this.width=(A&&typeof A.width=="string")?A.width:"300px";this.height=(A&&typeof A.height=="string")?A.height:"350px";this.border=(A&&typeof A.border=="number")?A.border:1;this.target=(A&&typeof A.target=="number")?"_blank":"";this.count=(A&&typeof A.count=="number")?"no-digg-count":"";this.desc=(A&&typeof A.desc=="number")?"":"no-digg-description";this.theme=(A&&typeof A.theme=="string")?A.theme!="digg-widget-unstyled"?"digg-widget "+A.theme:A.theme:"digg-widget digg-widget-theme1";this.title=(A&&typeof A.title=="string")?A.title:"All popular stories in All Topics";this.customHeader=(A&&typeof A.customHeader=="string")?"background: "+A.customHeader+";":"";this.customBorder=(A&&typeof A.customBorder=="string")?"border-color: "+A.customBorder+";":"";this.customLink=(A&&typeof A.customLink=="string")?A.customLink:"";this.customHoverLink=(A&&typeof A.customHoverLink=="string")?A.customHoverLink:"";this.customFooter=(A&&typeof A.customFooter=="string")?' style="color: '+A.customfooter+'"':"";this.submitDate=function(){var B=new Date();B.setHours(B.getHours()-72);return parseInt(B.getTime()/1000,10)}();this.createHtml()},populate:function(B){$("#"+this.id+" ul").html("");if(!B){$("#"+this.id+" ul").html("We were unable to retrieve matching stories from Digg. Please refresh the page to try again.")}if(!B.stories||B.stories.length==0){$("#"+this.id+" ul").html("Currently, there are no recent stories of this type on Digg.")}if(B.stories){for(var A=0;A<B.stories.length;A++){if(B.stories[A].diggs>10000){B.stories[A].diggs=Math.floor(B.stories[A].diggs/1000)+"K+"}$("#"+this.id+" ul").append(this.tpl(B.stories[A]))}}if(this.customHoverLink!=""){$("#"+this.id+" ul a").hover(function(){$j(this).css("color",this.customHoverLink)},function(){$j(this).css("color",digg_custom_link)})}},createHtml:function(){var B=document.getElementById("digg-widget-container");this.html+='<link rel="stylesheet" type="text/css" media="all" href="http://digg.com/css/widget.css" />';var A=document.createElement("script");A.setAttribute("id","digg-script");A.setAttribute("type","text/javascript");A.setAttribute("src","http://digg.com/tools/services?type=javascript&callback=NwDigg&endPoint=//stories&min_submit_date="+this.submitDate+"&count=5&domain=newsweek.com&sort=digg_count-desc");$(B).append(this.html);B.appendChild(A)},tpl:function(A){var B=this;if($.browser.msie){return'<li><a class="digg-count" href="'+A.href+'?OTC-widget">'+A.diggs+' <span>diggs</span></a><div class="digg-wrap"><div><div><a target="_blank" style="color:'+B.customLink+'" href="'+A.href+'?OTC-widget">'+A.title+"</a></div></div></div><p>"+A.description+"</p></li>"}return'<li><a class="digg-count" href="'+A.href+'?OTC-widget">'+A.diggs+' <span>diggs</span></a><h3><a target="_blank" style="color:'+B.customLink+'" href="'+A.href+'?OTC-widget">'+A.title+"</a></h3><p>"+A.description+"</p></li>"}};function NwDigg(A){NWK.widget.DiggTopFive.populate(A)}NWK.register("Digg Top-Five",NWK.widget.DiggTopFive);NWK.widget.DiggIt={init:function(){this.getDiggCount()},getDiggCount:function(){var B=this;var A=Paths.Current.RootPath+"diggcount.aspx?pageId="+masterPageId;if(typeof diggCountUrl!="undefined"&&diggCountUrl!=null&&diggCountUrl.length>0){A=Paths.Current.RootPath+"diggcount.aspx?url="+encodeURIComponent(diggCountUrl)}$.ajax({type:"GET",dataType:"text",url:A,success:B.render})},render:function(A){if(A!="0"){$("span.digg-count").html("("+A+")");$("span.digg-count").show()}}};NWK.register("Digg Count",NWK.widget.DiggIt);NWK.widget.EmailArticle={source:"",init:function(){$(".email-article").click(function(A){NWK.widget.EmailArticle.source=this;placeAd2("emailthis","88x31|4","AJAX","");NWK.widget.EmailArticle.showForm(A);return false})},showForm:function(B){var A=parseFloat(getRealTop(this.source))-101;var C=parseFloat(getRealLeft(this.source))+53;NWK.widget.DialogBox.init({evt:B,html:$("div.EmailArticleBlock").html(),bIsModal:true,adjCoords:[24,-101]});NWK.widget.EmailArticle.submitForm()},submitForm:function(){var A={beforeSubmit:function(B){EmailArticle_RequiredExist();if(EmailArticle_RequiredExist()){$(".emailArticleForm :input").slice(0,3).attr("disabled","true");$("#EmailPersonalMessage").attr("disabled","disabled");$("#EmailMain").height(175+"px");$("#EmailMain p").slice(0,1).text("Sending email now...")}else{return false}},success:function(B){$("#EmailMain p").slice(0,1).addClass("success").text(B);$("#EmailMain div.loading2").remove();setTimeout(function(){NWK.widget.Overlay.hideOverlay()},5000)},error:function(B,D,C){$("#EmailMain p").slice(0,1).addClass("error").text(D);$("#EmailMain div.loading2").remove()}};$("#frmEmailThisArticle").ajaxForm(A)}};function IsValidEmailAddress(A){return RegexValidate(A,"^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$")}function IsValidNumberOfEmailAddresses(A){var B=A.split(",");if(B.length>10){return false}return true}function IsValidEmailAddresses(C){var D=C.split(",");for(var B=0;B<D.length;B++){var A=StringTrim(D[B]);if(A.length>0){if(!IsValidEmailAddress(A)){return false;break}}}return true}function EmailArticle_ShowError(A,B){$("#EmailErrorMessage").show().html(A);B.focus()}function EmailArticle_RequiredExist(){var B=document.getElementById("EmailYourEmailAddress");var A=document.getElementById("EmailRecEmailAddress");var C=document.getElementById("EmailMessage");if(B.value.length===0){EmailArticle_ShowError("Please enter Your Email Address before sending.",B);return false}else{if(!IsValidEmailAddress(B.value)){EmailArticle_ShowError("Your Email Address is not valid.  Please enter something different.",B);return false}}if(A.value.length===0){EmailArticle_ShowError("Please enter the Recipient's Email Address before sending.",A);return false}else{if(!IsValidEmailAddresses(A.value)){EmailArticle_ShowError("At least one of the Recipient's Email Addresses is not valid.  Please enter something different.",A);return false}else{if(!IsValidNumberOfEmailAddresses(A.value)){EmailArticle_ShowError("You are attempting to send an email to over 10 recipients.  Please limit your message to 10 or less recipients",A);return false}}}$("#EmailErrorMessage").hide();return true}NWK.register("Email Article",NWK.widget.EmailArticle);NWK.widget.ExternalLink={init:function(C,B){var A=this;A.rewriteURL(C,B)},rewriteURL:function(D,B){var A="newsweek.com|";for(var C=0;C<B.length;C++){A+=B[C];if(C!=B.length-1){A+="|"}}var E=new RegExp(A);$("a.external-link,#newsweek-partners a,#latest-headlines a").live("click",function(){var F=$(this).attr("href");if(F.search(E)==-1&&F.search("frameset.aspx")==-1){$(this).attr({href:D+"/frameset.aspx/?url="+encodeURIComponent(F),target:"_blank"})}})}};NWK.widget.FontSizeSlider={width:40,caretWidth:9,init:function(){var A={dragging:false,width:40,percent:0,origFontSize:1,lineHeightRate:0.416667,container:document.getElementById("FontSizeSlider"),caret:$("#FontSizeSlider div").slice(0,1),caretWidth:9};$(A.caret).mousedown(function(){if(A.dragging){return }A.dragging=true});$(document).mousemove(function(B){NWK.widget.FontSizeSlider.onSliderMouseMove(B,A)});$(document).mouseup(function(B){NWK.widget.FontSizeSlider.onSliderMouseUp(B,A)})},slideToStart:function(A){this.slideTo(0,A)},slideToEnd:function(A){var B=(A.width-A.caretWidth);this.slideTo(B,A)},slideTo:function(B,A){$(A.caret).css("left",B+"px");A.percent=(B/A.width)},onSliderMouseUp:function(B,A){if(A.dragging){A.dragging=false;this.onAfterResize(A)}},onSliderMouseMove:function(F,E){if(!E.dragging){return }var A=GetEventXY(F);var D=A[0];var B=A[1];var C=GetPos(E.container);SliderX=getRealLeft(E.container);if(D<(SliderX+(E.caretWidth/2))){this.slideToStart(E)}else{if(D>(SliderX+E.width-E.caretWidth)){this.slideToEnd(E)}else{var G=(D-SliderX-(E.caretWidth/2));this.slideTo(G,E)}}},onAfterResize:function(B){var A=B.origFontSize;if(B.percent>0){A=B.origFontSize+(B.origFontSize*B.percent)}$("#metathorax .article").css("font-size",A+"em");B.dragging=false}};NWK.register("font-size slider",NWK.widget.FontSizeSlider);NWK.widget.GlobalSearch={init:function(A){$(A+" input.text").focus(function(){if(this.value==this.defaultValue){this.value=""}});$(A+" input.text").blur(function(){if(this.value==""){this.value=(this.defaultValue?this.defaultValue:"")}});this.submitSearch(A)},submitSearch:function(B){var A=$(B+" input.text");$(B+" .search-submit").click(function(){if(A.val()==A.get(0).defaultValue){A.val("")}$(B+" .search-form").submit();return false})}};NWK.widget.LaunchPad={timer:null,isActive:false,tempContent:null,iframesCount:0,init:function(D,C,B,A){if(this.isActive){return }NWK.widget.DialogBox.isActive=true;this.isActive=true;NWK.widget.Overlay.checkEmbedded();this.tempContent=$("#launch-pad .torso .content").html();setTimeout(function(){if(B==="topTenVertical"){B=document.getElementById("topTenVertical")}var G=GetObjPos(B);var F=G[0];var E=$(document).width();if(B.id==="topTenVertical"){if((F>(E/2))){F=F-58}G[1]+=80}if((F>(E/2))&&B.id!=="topTenVertical"){F=(F-400)+$("img",B).width()}$Launchpad.ShowMenu({actionElement:"launchpad_"+D,wid:C,customCSS:Paths.Current.StaticContentRoot+"site/css/launchpad.css",targetElement:document.getElementById("lpContent")});$("#launch-pad").css({position:"absolute",display:"block","z-index":9999,left:F-14,top:G[1]-22});NWK.widget.LaunchPad.setCloseButton()},150)},setCloseButton:function(){$(".close").one("click",function(A){NWK.widget.DialogBox.isActive=false;NWK.widget.LaunchPad.isActive=false;NWK.widget.Overlay.checkEmbedded();$("#launch-pad .torso .content").empty();$("#launch-pad").hide();$("#launch-pad .torso .content").html(NWK.widget.LaunchPad.tempContent);return false})}};NWK.widget.Login={init:function(){var C=$("#universal-login .register").css("background-image");var B=$("#universal-login .register").css("background-position");var D=$("#universal-login .register").css("background-position-y");var A=$("#universal-login .register").css("background-repeat");$(".login-button").click(function(E){if($("#login-form-wrapper").css("display")=="none"){$("#login-form-wrapper").css("display","block");$("#universal-login .login").addClass("login-active");$("#universal-login .register").css("background","none");if($("#carousel")){$("#carousel ul.packages li").css("position","static");$("#carousel ul.packages li").css("position","relative")}if($("#subheadwrapper")){$("#login-form-wrapper").css("border-bottom","none")}}$("#loginForm input[name='ReturnUrl']").val(location.href);NWK.util.FormValidation.init($("#loginForm").get(0));return false});$("#login-form-wrapper span.cancel").click(function(E){if($("#login-form-wrapper").css("display")!="none"){$("#login-form-wrapper").css("display","none");$("#universal-login .login").removeClass("login-active");if($("#carousel")){$("#carousel ul.packages li").css("position","static");$("#carousel ul.packages li").css("position","relative")}$("#universal-login .register").css("background-image",C);$("#universal-login .register").css("background-position",B);$("#universal-login .register").css("background-position-y",D);$("#universal-login .register").css("background-repeat",A)}})}};NWK.register("Universal Login",NWK.widget.Login);NWK.widget.MMToolBar={isInitSocial:false,isOpenSocial:false,init:function(){$(".socialNetworks").click(function(A){NWK.widget.MMToolBar.isInitSocial=true;NWK.widget.MMToolBar.openSocialBox(this);return false})},openSocialBox:function(A){if(this.isOpenSocial){this.closeSocialBox();return }this.isInitSocial=true;var C=getRealLeft(A);var B=getRealTop(A);$("#social-networks-menu").css("left",C-130+"px").slideDown(250,function(){NWK.widget.MMToolBar.isOpenSocial=true});$(document).one("click",function(D){if(D.target.getAttribute("class")!="SocialNetworks"){NWK.widget.MMToolBar.closeSocialBox();return }return false})},closeSocialBox:function(){if(!this.isInitSocial&&!this.isOpenSocial){return }$("#social-networks-menu").fadeOut(250,function(){NWK.widget.MMToolBar.isOpenSocial=false;NWK.widget.MMToolBar.isInitSocial=false})}};NWK.widget.NewsSlashWeek={dayCollection:null,init:function(){var A=this;this.dayHolder=$("#newsSlashWeek");this.dayCollection=$("#newsSlashWeek div.dayCollection");this.bindClicks()},bindClicks:function(){var A=this;$(A.dayCollection).find("ul.days li.day a.tab").click(function(E){var C=this;var B=$(this).parent();$(A.dayCollection).find("ul.days li.day.selected").removeClass("selected");$(A.dayCollection).find("div.content").addClass("loading");$(B).addClass("selected");var D=$(C).attr("href")+"/isajax/true";$.ajax({url:detectProxy(D),dataType:"html",async:true,success:function(F){$(A.dayCollection).find("div.content").html(F);BindNewsSlashWeekContentTracking()},error:function(){$(A.dayCollection).find("div.content").html("<div class='error'>We are currently unable to return the requested content. Please try again later.</div>")}});$(A.dayCollection).find("div.content").removeClass("loading");return false});$(A.dayCollection).find("div.flippers a").click(function(F){var C=this;if(!$(C).hasClass("disabled")){$(A.dayCollection).find("div.content").addClass("loading");var E=$(A.dayCollection).find("ul.days li.day.selected a.tab");var B=$(A.dayCollection).find("ul.days li.day a.tab").index(E);var D=$(C).attr("href");$.ajax({url:detectProxy(D),dataType:"html",async:true,success:function(G){$(A.dayHolder).replaceWith(G);A.dayHolder=$("#newsSlashWeek");A.dayCollection=$("#newsSlashWeek div.dayCollection");A.bindClicks();BindNewsSlashWeekTabsTracking();if(B!=-1){$($(A.dayCollection).find("ul.days li.day a.tab")[B]).click()}},error:function(){$(A.dayCollection).find("div.content").html("<div class='error'>We are currently unable to return the requested content. Please try again later.</div>")}});$(A.dayCollection).find("div.content").removeClass("loading")}return false})}};(function(){NewWindow=function(){this.init=function(A){this.resize(A)};this.resize=function(A){$(A).click(function(B){B.preventDefault();window.open($(this).attr("href"),"_blank","height=640,width=1020")})}};NWK.widget.NewWindow=new NewWindow()})();NWK.register("NewWindow",NWK.widget.NewWindow);NWK.widget.Overlay={isActive:false,tags:["div.ad","select","iframe"],init:function(E){if(this.isActive){return false}var D=document.createElement("div");D.id="modal";$(D).insertBefore("#skeleton");var C=document.createElement("div");C.id="overlay";var B=$(document).height();$(C).css({height:B+"px",display:"block",position:"absolute",top:0,left:0,width:"100%","z-index":1201,background:"#000",opacity:0});$(C).appendTo("#modal");$(E.dBoxHtml).appendTo("#modal");if(E.bIsCentered){$(E.box).center();$(window).resize(function(){$(E.box).center()});if(E.bIsScrollable){var A=getScrollTop();window.onscroll=function(H){var F=getScrollTop();var G=setTimeout(function(){$(E.box).css({top:(F+120)+"px"})},250)}}}else{$(window).resize(function(){NWK.widget.DialogBox.setCoord(E)})}this.checkEmbedded();this.showOverlay(C,D,E)},checkEmbedded:function(){$("select, div.ad").each(function(A){if($(this).css("visibility")==="hidden"||$(this).hasClass("hideTag")){$(this).removeClass("hideTag")}else{$(this).addClass("hideTag")}})},showOverlay:function(A,B,C){$(A).animate({opacity:0.4},250,function(){$(this).click(function(D){if(D.target==this){NWK.widget.Overlay.hideOverlay()}});if($("#dialog")){$(C.box).find(".closeModal, .close-dialog").click(function(D){NWK.widget.Overlay.hideOverlay(A,B)})}})},hideOverlay:function(A,B){$("#dialog").remove();$("#overlay").animate({opacity:0},250,function(){$("#modal").empty().remove();NWK.widget.Overlay.checkEmbedded();NWK.widget.DialogBox.isActive=false;$(".closeModal").unbind("click");$(window).unbind("resize")})}};NWK.widget.QuickRead=function(E,C,G){var A;var J;var B=null;var D=null;var F=function(){var K={boxTop:'<div class="top transp">&#xA0;</div>',boxContent:'<div id="boxContent" class="transp"><div id="innerContent"></div></div>',boxBot:'<div class="bot transp">&#xA0;</div>',boxWrapper:function(){return['<div id="boxDs" class="boxDs">'+this.boxTop+this.boxContent+this.boxBot+"</div>"].join("")}};return K.boxWrapper()};var H=function(K){$("a.quickRead").removeAttr("onclick");I(K)};var I=function(K){$("a.quickRead").click(function(L){window.clearTimeout(A);if(!document.getElementById("dialog")){NWK.widget.DialogBox.init({evt:L,link:K,wrapper:F(),output:"quickread",adjCoords:[15,-160],width:486,isAjax:true,adCall:quickReadAdCall})}else{NWK.widget.DialogBox.eventType="click"}return false});$("a.quickRead").mouseover(function(L){A=window.setTimeout(function(){if(!document.getElementById("dialog")){NWK.widget.DialogBox.init({evt:L,link:K,wrapper:F(),output:"quickread",adjCoords:[15,-160],width:486,isAjax:true,adCall:quickReadAdCall})}A=0;A=null},500);return false})};H()};NWK.register("Quick Read",NWK.widget.QuickRead);NWK.widget.RelatedCloud={boxHt:null,isActive:false,init:function(){if($("div.RelatedCloud").length<0){return }$("div.related-cloud").each(function(A){var B=this;B={isActive:false,isOpen:false,source:$("div.content div.column div.nav a",this),content:$("div.content",this),contentHt:$("div.content",this).css("height"),maxColumnHt:null};NWK.widget.RelatedCloud.boxHt=parseInt($("div.content",this).height());$(B.source).click(function(C){if(NWK.widget.RelatedCloud.isActive){return }NWK.widget.RelatedCloud.isActive=true;if(this.className=="seeAll"){NWK.widget.RelatedCloud.expand(B)}else{if(this.className=="collapseAll"){NWK.widget.RelatedCloud.collapse(B)}}})})},expand:function(B){$(B.source).removeClass("seeAll").addClass("collapseAll").text("Collapse All");$("div.column ul",B.content).removeClass("collapsed");var A=0;if(B.maxColumnHt===null){$("div.column ul",B.content).each(function(C){if($(this).height()>A){A=$(this).height()}});B.maxColumnHt=A}else{A=B.maxColumnHt}$("div.column ul",B.content).height(A);$(B.content).animate({height:(A+26)+"px"},250,function(){NWK.widget.RelatedCloud.isActive=false})},collapse:function(A){$(A.content).animate({height:NWK.widget.RelatedCloud.boxHt+3+"px"},250,function(){$(A.source).removeClass("collapseAll").addClass("seeAll").text("See All");$("div.column ul",A.content).css("height","60px");$("div.column ul",A.content).addClass("collapsed");NWK.widget.RelatedCloud.isActive=false})}};NWK.register("related cloud",NWK.widget.RelatedCloud);function Slider(B,A){this.slider=B;this.handle=this.getSliderHandle();this.line=this.getLine();this.units=this.getUnits();this.bindEvents();this.form=A;this.onAdjust=null}Slider.prototype={isDragging:false,currHandle:null,getSliderHandle:function(){return $(this.slider).siblings(".handle-wrapper").children(".handle")},getLine:function(){return $(this.slider).find("ul.line:eq(0)").get(0)},getUnits:function(){return $(this.slider).find("ul.units:eq(0)")},bindEvents:function(){var A=this;$(this.handle).mousedown(function(B){A.currHandle=this;A.isDragging=true;$(document).mousemove(function(C){if(A.isDragging){A.adjustSlider(C)}return false})});$(document).mouseup(function(B){A.isDragging=false;$(this).unbind("mousemove")});$(this.line).click(function(B){if(!A.isDragging){A.currHandle=this;A.adjustSlider(B)}return false})},adjustSlider:function(E){var D=this;var C=GetObjPos(this.line);var B=GetEventXY(E);var A=((B[0]-C[0]))/$(this.line).width();A=Math.round((A*1000)/10);if(Math.round(A)<0||Math.round(A)>100){return }$("li:eq(0)",this.line).css({width:Math.round(100-A)+"%"});$("li:eq(1)",this.line).css({width:Math.round(A)+"%"});if($.browser.msie&&Math.round(A)==50){$("li:eq(0)",this.line).css({width:((100-A)-0.2)+"%"});$("li:eq(1)",this.line).css({width:(A-0.2)+"%"})}$(this.handle).css("left",(A)-(Math.floor($(this.handle).width()/4))+"%");this.updateForm(Math.round(A));this.notify($(this.slider))},updateForm:function(B){var A=$(this.form).find("input[name = 'sliderValue']");$(A).attr("value",B)},observers:[],addObserver:function(A){this.observers.push(A)},removeObserver:function(A){this.observers.pop(A)},notify:function(B){for(var A=0;A<this.observers.length;A++){this.observers[A].update(B)}}};NWK.widget.Sphere={bIsActive:false,init:function(){$("#sphere").click(function(){if(document.getElementById("sphere_widget")&&NWK.widget.Sphere.bIsActive){return false}Sphere.Widget.search();NWK.widget.Sphere.bIsActive=true;NWK.widget.Overlay.checkEmbedded();NWK.widget.Sphere.closeSphere();return false})},closeSphere:function(){var A=$("a.ctrl").attr("href");$("a.ctrl").attr("href","#");NWK.widget.DialogBox.isActive=true;$(".closeBtn").click(function(){NWK.widget.Overlay.checkEmbedded();$("a.ctrl").attr("href",A);$(this).unbind("click");NWK.widget.DialogBox.isActive=false;NWK.widget.Sphere.bIsActive=false})}};NWK.register("Sphere",NWK.widget.Sphere);NWK.widget.Ticker={interval:5000,animate:"scroll",index:0,items:[],dataSrc:null,currItem:0,nextBut:null,prevBut:null,intvObj:null,init:function(B,A,C){if(!B){return }if(A===null||A==="undefined"||$(A).html()=="undefined"){return }this.target=B;this.dataSrc=A;this.interval=C.interval;this.animate=C.animate;this.prevBut=$(".prev",B);this.nextBut=$(".next",B);this.getData(A);this.start();this.previous();this.next();this.expand(B,A)},getData:function(B){var A=this;if(typeof B==="object"){$(B).children().each(function(){var C=$(this).children().get();A.items.push($(this).children().get(0))})}else{}},getTickerItem:function(A){var B=(!A)?this.index:A;return this.items[B]},start:function(){var A=this;this.intvObj=new Interval(parseInt(this.interval));this.addTickerItem(this.getTickerItem(this.index));this.intvObj.listen("run",function(B){if(A.index==A.items.length-1){A.index=0}else{A.index++}A.addTickerItem(A.getTickerItem(A.index))});this.intvObj.start()},stop:function(){this.intvObj.stop()},addTickerItem:function(A){if(A){$(this.target).find(".text").html($(A).clone());if(this.currItem==this.items.length-1){this.index=0;return }}},previous:function(){var A=this;$(this.prevBut).click(function(){if(A.index==0){A.index=A.items.length-1}else{A.index--}A.intvObj.restart();A.addTickerItem(A.getTickerItem(A.index))})},next:function(){var A=this;$(this.nextBut).click(function(){if(A.index==A.items.length-1){A.index=0}else{A.index++}A.intvObj.restart();A.addTickerItem(A.getTickerItem(A.index))})},expand:function(C,B){var A=this;$("li.text",C).hover(function(){A.stop();A.cutoff(this,false)},function(){A.cutoff(this,true);A.start()})},cutoff:function(B,A){if($("a span.quote span.cutoff",B).length>0){if(A){$("a span.quote span.cutoff",B).css("display","inline");$("a span.quote span.full-text",B).css("display","none");$(B).animate({height:"16px"},"fast")}else{$(B).animate({height:"45px"},"fast",function(){$("a span.quote span.cutoff",B).css("display","none");$("a span.quote span.full-text",B).css("display","inline")})}}}};NWK.register("Ticker",NWK.widget.Ticker);NWK.widget.ToolTips=function(){$("a.tip").click(function(A){NWK.widget.DialogBox.init(A.type,A.target,"",$("#tips-block").html(),"","","",{bIsModal:true,adjCoords:[-210,-217]})})};NWK.register("ToolTips",NWK.widget.ToolTips);NWK.component.BoxCollection={init:function(){$(".boxCollection").each(function(A){var B={node:this,defaultBox:$("div.box",this).slice(0,1),content:$("div.box div.content",this),tabRoot:$("div.tabs",this),tabs:$("div.tabs ul li",this)};NWK.component.BoxCollection.setHandler(B)})},setHandler:function(A){$(A.tabs).each(function(B){$("span a",this).click(function(){if($(A.tabs).length==1){return }NWK.component.BoxCollection.toggleTab(B,A);var D=RegexValidate(this.id,"[0-9]+");var F="box_"+D;var E=document.getElementById(F);if(E){if($(E).css("display")=="block"){return }NWK.component.BoxCollection.getBoxFromCollection(A,E)}else{var C=Paths.Current.RootPath+"id/"+D+"/output/ajaxbox";if($(A.node).hasClass("BoxCollectionAlt")){C+="/alt/1"}var G=NWK.component.BoxCollection.setCurrentBox;NWK.component.BoxCollection.ajaxRequest(C,G,A)}return false})})},toggleTab:function(A,B){$(B.tabs).removeClass("current").removeClass("lcurrent").removeClass("prior").removeClass("midcurrent").removeClass("fcurrent").removeClass("fprior");if(A==0){$(B.tabs[A]).addClass("fcurrent")}if(A!=0&&A!=B.tabs.length-1){$(B.tabs[A]).addClass("midcurrent");if(A==1){$(B.tabs[0]).addClass("fprior");return }$(B.tabs[A-1]).addClass("prior")}if(A==$(B.tabs).length-1){$(B.tabs[A]).addClass("lcurrent");if(B.tabs.length==2){$(B.tabs[A-1]).addClass("fprior");return }$(B.tabs[A-1]).addClass("prior")}},setCurrentBox:function(B,A){$("div.box",B.node).css("display","none");$(B.node).append(A)},getBoxFromCollection:function(B,A){$("div.box",B.node).css("display","none");$(A).css("display","block")},ajaxRequest:function(A,C,B){$.ajax({dataType:"html",url:detectProxy(A),success:function(D){C(B,D)},error:function(D){}})}};NWK.component.BoxCollection.init();NWK.component.DynamicLead={showLightBox:true,showPreview:true,showCaption:true,globalSlidePause:8.5,globalTitleTransition:0.4,onClick:null,isAnimating:false,transitionTimeoutId:null,init:function(){var A=document.getElementById("dynamicLead");if(A==="undefined"||A===null){return }A={imageDeck:$(".imageDeck",A),mainArtLink:$(".imageDeck a.mainArt",A),mainArtImg:$(".imageDeck a.mainArt img",A),overlay:$(".imageDeck #dlOverlay",A),overlayXOffset:$(".imageDeck").width(),caption:$(".imageDeck #dlOverlay .caption",A),rubric:null,title:null,deck:null,source:null,titlePause:250,currentIndex:0,lightBox:$("div.bot div.lightBox a",A),mainNav:$("div.bot ol.mainNav",A),subNav:$("div.bot ol.subNav",A),back:$("div.bot ol.mainNav li a.back",A),pausePlay:$("div.bot ol.mainNav li a.pausePlay",A),next:$("div.bot ol.mainNav li a.next",A),isPaused:false,slides:[]};this.globalSlidePause=this.globalSlidePause*1000;this.globalTitleTransition=this.globalTitleTransition*1000;this.getSlidePreviews(A);this.getMainContent(A);this.getLightBox(A);this.playPauseHandler(A);this.previousHandler(A);this.nextHandler(A);this.start(A);A.onselectstart=function(){return false}},getSlidePreviews:function(A){$("li",A.subNav).each(function(B){if(NWK.component.DynamicLead.showCaption){$("a",this).mouseover(function(H){if(document.getElementById("dlLightBox")){return }var I=GetObjPos(this);var E=GetObjPos(A.dl);var G=(I[0]-E[0])+E[0]-50;var F=I[1]-145;if(B!==A.currentIndex){var D=$(this).siblings(".slideContent").html();var C='<div class="dlPreview transp" style="left:'+G+"px;top:"+F+'px;"><div class="slideContent">'+D+"</div></div>";$(C).appendTo("body")}$(this).mouseout(function(J){$("div.dlPreview").remove();return false});return false})}$("a",this).click(function(C){if(B==A.currentIndex){return }NWK.component.DynamicLead.showSelected(B,A);return false})})},getMainContent:function(A){$("li",A.subNav).each(function(D){var C=this;C={url:$("div.slideContent a.mainArtLink",this).attr("href"),rubric:$("div.slideContent h6.rubric",this).text(),title:$("div.slideContent h1.title a",this).text(),deck:$("div.slideContent p.deck",this).text(),deckShort:$("div.slideContent p.deckShort",this).text(),source:$("div.slideContent p.source",this).text(),imageSrc:$("div.slideContent a.mainArtLink img",this).attr("src"),date:$("div.slideContent p.date",this).text()};var E=/[-]{1}thumb8+/i;var B=C.imageSrc.replace(E,"-dynamiclead");C.imageSrc=B;var F=new Image();F.src=C.imageSrc;A.slides.push(C)})},getLightBox:function(A){if(this.showLightBox){$(A.lightBox).click(function(G){if(document.getElementById("dlLightBox")){return }$(this).addClass("selected");var C="<ul>";for(var D=0;D<=5;D++){if(D%3==2){var F='<li class="last">'}else{var F="<li>"}if(A.slides[D]!=null){F+='<div class="imageDeck"><img id="'+D+'" class="dlLbItem" width="100" src="'+A.slides[D].imageSrc+'" alt="'+A.slides[D].title+'" /></div><h6 id="'+D+'" class="title dlLbItem">'+A.slides[D].title+'</h6><p id="'+D+'" class="dlLbItem">'+A.slides[D].deckShort+'</p><p class="date">'+A.slides[D].date+"</p>"}else{F+="&nbsp;"}F+="</li>";C+=F}C+="</ul>";var H=GetObjPos(this);var J=GetObjPos(A.dl);var B=H[0]-89;var I=H[1]-296;var E='<div id="dlLightBox" class="dlLightBox transp" style="left:'+B+"px;top:"+I+'px"><span class="close">&#xA0;</span>'+C+"</div>";$(E).appendTo("body");$(document).one("click",function(K){$(A.lightBox).removeClass("selected");$("#dlLightBox").remove();return false});$(".dlLbItem").click(function(){if(parseInt(this.id)==A.currentIndex){return }A.animating=false;NWK.component.DynamicLead.showSelected(parseInt(this.id),A);$(A.lightBox).removeClass("selected");$("#dlLightBox").remove()});return false})}else{$(A.lightBox).parent("div.lightBox").css({visibility:"hidden"})}},setMainArtContent:function(A){$(A.mainArtLink).attr("href",A.slides[A.currentIndex].url);if($(A.mainArtLink).children().length==0){$(A.mainArtLink).append('<img src="'+A.slides[A.currentIndex].imageSrc+'" alt="'+A.slides[A.currentIndex].title+'" />')}else{$(A.mainArtImg).attr({src:A.slides[A.currentIndex].imageSrc,alt:A.slides[A.currentIndex].title})}},setOverlayContent:function(B){var C=staticContentRoot+"dynimages/textrenderer.aspx?t="+encodeURIComponent(B.slides[B.currentIndex].title)+"&s=32&r=0&g=0&b=0&format=gif&alias=true&f=NWGROT-M.TTF";var A='<h6 class="rubric"><a href="'+B.slides[B.currentIndex].url+'">'+B.slides[B.currentIndex].rubric+" </a></h6>";A+='<h1 class="title"><a href="'+B.slides[B.currentIndex].url+'"><img class="transp" src="'+C+'" alt="'+B.slides[B.currentIndex].title+'" /></a></h1>';A+='<p class="deck"><a href="'+B.slides[B.currentIndex].url+'">'+B.slides[B.currentIndex].deck+"</a></p>";A+='<p class="source"><a href="'+B.slides[B.currentIndex].url+'">'+B.slides[B.currentIndex].source+"</a></p>";return A},playPauseHandler:function(A){$(A.pausePlay).click(function(){if($(this).hasClass("pause")){NWK.component.DynamicLead.pause(A)}else{NWK.component.DynamicLead.play(A)}return false})},previousHandler:function(A){$(A.back).one("click",function(){if(NWK.component.DynamicLead.isAnimating){return }NWK.component.DynamicLead.isAnimating=true;$(A.overlay).dequeue();NWK.component.DynamicLead.showPrevious(A);return false})},nextHandler:function(A){$(A.next).one("click",function(){if(NWK.component.DynamicLead.isAnimating){return }NWK.component.DynamicLead.isAnimating=true;NWK.component.DynamicLead.showNext(A);return false})},start:function(A){$("li",A.subNav).slice(A.currentIndex,A.currentIndex+1).children("a").removeClass("selected").css({"background-position":"center "+(-90-(A.currentIndex*15))+"px"});this.setMainArtContent(A);var B=this.setOverlayContent(A);$(A.caption).html(B);if(this.onClick!=null){$(A.imageDeck).find("a").click(function(){NWK.component.DynamicLead.onClick()})}$(A.overlay).fadeOut();this.resetOverlayPos(A);$(A.mainArtLink).fadeIn(500,function(){NWK.component.DynamicLead.slideTransition(A)})},showSelected:function(A,B){this.goTo(A,B)},showPrevious:function(A){if(A.currentIndex==0){this.goTo(A.slides.length-1,A)}else{this.goTo(A.currentIndex-1,A)}},showNext:function(A){if(A.currentIndex==(A.slides.length-1)){this.goTo(0,A)}else{this.goTo(A.currentIndex+1,A)}},play:function(A){A.isPaused=false;$(A.pausePlay).addClass("pause").removeClass("play");this.goNext(A)},pause:function(A){A.isPaused=true;$(A.pausePlay).addClass("play").removeClass("pause");this.clearInterval(A)},slideTransition:function(A){if(A.currentIndex%3==0){this.slideOverlayRightLeft(A)}else{if(A.currentIndex%3==1){this.slideOverlayBottomTop(A)}else{this.slideOverlayLeftRight(A)}}NWK.component.DynamicLead.setNextTransition(A)},slideOverlayRightLeft:function(A){window.setTimeout(function(){$(A.overlay).animate({left:0+"px"},NWK.component.DynamicLead.globalTitleTransition,function(){A.animating=false;NWK.component.DynamicLead.hideOverlayLeftRight(A)})},A.titlePause)},slideOverlayBottomTop:function(A){window.setTimeout(function(){$(A.overlay).animate({top:-110+"px"},NWK.component.DynamicLead.globalTitleTransition,function(){A.animating=false;NWK.component.DynamicLead.hideOverlayTopBottom(A)})},A.titlePause)},slideOverlayLeftRight:function(A){window.setTimeout(function(){$(A.overlay).animate({left:0+"px"},NWK.component.DynamicLead.globalTitleTransition,function(){A.animating=false;NWK.component.DynamicLead.hideOverlayRightLeft(A)})},A.titlePause)},setNextTransition:function(A){if(A.slides.length==1){return }if(!A.isPaused){this.transitionTimeoutId=window.setTimeout(function(){NWK.component.DynamicLead.goNext(A)},NWK.component.DynamicLead.globalSlidePause)}},goNext:function(A){if(A.currentIndex==(A.slides.length-1)){NWK.component.DynamicLead.goTo(0,A)}else{NWK.component.DynamicLead.goTo(null,A)}},goTo:function(A,B){NWK.component.DynamicLead.clearInterval(B);if(A!=null){$("li",B.subNav).slice(B.currentIndex,B.currentIndex+1).children("a").removeClass("selected").css({"background-position":"center "+(-(B.currentIndex*15))+"px"});if(A!==0){$("li",B.subNav).slice(A,A+1).children("a").addClass("selected").css({"background-position":"center "+(-90-(A*15))+"px"})}else{$("li a",B.subNav).slice(B.slides.length-1,B.slides.length).removeClass("selected").css({"background-position":"center "+(-(B.slides.length*15))+"px"});$("li",B.subNav).slice(A,A+1).children("a").addClass("selected").css({"background-position":"center "+(-90-(A*15))+"px"})}B.currentIndex=A}else{$("li",B.subNav).slice(B.currentIndex,B.currentIndex+1).children("a").removeClass("selected").css({"background-position":"center "+(-(B.currentIndex*15))+"px"});$("li",B.subNav).slice(B.currentIndex+1,B.currentIndex+2).children("a").addClass("selected").css({"background-position":"center "+(-90-((B.currentIndex+1)*15))+"px"});B.currentIndex++}this.fadeOutSlide(B)},hideOverlayRightLeft:function(B,A){$("span.close",B.overlay).one("click",function(){$(B.overlay).animate({left:-(B.overlayXOffset)+"px"},NWK.component.DynamicLead.globalTitleTransition);return false})},hideOverlayTopBottom:function(B,A){$("span.close",B.overlay).one("click",function(){$(B.overlay).animate({top:0+"px"},NWK.component.DynamicLead.globalTitleTransition);return false})},hideOverlayLeftRight:function(B,A){$("span.close",B.overlay).one("click",function(){$(B.overlay).animate({left:B.overlayXOffset+"px"},NWK.component.DynamicLead.globalTitleTransition);return false})},clearInterval:function(A){window.clearTimeout(this.transitionTimeoutId);this.transitionTimeoutId=null},fadeOutSlide:function(A){$(A.overlay).fadeOut(function(){var B=NWK.component.DynamicLead.setOverlayContent(A);$(A.caption).html(B);NWK.component.DynamicLead.resetOverlayPos(A)}).siblings(A.mainArtLink).fadeOut(350,function(){$(this).empty();NWK.component.DynamicLead.setMainArtContent(A);NWK.component.DynamicLead.fadeOutComplete(A)})},fadeOutComplete:function(A){$(A.mainArtLink).fadeIn(400,function(){NWK.component.DynamicLead.slideTransition(A);NWK.component.DynamicLead.isAnimating=false;NWK.component.DynamicLead.previousHandler(A);NWK.component.DynamicLead.nextHandler(A)})},resetOverlayPos:function(A){if(A.currentIndex%3==0){$(A.overlay).css({left:A.overlayXOffset+"px",top:-110+"px",display:"block"})}else{if(A.currentIndex%3==1){$(A.overlay).css({left:0+"px",top:0+"px",display:"block"})}else{$(A.overlay).css({left:(-(A.overlayXOffset))+"px",top:-110+"px",display:"block"})}}}};NWK.component.DynamicLead.onClick=Omniture_SendDLData;NWK.register("Dynamic Lead",NWK.component.DynamicLead);NWK.component.Mailbag={form:null,formBinding:false,method:"post",enctype:"",action:"",formFields:[],submitBut:null,isAjax:false,fieldTypes:[["email","^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})$"],["date","^(\d{1,2})[s./-](\d{1,2})[s./-](\d{2}|\d{4})$"],["image",""]],errorMessages:[],init:function(C){if(C==null){return }this.form=C;for(var B=0;B<C.elements.length;B++){this.formFields.push(C.elements[B]);if($(C.elements[B]).hasClass("submit")&&this.submitBut===null){this.submitBut=C.elements[B]}}if(this.submitBut!=null){var A=this;$(this.submitBut).click(function(){A.onSubmit()})}},onSubmit:function(){if($(this.form).hasClass("ajax")){this.xhrSubmit();return }this.basicSubmit()},xhrSubmit:function(){var C=this.form;var A=this;var B={beforeSubmit:function(){if(!A.validateForm()){A.handleValidationErrors();return false}A.showModal()},success:function(D){setTimeout(function(){$("#mailbag-modal h6").text("Thank you for your submission.");$("#mailbag-modal p").text(D);$(C).find('textarea, input[@type="text"]').removeAttr("disabled").css("background-color","#fff");$(C).find("input.submit").removeAttr("disabled");$("#mailbag-modal .closeModal").css("visibility","visible");$("#mailbag-modal .closeModal").click(function(){NWK.widget.Overlay.hideOverlay();return false})},3000)},error:function(D){$("#mailbag-modal h6").text("There is an error with your submission");$("#mailbag-modal p").text(D);$("#mailbag-modal .closeModal").css("visibility","visible");$(C).find('textarea, input[@type="text"]').removeAttr("disabled").css("background-color","#fff");$(C).find("input.submit").removeAttr("disabled");setTimeout(function(){if($("#dialog")){NWK.widget.Overlay.hideOverlay()}},3000)}};$(this.form).ajaxSubmit(B)},basicSubmit:function(){if(!this.validateForm()){this.handleValidationErrors();return }$(this.form).find("ul.errors, p.error-message").remove();$(this.form).submit()},validateForm:function(){this.errorMessages=[];for(var D=0;D<this.formFields.length;D++){var E=this.formFields[D];if(E.getAttribute("type")!=="hidden"&&E.getAttribute("type")!=="button"&&E.className!=""){var A=E.className;var F=A.split(" ");var G=this.fieldTypes;var H=function(){var M="";for(var K=0;K<F.length;K++){var L=false;for(var J=0;J<G.length;J++){if(G[J][0]==F[K]){L=true}}if(!L){M=F[K]}}return M}();if(H===null||H===""){continue}H=H.replace(/-/g," ");if(this.trim(E.value).length==0){if(H=="verify email address"){this.errorMessages.push("Please verify your email address")}else{this.errorMessages.push("Please enter your "+H)}$(this.formFields[D]).focus();continue}for(var C=0;C<this.fieldTypes.length;C++){if(this.fieldTypes[C][1]!==""&&$(E).hasClass(this.fieldTypes[C][0])){var I=new RegExp(this.fieldTypes[C][1]);if(!I.test(this.trim(E.value))){if(H=="verify email address"){this.errorMessages.push("Please verify your email address")}else{this.errorMessages.push("Please enter a valid "+H)}$(this.formFields[D]).focus()}}}if(H=="verify email address"){if(this.trim(this.formFields[D].value)!==this.trim($(this.form).find("input.email").val())&&I.test(E.value)){this.errorMessages.push("Please verify your email address");$(this.formFields[D]).focus()}}if($(E).attr("max")){var B=null;if(B==null){B=$(E).attr("max")}if(this.trim(E.value).length>B){this.errorMessages.push("Please limit your "+H+" to "+B+" characters");$(this.formFields[D]).focus()}}}}return(this.errorMessages.length==0)?true:false},handleValidationErrors:function(){var A=null;if($(this.form).find("ul.errors").css("display")=="block"){A=$(this.form).find("ul.errors");$(A).empty();$(this.errorMessages).each(function(B){$(A).append("<li>"+this+"</li>")})}else{$('<p class="error-message">Please correct the following errors: </p><ul class="errors"></ul>').insertBefore($(this.form).find("div.Fields, div.fields"));A=$(this.form).find("ul.errors");$(this.errorMessages).each(function(B){$(A).append("<li>"+this+"</li>")});$(A).show()}},showModal:function(){$(this.form).find("ul.errors, p.error-message").remove();$(this.form).find("input.submit").attr("disabled","disabled");$(this.form).find("textarea, input[@type='text']").attr("disabled","disabled").css("background-color","#f5edc9");var E="<div id='mailbag-modal'><a href='javascript:void(0);' class='closeModal'>close x</a><h6>Submitting...<span class='loading2'>&#xA0;</span></h6><p style='font:11px arial;line-height:14px;'>Please wait while we submit your data</p></div>";var C=GetObjPos(this.form);var D=$(this.form).width();var B;var A=0;if(document.getElementById("qaform")){B=-382}else{if(document.getElementById("CitizenCandidate")){B=-850;A=200}}NWK.widget.DialogBox.init("click",document.getElementById("mailbag-form"),"",E,"","","",{bIsModal:true,adjCoords:[B,A]});setTimeout(function(){$("#overlay2").unbind("click")},300)},hasClass:function(C,B){if(typeof C==="undefined"||C===null){return false}var A=new RegExp("(^|\\s)"+B+"(\\s|$)");if(typeof (C)=="object"&&C.className){return A.test(C.className)}return false},trim:function(A){return A.replace(/^\s+|\s+$/g,"")},addEvent:function(B,A,C){if(B!=null&&A!=""){if(window.addEventListener){B.addEventListener(A,C,false)}else{if(window.attachEvent){B.attachEvent("on"+A,C)}}}},removeEvent:function(C,B,A){C.removeEventListener(B,A,false)}};NWK.component.Mailbag.init(document.getElementById("mailbag-form"));NWK.component.Poll={init:function(){var A=this;$("div.poll.signalNoise").each(function(){var C=$("form",this);var B=$("div.slider",C);if(B){A.createSlider(B,C)}});$("div.poll.cw.featured").each(function(){var C=$("form",this);var B=$(".poll_cwbuttons",C);if(B){A.wireCWButtons(B)}})},createSlider:function(B,A){B.slider=new Slider(B,A);B.slider.addObserver(this)},wireCWButtons:function(B){var A=this;$(B).find(".up").click(function(){A.setSliderValue(10);A.form.submit()});$(B).find(".neutral").click(function(){A.setSliderValue(0);A.form.submit()});$(B).find(".down").click(function(){A.setSliderValue(-10);A.form.submit()})},setSliderValue:function(A){var B=$(this.form).find("input[name = 'sliderValue']");$(B).attr("value",A)},selectObjects:function(A){if($(A).siblings('input[name = "sliderValue"]').val()!=undefined&&$(A).siblings('input[name = "sliderValue"]').val()>50){$(".slider-label .right span",A).addClass("selected");$(".slider-label .left span",A).removeClass("selected")}else{if($(A).siblings('input[name = "sliderValue"]').val()!=undefined&&$(A).siblings('input[name = "sliderValue"]').val()<50){$(".slider-label .left span",A).addClass("selected");$(".slider-label .right span",A).removeClass("selected")}else{if($(A).siblings('input[name = "sliderValue"]').val()!=undefined&&$(A).siblings('input[name = "sliderValue"]').val()==50){$(".slider-label .right span",A).removeClass("selected");$(".slider-label .left span",A).removeClass("selected")}}}},update:function(A){if($(A).siblings("ul.footer").find("input.submit").css("opacity")!=1||$(A).siblings("ul.footer").find("input.submit").css("filter")!="alpha(opacity=100)"){$(A).siblings("ul.footer").find("input.submit").css({filter:"alpha(opacity=100)",opacity:1})}this.selectObjects(A)}};NWK.register("Poll",NWK.component.Poll);NWK.component.Recommendation={init:function(){$("a.button.recommend").click(function(){var C=this;var B=parseInt($(C).attr("pageId"),10);var D=$(".recommend-counter span").text();D=D.replace("\n","").replace(" ","");D=parseInt(D,10)+1;if(!isNaN(B)){if(isAuthenticated){NWK.component.Recommendation.voteUp(B,C);$(".recommend-counter span").text(D);var A=NWK.util.Cookie.read("rec");if(A!=null){A+="|"+B}else{A=B}NWK.util.Cookie.create("rec",A,10000)}else{window.location.href=Paths.Current.RootPath+"login.aspx?ReturnUrl="+window.location.href}}})},voteUp:function(A,B){$.ajax({type:"GET",url:Paths.Current.RootPath+"recommend.aspx",data:"pageId="+A,success:function(D,C){NWK.component.Recommendation.disable(B)},error:function(E,C,D){}})},disable:function(A){$(A).val("Recommended");$(A).attr("disabled","disabled");$(A).addClass("recommended")}};NWK.component.SiteMap={init:function(){NWK.component.SiteMap.wireToggle();NWK.component.SiteMap.wireToggleAll()},wireToggle:function(){$("#site-map").find("h4").click(function(){NWK.component.SiteMap.toggle(this)})},wireToggleAll:function(){$("#function a").click(function(){var A=NWK.component.SiteMap.toggleClass(this,{collapseText:"Collapse All",expandText:"See All"});$("div.site-map-section").each(function(){if(A=="expanded"){$("h4",this).attr("class","expand");$("ul",this).hide()}else{$("h4",this).attr("class","collapse");$("ul",this).show()}})})},toggle:function(A){$(A).parents("div.site-map-section").children("ul").toggle();NWK.component.SiteMap.toggleClass(A,null)},toggleClass:function(C,B){var A;if($(C).hasClass("expand")){$(C).addClass("collapse").removeClass("expand");if(B&&B.collapseText!=null){$(C).text(B.collapseText)}A="collapsed"}else{$(C).addClass("expand").removeClass("collapse");if(B&&B.expandText!=null){$(C).text(B.expandText)}A="expanded"}return A}};NWK.component.SiteMap.init();NWK.component.Peek={strQueryParam:"/output/thepeek",strLoadingImg:"",intRequestTimeout:500000,arrSections:[],init:function(A,B){$("div.ThePeek").each(function(C){var D=this;D={peekId:this.id,tabs:$("div.box div.content div.peekBox div.content div.sectionWrapper ul.peekSections li",this).slice(0),sections:$("div.box div.content div.peekBox div.content div.sectionWrapper ul.peekSections",this),content:$("div.box div.content div.peekBox div.content div.contentWrapper div.peekContent",this),initHeight:$("div.box div.content div.peekBox div.content div.sectionWrapper ul.peekSections",this).height()};NWK.component.Peek.setHandler(D)})},setHandler:function(A){$("a",A.tabs).click(function(){$(this).blur();if($(this).attr("class")=="selected"){return false}$(A.tabs).removeClass("peekSelected").addClass("peekOff");$(A.tabs).children("a").removeClass("selected");if(A.peekId=="mmWrapper"){NWK.component.Peek.strQueryParam="/output/multimediaguide";$("../../li",this).removeClass("lightTan");$("../../li:even",this).slice(1).addClass("medTan")}$(this).parent("li").removeClass("peekOff").addClass("peekSelected");$(this).addClass("selected");NWK.component.Peek.getAjaxRequest(this,A);Omniture_SendMicroData("What's Inside - "+this.innerHTML,"event17");return false})},getAjaxRequest:function(B,A){$.ajax({beforeSend:function(){$(A.content).empty();$(A.content).append('<div class="loading peekld"><span>Loading</span></div>')},url:detectProxy(B+this.strQueryParam),success:function(C){$(A.content).html(C);NWK.widget.QuickRead("","","");peekAdCall(B.id)},error:function(){$(A.content).html("<span class='peekError'>We are currently unable to return the requested content. Please try again later.</span>")}})}};NWK.component.Peek.init();NWK.component.Contributors={init:function(){$(".scroll-pane").jScrollPane({showArrows:true,animateTo:true,animateInterval:50,animateStep:2,scrollbarWidth:12,dragMinHeight:18});$(".alpha-nav li a").bind("click",function(){$this=$(this);var A=$(this).attr("href");$(".scroll-pane").each(function(){this.scrollTo(A)});return false})}};NWK.register("Contributors",NWK.component.Contributors);(function(){SlideShow=function(){var M=this,I=0,K=0,D=[],L=null,F=null,E=null,J=null,G=false,H=0,A=window.onTemplateLoaded,B=false,C=false;this.init=function(){K=$("ul#slideshow li").length-2;var O=$("#multimedia-slideshow .global-slide-duration").html();$("#multimedia-slideshow li.slide").each(function(){var P=$(this).find(".slide-duration-override").html();if(P!=null){D.push(P)}else{D.push(O)}});F="preAd";E={playerID:slideshow_PlayerId,videoId:slideshow_VideoId,autoStart:"true",bgcolor:"#000000",width:"610",height:"310",isVid:"true"};var N=$("#jplayer").html();$("#jplayer").jPlayer({ready:function(){$(this).setFile(N);B=true;if(C){$(this).play();if($("#multimedia-slideshow .controls .options #audio-toggle").attr("class")!="on"){$(this).volume(0)}}},swfPath:staticContentRoot+"site/redesign/js/libs/jquery"});this.bind()};this.bind=function(){$("ul#slideshow .start-slideshow").unbind().click(function(){$(this).unbind();M.addPlayer();$("ul#slideshow li:not(#placeHolder)").hide()});if(I<K){$("#multimedia-slideshow .playback #slide-pause").unbind().click(function(){M.playback()})}else{$("#multimedia-slideshow .playback #slide-pause").unbind().click(M.restartSlideShow)}if(I<K){$("#multimedia-slideshow .playback #slide-next").removeClass("disabled").unbind().click(function(){$(this).unbind();M.transition("n",null,true);M.playback(true);M.omniture(I+1)})}else{$("#multimedia-slideshow .playback #slide-next").addClass("disabled").unbind()}if(I>1){$("#multimedia-slideshow .playback #slide-prev").removeClass("disabled").unbind().click(function(){$(this).unbind();M.transition(null,null,true);M.playback(true);M.omniture(I-1)})}else{$("#multimedia-slideshow .playback #slide-prev").addClass("disabled").unbind()}$("#multimedia-slideshow .options .restart").unbind().click(M.restartSlideShow);$("#multimedia-slideshow .options #audio-toggle.off").live("click",function(){M.mute("on")});$("#multimedia-slideshow .options #audio-toggle.on").live("click",function(){M.mute("off")})};this.transition=function(S,N,R){var Q=++H;clearTimeout(L);try{multimediaAdCall()}catch(P){}var O;if(N!=null){O=N}else{if(S=="n"&&I!=K){O=I+1}else{if(S!="n"&&I!=1){O=I-1}else{O=I}}}if(O<=1){$("#multimedia-slideshow .playback #slide-prev").addClass("disabled").unbind()}else{$("#multimedia-slideshow .playback #slide-prev").removeClass("disabled")}if(O>=K){$("#multimedia-slideshow .playback #slide-next").addClass("disabled").unbind()}else{$("#multimedia-slideshow .playback #slide-next").removeClass("disabled")}$("ul#slideshow li:eq("+(I+1)+")").fadeOut("slow",function(){if(H==Q){I=O;M.omniture(I);if(I==0){$("ul#slideshow li").each(function(){this.style.cssText=""})}if(O==K){$("#multimedia-slideshow .playback #slide-pause").removeClass("pause").attr("class","play")}$("#multimedia-slideshow .playback .current-slide-num").html(I==0?1:I);$("ul#slideshow li:eq("+(I+1)+")").fadeIn("slow",function(){M.bind();if(!G&&I>0&&I<K&&!R){L=setTimeout(function(){M.transition("n")},D[I])}H--})}})};this.startSlideShow=function(){if(I==0){$("ul#slideshow li:not(.intro)").each(function(){this.style.cssText=""})}$("#multimedia-slideshow .playback, #multimedia-slideshow .options").fadeIn("normal");$("#multimedia-slideshow .playback #slide-pause").removeClass("play");$("#multimedia-slideshow .playback #slide-pause").attr("class","pause");G=false;if(B){$("#jplayer").play();if($("#multimedia-slideshow .controls .options #audio-toggle").attr("class")!="on"){$("#jplayer").volume(0)}}if(I>0){L=setTimeout(function(){M.transition("n")},D[I])}else{M.transition("n")}C=true};this.pauseSlideShow=function(){G=true;if(L){clearTimeout(L)}};this.restartSlideShow=function(){$("#jplayer").stop();M.transition(null,0);$("#multimedia-slideshow .playback, #multimedia-slideshow .options").fadeOut("normal")};this.playback=function(N){if($("#multimedia-slideshow .playback #slide-pause").hasClass("pause")||N){$("#multimedia-slideshow .playback #slide-pause").removeClass("pause");$("#multimedia-slideshow .playback #slide-pause").attr("class","play");M.pauseSlideShow()}else{$("#multimedia-slideshow .playback #slide-pause").removeClass("play");$("#multimedia-slideshow .playback #slide-pause").attr("class","pause");M.startSlideShow()}};this.addPlayer=function(){if(E.videoId&&E.playerID){window.onTemplateLoaded=M.onTemplateLoaded;$("#placeHolder").show();var P=brightcove.createElement("object");P.id=F;var R;for(var O in E){R=brightcove.createElement("param");R.name=O;R.value=E[O];P.appendChild(R)}var Q=document.getElementById("placeHolder");var N=$(Q).html();$(Q).html("");brightcove.createExperience(P,Q,true);$(Q).append(N);J=setTimeout(M.onAdSkipTimeout,5000)}else{M.startSlideShow()}};this.removePlayer=function(){brightcove.removeExperience(F)};this.onTemplateLoaded=function(O){var Q;var N;Q=brightcove.getExperience(F);N=Q.getModule(APIModules.VIDEO_PLAYER);N.addEventListener(BCMediaEvent.COMPLETE,M.onComplete);var P=Q.getModule(APIModules.ADVERTISING);P.addEventListener(BCAdvertisingEvent.AD_START,M.onAdPlay);if(A){A(O)}};this.onAdPlay=function(){clearTimeout(J);var O=brightcove.getExperience(F);var N=O.getModule(APIModules.ADVERTISING);$("#skipad-container").show();$("#ad-duration").html(N.getCurrentAdProperties().duration)};this.onAdSkipTimeout=function(){M.onComplete()};this.onComplete=function(){try{M.removePlayer()}catch(N){}M.startSlideShow()};this.omniture=function(N){try{s=s_gi(s_account);translateToHCode();s.prop14=N;void (s.t())}catch(O){}};this.mute=function(N){if(N=="off"){$("#jplayer").volume(0)}else{$("#jplayer").volume(80)}$("#multimedia-slideshow .controls .options #audio-toggle").attr("class",N)}};NWK.component.SlideShow=new SlideShow()})();NWK.register("Slideshow",NWK.component.SlideShow);(function(){if(!window._companionAds){window._companionAds=[]}CompanionAd=function(){var A=this,C=window.onTemplateLoaded,B=false,D=($.browser.msie&&$.browser.version.substr(0,1)<7);this.init=function(){window.onTemplateLoaded=A.onTemplateLoaded;$(function(){$(".beml .beml-companion .beml-companion-header a").click(A.close)})};this.onTemplateLoaded=function(H){var G=brightcove.getExperience(H);var F=G.getModule(APIModules.ADVERTISING);var E=G.getModule(APIModules.VIDEO_PLAYER);F.enableExternalAds(true);F.addEventListener(BCAdvertisingEvent.AD_COMPLETE,A.onAdComplete);if(H.substr(H.length-"mainart-ad".length)!="mainart-ad"){A.exp=G;A.ad=F;A.player=E;A.ad.addEventListener(BCAdvertisingEvent.EXTERNAL_AD,A.onExternalAd);A.vp=A.exp.getModule(APIModules.VIDEO_PLAYER);A.vp.addEventListener(BCMediaEvent.COMPLETE,A.onComplete)}if(C){C(H)}};this.onExternalAd=function(H){var J=A.getXMLDoc(H.ad);var E=A.getVideo(J);var N=A.getBanner(J);var F=(N.expandedBannerURL.substr(N.expandedBannerURL.length-4).toLowerCase()==".swf");var K=(N.collapsedBannerURL.substr(N.collapsedBannerURL.length-4).toLowerCase()==".swf");var I;if(!F){I="<a href='"+N.bannerClickURL+"' target='_blank' ><img src='"+N.expandedBannerURL+"' /></a>"}else{I="<div id='companionad-flash'></div>"}if(isInlinePlayer){A.ad.showAd(E);$(".beml .beml-companion .beml-companion-ad").html(I);$(".beml .beml-companion .beml-companion-header span").html(A.ad.getCurrentAdProperties().duration);$c=$(".beml .beml-companion");var L=$c.css("left");$c.css("left",0).css("visibility","visible");$c.animate({left:L},250)}else{var G=brightcove.getExperience("myExperiencemainart-ad");var P=G.getModule(APIModules.ADVERTISING);var O=G.getModule(APIModules.VIDEO_PLAYER);A.videoObject=E;O.setVolume(A.player.getVolume());O.mute(A.player.isMuted());P.showAd(E);$(".beml-mainart-ad-companion span").html(P.getCurrentAdProperties().duration);$(".beml-mainart-ad-companion-ad").html(I);if(N.collapsedBannerURL!=null&&N.collapsedBannerURL.length>0&&N.collapsedBannerURL.substr(N.collapsedBannerURL.length-"1x1_place.gif".length).toLowerCase()!="1x1_place.gif"){var M;if(!K){M="<a href='"+N.bannerClickURL+"' target='_blank' ><img src='"+N.collapsedBannerURL+"' /></a>"}else{M="<div id='leavebehind-flash'></div>"}$(".beml.mainArt .belowPlayer p").css("display","none");$(".beml.mainArt .belowPlayer .leavebehind").html(M).css("display","block");if(K){swfobject.embedSWF(N.collapsedBannerURL,"leavebehind-flash","300","256","8",false,null,{bgcolor:"#000000"})}}$(".beml-mainart-player").css({width:"0"});$(".beml-mainart-player object").css({width:"0"});if(D){$(".beml-mainart-player object").css("left","-1000px")}$(".beml-mainart-ad").css({width:"628px",height:"407px"});$(".beml-mainart-ad object").css({width:"300px",height:"256px"});$(".beml-mainart-ad .wrapper").css({width:"297px",height:"250px"})}if(F){swfobject.embedSWF(N.expandedBannerURL,"companionad-flash","299","250 ","8",null,null,{bgcolor:"#000000"},{bgcolor:"#000000"})}B=true};this.getVideo=function(H){var E=new Object();E.type="videoAd";var I=H.firstChild.childNodes.length;var G=H.firstChild.firstChild;E.duration=(H.firstChild.getAttribute("duration"))?H.firstChild.getAttribute("duration"):15;if(H.firstChild.getAttribute("trackStartURLs")){E.trackStartURLs=H.firstChild.getAttribute("trackStartURLs").split(",")}if(H.firstChild.getAttribute("trackMidURLs")){E.trackMidURLs=H.firstChild.getAttribute("trackMidURLs").split(",")}if(H.firstChild.getAttribute("trackEndURLs")){E.trackEndURLs=H.firstChild.getAttribute("trackEndURLs").split(",")}if(H.firstChild.getAttribute("trackPointURLs")){E.trackPointURLs=H.firstChild.getAttribute("trackPointURLs").split(",")}E.trackPointTime=(H.firstChild.getAttribute("trackPointTime"))?H.firstChild.getAttribute("trackPointTime"):0;for(var F=0;F<I;F++){if(G.nodeName=="videoURL"&&G.firstChild){E.videoURL=G.firstChild.nodeValue}if(G.nodeName=="videoClickURL"&&G.firstChild){E.videoClickURL=G.firstChild.nodeValue}G=G.nextSibling}return E};this.getBanner=function(H){var E=new Object();var I=H.firstChild.childNodes.length;var G=H.firstChild.firstChild;for(var F=0;F<I;F++){if(G.nodeName=="expandedBannerURL"&&G.firstChild){E.expandedBannerURL=G.firstChild.nodeValue}if(G.nodeName=="collapsedBannerURL"&&G.firstChild){E.collapsedBannerURL=G.firstChild.nodeValue}if(G.nodeName=="bannerClickURL"&&G.firstChild){E.bannerClickURL=G.firstChild.nodeValue}G=G.nextSibling}return E};this.getXMLDoc=function(E){var F;if(window.ActiveXObject){F=new ActiveXObject("Microsoft.XMLDOM");F.async=false;F.loadXML(E)}else{if(window.XMLHttpRequest){F=(new DOMParser()).parseFromString(E,"text/xml")}}return F};this.onAdComplete=function(F){if(!isInlinePlayer){var G=brightcove.getExperience("myExperiencemainart-ad");var E=G.getModule(APIModules.VIDEO_PLAYER);A.player.setVolume(E.getVolume());A.player.mute(E.isMuted())}A.ad.resumeAfterExternalAd();A.close()};this.onComplete=function(E){$(".beml.mainArt .belowPlayer .leavebehind").css("display","none");$(".beml.mainArt .belowPlayer p").css("display","block")};this.close=function(){if(B){if(isInlinePlayer){$c=$(".beml .beml-companion");var E=$c.css("left");$c.animate({left:0},250,null,function(){$c.css("visibility","hidden").css("left",E)});B=false}else{$(".beml-mainart-ad").css({width:"0",height:"0"});$(".beml-mainart-ad object").css({width:"0",height:"0"});$(".beml-mainart-player").css({width:"",height:""});$(".beml-mainart-player object").css({width:"638px",height:"397px"});$(".beml-mainart-ad .wrapper").css({width:"0",height:"0"});if(D){$(".beml-mainart-player object").css("left","0px")}}}}};NWK.component.CompanionAd=new CompanionAd()})();NWK.register("CompanionAd",NWK.component.CompanionAd);NWK.component.ThisWeeksMagazine={init:function(){$(".this-weeks-mag .tabs li").click(function(){$(this).removeClass("inactive").addClass("active");$(this).siblings().removeClass("active").addClass("inactive");var B=$(this).attr("class").split(" ");if(B.length>0){var A=B[0];$(".this-weeks-mag .tab-content ."+A).removeClass("inactive").addClass("active");$(".this-weeks-mag .tab-content ."+A).siblings().removeClass("active").addClass("inactive")}})}};NWK.register("ThisWeeksMagazine",NWK.component.ThisWeeksMagazine);NWK.component.TwitterFeed={instance:null,counter:null,DateCalculations:null,isAuth:false,checkedDefault:false,init:function(A,B,F,G,I,K,C){var E=this;var D=$("#"+A);var J=$(D).find(".timeline");var H=$(D).find(".timeline-status");D={moduleId:A,date:B,lastMaxId:F,userId:G,statusId:I,size:K,params:C,counter:null,dateCalculator:new DateCalculator(),pauseBut:null,timeline:null,timelineInstance:null,pauseInstance:null};this.extend(D);D.pauseBut=$("span",H).isPauseButton().show();D.timeline=$(J).getTimeline(C,D).each(function(){this.addUpdates($("li",J).get(),F,false);this.insertImmediately($("li:eq(0)",J).get());this.start()});D.timelineInstance=D.timeline.get(0);D.pauseInstance=D.pauseBut.get(0);D.pauseBut.bind("enabled",function(){D.timelineInstance.stop()});D.pauseBut.bind("disabled",function(M,L){D.timelineInstance.start();if(L>1000){D.timelineInstance.animateNow()}});if($("#"+A).hasClass("module")===false){NWK.widget.Carousel.subscribe({obj:D.timelineInstance,callback:"contextualUpdate"})}this.bindSubmit(D);D.counter=this.getCounter(D.moduleId);this.getWindowStatus(D.moduleId)},extend:function(A){var B=this;$.fn.extend({isPauseButton:function(){return this.each(function(){var E=$(this);var I;var H=false;function D(){if(!H){E.addClass("enabled");I=new Date().getTime();E.trigger("enabled")}}function C(){if(!H){E.removeClass("enabled");var J=(new Date().getTime())-I;I=null;E.trigger("disabled",J)}}E.click(function(){if(I){H=false;C();$(this).css("background-position","left -20px")}else{D();H=true;$(this).css("background-position","left -60px")}});this.enable=D;this.disable=C;function G(){$("li.item",A.timeline).updateRelativeTime()}G();var F=new Interval(1000);F.listen("run",function(J){G()});E.hover(function(){if($(this).hasClass("enabled")){$(this).css("background-position","left -60px")}else{$(this).css("background-position","left -20px")}},function(){if($(this).hasClass("enabled")){$(this).css("background-position","left -40px")}else{$(this).css("background-position","left 0px")}});F.start()})},updateRelativeTime:function(){var C=A.dateCalculator.newUTCDate();this.each(function(){var F=$("p .update-time",this);var D=F.attr("title");if(D){var E=A.dateCalculator.parseIso8601Date(D);F.html(B.relativeTime(E,C))}})},getTimeline:function(E,D){var G=1*1000;var C=8*1000;var F=60*1000;return this.each(function(){var O=$(this);var K=O;var V=0;var H=false;var P=false;var R=new TimedQueue(C);R.listen("pop",function(c,b,a){M(b)});var L=new Interval(F);L.listen("run",function(a){N()});L.start();this.stopAll=function(){L.stop();R.stop()};function J(){R.start()}this.start=J;function Q(){R.stop()}this.stop=Q;function S(j,k,e){var h=V;if(k){V=k}else{}if(j.length==0){R.setDelay(C)}else{if(e&&!NWK.component.TwitterFeed.checkedDefault){T();NWK.component.TwitterFeed.checkedDefault=true}var b=[];for(var f=0;f<j.length;f++){var g=$(j[f]).attr("id");if(g){var a=parseInt(g.replace(/status_/,""));if(a>h){b.push(j[f])}}}R.clear();R.addItems(b);var d=F/(j.length+1);var c=Math.ceil(Math.max(C,d));R.setDelay(c)}}this.addUpdates=S;function T(){$("#status_-1").text("Tell us what you think!")}this.updateDefaultText=T;function W(){R.execute()}this.animateNow=W;function U(b){var a=function(){R.restart();R.setNextItem(b);R.execute()};if(P){O.one("animate-end",a)}else{a()}}this.insertImmediately=U;function N(){var a=Paths.Current.RootPath+"twitter.aspx?";if(!H){$.ajax({url:a,data:I(D),dataType:"html",success:function(b){Y(b)},error:function(b){Y(null)}})}a=null}function Y(b){if(b){var a=$(b).attr("id");var c=$(b).find("li");S(c,a,true)}H=false}function I(){var b={replyToUserId:D.userId,replyToStatusId:D.statusId,lastStatusId:D.lastMaxId};for(var a in E){b[a]=E[a]}return b}function M(d){var b=$(d);var a=null;if(O.children("li").length>0){O.children("li:eq(0)").fadeOut(750).remove()}O.prepend(b);b.fadeIn(G);var c=function(){if(P){Z();return }clearInterval(a);a=null};a=setInterval(c,1000);P=true}function Z(){P=false}function X(a){var b=$(a).find("#"+D.moduleId).get(0);if(b){if($(D.pauseInstance).hasClass("enabled")){return }D.timelineInstance.start()}else{D.timelineInstance.stop()}}this.contextualUpdate=X})}})},relativeTime:function(A,B){var C=(B.getTime()-A.getTime())/1000;if(C<5){return"less than 5 seconds ago"}else{if(C<10){return"less than 10 seconds ago"}else{if(C<20){return"less than 20 seconds ago"}else{if(C<60){return"less than a minute ago"}else{if(C<120){return"about a minute ago"}else{if(C<(60*60)){return Math.round(C/60)+" minutes ago"}else{if(C<(120*60)){return"about an hour ago"}else{if(C<(24*60*60)){return"about "+Math.round(C/3600)+" hours ago"}else{if(C<(48*60*60)){return"yesterday"}else{return Math.round(C/86400)+" days ago"}}}}}}}}}},bindSubmit:function(A){var B=$("#"+A.moduleId).find("form");if(B!="undefined"){$(B).submit(function(){if(A.counter.getFieldLength()>140){return false}return })}},getCounter:function(C){var B=$("#"+C).find("textarea").get(0);if($(B).val()){var A=$("#"+C).find("span.twitter-reply-field-chars").get(0);return new CharCounter({field:B,updateEl:A,maxChars:140})}},getWindowStatus:function(C){var B=true;var A="http://twitter.com/sessions/present.json?callback=newsTweetUser";$("body").append("<script id='twitter-auth-check' langauge='javascript' type='text/javascript' src='"+A+"'><\/script>");window.onfocus=function(){if(!B){if(!NWK.component.TwitterFeed.isAuth){if(document.getElementById("twitter-auth-check")){$("#twitter-auth-check").remove()}return true}}};window.onblur=function(){B=false;return true};$(".your-take").find("a.cta").click(function(){if(document.getElementById("twitter-auth-check")){$("#twitter-auth-check").remove()}setTimeout(function(){$("body").append("<script id='twitter-auth-check' langauge='javascript' type='text/javascript' src='"+A+"'><\/script>")},20000)})}};function newsTweetUser(A){if(A){NWK.component.TwitterFeed.isAuth=true;$(".twitter-form").each(function(){if($(".field",this).css("display")=="none"){$(".field",this).show();$(this).siblings(".twitter-sign-in").hide()}})}}NWK.component.Username={init:function(){var A=NWK.util.Cookie.read("nw-username");if(A){$("span.username").html(NWK.util.Cookie.read("nw-username"))}}};
