/*! jQuery v1.7.2 jquery.com | jquery.org/license */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);

/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Version 2.1.2
*/
(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c}})(jQuery);

/**
* Ajax Queue Plugin
* Homepage: http://jquery.com/plugins/project/ajaxqueue
* Documentation: http://docs.jquery.com/AjaxQueue
*/
/**
<script>
$(function(){
jQuery.ajaxQueue({
url: "test.php",
success: function(html){ jQuery("ul").append(html); }
});
jQuery.ajaxQueue({
url: "test.php",
success: function(html){ jQuery("ul").append(html); }
});
jQuery.ajaxSync({
url: "test.php",
success: function(html){ jQuery("ul").append("<b>"+html+"</b>"); }
});
jQuery.ajaxSync({
url: "test.php",
success: function(html){ jQuery("ul").append("<b>"+html+"</b>"); }
});
});
</script>
<ul style="position: absolute; top: 5px; right: 5px;"></ul>
*/
/*
* Queued Ajax requests.
* A new Ajax request won't be started until the previous queued 
* request has finished.
*/
/*
* Synced Ajax requests.
* The Ajax request will happen as soon as you call this method, but
* the callbacks (success/error/complete) won't fire until all previous
* synced requests have been completed.
*/
(function($){
var ajax = $.ajax;
var pendingRequests = {};
var synced = [];
var syncedData = [];
$.ajax = function(settings) {
// create settings for compatibility with ajaxSetup
settings = jQuery.extend(settings, jQuery.extend({}, jQuery.ajaxSettings, settings));
var port = settings.port;
switch(settings.mode){
case "abort":
if ( pendingRequests[port] ) {
pendingRequests[port].abort();
}
return pendingRequests[port] = ajax.apply(this, arguments);
case "queue":
var _old = settings.complete;
settings.complete = function(){
if ( _old )
_old.apply( this, arguments );
jQuery([ajax]).dequeue("ajax" + port );;
};
jQuery([ ajax ]).queue("ajax" + port, function(){
ajax( settings );
});
return;
case "sync":
var pos = synced.length;
synced[ pos ] = {
error: settings.error,
success: settings.success,
complete: settings.complete,
done: false
};
syncedData[ pos ] = {
error: [],
success: [],
complete: []
};
settings.error = function(){ syncedData[ pos ].error = arguments; };
settings.success = function(){ syncedData[ pos ].success = arguments; };
settings.complete = function(){
syncedData[ pos ].complete = arguments;
synced[ pos ].done = true;
if ( pos == 0 || !synced[ pos-1 ] )
for ( var i = pos; i < synced.length && synced[i].done; i++ ) {
if ( synced[i].error ) synced[i].error.apply( jQuery, syncedData[i].error );
if ( synced[i].success ) synced[i].success.apply( jQuery, syncedData[i].success );
if ( synced[i].complete ) synced[i].complete.apply( jQuery, syncedData[i].complete );
synced[i] = null;
syncedData[i] = null;
}
};
}
return ajax.apply(this, arguments);
};
})(jQuery);

/*
* Autocomplete - jQuery plugin 1.0.2
*
* Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.autocomplete.js 5747 2008-06-25 18:30:55Z joern.zaefferer $
*
*/
; (function($){
$.fn.extend({
autocomplete: function(urlOrData, options){
var isUrl = typeof urlOrData == "string";
options = $.extend({},
$.Autocompleter.defaults,{
url: isUrl ? urlOrData: null,
data: isUrl ? null: urlOrData,
delay: isUrl ? $.Autocompleter.defaults.delay: 10,
max: options && !options.scroll ? 10: 150
},
options);
// if highlight is set to false, replace it with a do-nothing function
options.highlight = options.highlight ||
function(value){
return value;
};
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
options.formatMatch = options.formatMatch || options.formatItem;
return this.each(function(){
new $.Autocompleter(this, options);
});
},
result: function(handler){
return this.bind("result", handler);
},
search: function(handler){
return this.trigger("search", [handler]);
},
flushCache: function(){
return this.trigger("flushCache");
},
setOptions: function(options){
return this.trigger("setOptions", [options]);
},
unautocomplete: function(){
return this.trigger("unautocomplete");
}
});
$.Autocompleter = function(input, options){
var KEY ={
UP: 38,
DOWN: 40,
DEL: 46,
TAB: 9,
RETURN: 13,
ESC: 27,
COMMA: 188,
PAGEUP: 33,
PAGEDOWN: 34,
BACKSPACE: 8
};
// Create $ object for input element
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
var timeout;
var previousValue = "";
var cache = $.Autocompleter.Cache(options);
var hasFocus = 0;
var lastKeyPressCode;
var config ={
mouseDownOnSelect: false
};
var select = $.Autocompleter.Select(options, input, selectAndSearchCurrent, config);
var blockSubmit;

/* Added to prevent errors with newer versions of jquery*/
if(typeof $.browser == 'undefined'){
$.browser = {};
$.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase());
$.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
$.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
$.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());
}	

// prevent form submit in opera when selecting with return key
$.browser.opera && $(input.form).bind("submit.autocomplete",
function(){
if (blockSubmit){
blockSubmit = false;
return false;
}
});
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
$input.bind(($.browser.opera ? "keypress": "keydown") + ".autocomplete",
function(event){
// track last key pressed
lastKeyPressCode = event.keyCode;
switch (event.keyCode){
case KEY.UP:
event.preventDefault();
if (select.visible()){
select.prev();
}else{
onChange(0, true);
}
selectCurrent();
break;
case KEY.DOWN:
event.preventDefault();
if (select.visible()){
select.next();
} else{
onChange(0, true);
}
selectCurrent();
break;
case KEY.PAGEUP:
event.preventDefault();
if (select.visible()){
select.pageUp();
} else{
onChange(0, true);
}
selectCurrent();
break;
case KEY.PAGEDOWN:
event.preventDefault();
if (select.visible()){
select.pageDown();
} else{
onChange(0, true);
}
selectCurrent();
break;
// matches also semicolon
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
if (searchCurrent()){
// stop default to prevent a form submit, Opera needs special handling
event.preventDefault();
blockSubmit = true;
return false;
}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(timeout);
timeout = setTimeout(onChange, options.delay);
break;
}
}).focus(function(){
// track whether the field has focus, we shouldn't process any
// results if the field no longer has focus
hasFocus++;
}).blur(function(){
hasFocus = 0;
if (!config.mouseDownOnSelect){
hideResults();
}
}).click(function(){
// show select when clicking in a focused field
if (hasFocus++>1 && !select.visible()){
onChange(0, true);
}
}).bind("search",
function(){
// TODO why not just specifying both arguments?
var fn = (arguments.length > 1) ? arguments[1] : null;
function findValueCallback(q, data){
var result;
if (data && data.length){
for (var i = 0; i < data.length; i++){
if (data[i].result.toLowerCase() == q.toLowerCase()){
result = data[i];
break;
}
}
}
if (typeof fn == "function") fn(result);
else $input.trigger("result", result && [result.data, result.value]);
}
$.each(trimWords($input.val()),
function(i, value){
request(value, findValueCallback, findValueCallback);
});
}).bind("flushCache",
function(){
cache.flush();
}).bind("setOptions",
function(){
$.extend(options, arguments[1]);
// if we've updated the data, repopulate
if ("data" in arguments[1])
cache.populate();
}).bind("unautocomplete",
function(){
select.unbind();
$input.unbind();
$(input.form).unbind(".autocomplete");
});

function selectAndSearchCurrent(){
selectCurrent();
searchCurrent();
}
function searchCurrent(){
var selected = select.selected();
if (!selected)
return false;
hideResultsNow();
$input.trigger("result", [selected.data, selected.value]);
return true;
}
function selectCurrent(){
var selected = select.selected();
if (!selected)
return false;
var v = selected.result;
previousValue = v;
if (options.multiple){
var words = trimWords($input.val());
if (words.length > 1){
v = words.slice(0, words.length - 1).join(options.multipleSeparator) + options.multipleSeparator + v;
}
v += options.multipleSeparator;
}
$input.val(v);
}
function onChange(crap, skipPrevCheck){
if (lastKeyPressCode == KEY.DEL){
select.hide();
return;
}
var currentValue = $input.val();
if (!skipPrevCheck && currentValue == previousValue)
return;
previousValue = currentValue;
currentValue = lastWord(currentValue);
if (currentValue.length >= options.minChars){
$input.addClass(options.loadingClass);
if (!options.matchCase)
currentValue = currentValue.toLowerCase();
request(currentValue, receiveData, hideResultsNow);
} else{
stopLoading();
select.hide();
}
};
function trimWords(value){
if (!value){
return [""];
}
var words = value.split(options.multipleSeparator);
var result = [];
$.each(words,
function(i, value){
if ($.trim(value))
result[i] = $.trim(value);
});
return result;
}
function lastWord(value){
if (!options.multiple)
return value;
var words = trimWords(value);
return words[words.length - 1];
}
// fills in the input box w/the first match (assumed to be the best match)
// q: the term entered
// sValue: the first matching result
function autoFill(q, sValue){
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
// if the last user key pressed was backspace, don't autofill
if (options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE){
// fill in the value (keep the case the user has typed)
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
// select the portion of the value not typed by the user (so the next character will erase)
$.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length);
}
};
function hideResults(){
clearTimeout(timeout);
timeout = setTimeout(hideResultsNow, 200);
};
function hideResultsNow(){
var wasVisible = select.visible();
select.hide();
clearTimeout(timeout);
stopLoading();
if (options.mustMatch){
// call search and run callback
$input.search(
function(result){
// if no value found, clear the input box
if (!result){
if (options.multiple){
var words = trimWords($input.val()).slice(0, -1);
$input.val(words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator: ""));
}
else
$input.val("");
}
}
);
}
if (wasVisible)
// position cursor at end of input field
$.Autocompleter.Selection(input, input.value.length, input.value.length);
};
function receiveData(q, data){
if (data && data.length && hasFocus){
stopLoading();
select.display(data, q);
autoFill(q, data[0].value);
select.show();
} else{
hideResultsNow();
}
};
function request(term, success, failure){
if (!options.matchCase)
term = term.toLowerCase();
var data = cache.load(term);
// recieve the cached data
if (data && data.length){
success(term, data);
// if an AJAX url has been supplied, try loading the data now
} else if ((typeof options.url == "string") && (options.url.length > 0)){

var extraParams ={};

$.each(options.extraParams,
function(key, param){
extraParams[key] = typeof param == "function" ? param() : param;
});
if(options.jsonpCallback){
extraParams['callback'] = options.jsonpCallback;
/* define global function to handle callback */
window[options.jsonpCallback] = function(data){
var parsed = options.parse && options.parse(data) || parse(data);
cache.add(term, parsed);
success(term, parsed);
}
}
var dataType = options.jsonpCallback ? "script" : options.dataType;
onSuccess = options.jsonpCallback ? function(){} : function (data){
var parsed = options.parse && options.parse(data) || parse(data);
cache.add(term, parsed);
success(term, parsed);
}
$.ajax({
// try to leverage ajaxQueue plugin to abort previous requests
mode: "abort",
// limit abortion to this input
port: "autocomplete" + input.name,
dataType: dataType,
url: options.url,
data: $.extend({
q: lastWord(term),
limit: options.max
},
extraParams),
beforeSend: options.beforeSend,
complete: options.complete,
success: onSuccess
});
}else{
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
select.emptyList();
failure(term);
}
};
function parse(data){
var parsed = [];
var rows = data.split("\n");
for (var i = 0; i < rows.length; i++){
var row = $.trim(rows[i]);
if (row){
row = row.split("|");
parsed[parsed.length] ={
data: row,
value: row[0],
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
};
}
}
return parsed;
};
function stopLoading(){
$input.removeClass(options.loadingClass);
};
};
$.Autocompleter.defaults ={
inputClass: "ac_input",
resultsClass: "ac_results",
loadingClass: "ac_loading",
minChars: 1,
delay: 400,
beforeSend: function(){},
complete: function(){},
matchCase: false,
matchSubset: true,
matchContains: false,
cacheLength: 10,
max: 100,
mustMatch: false,
extraParams:{},
selectFirst: true,
formatItem: function(row){
return row[0];
},
formatMatch: null,
autoFill: false,
width: 0,
multiple: false,
multipleSeparator: ", ",
highlight: function(value, term){
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
},
scroll: true,
scrollHeight: 180
};
$.Autocompleter.Cache = function(options){
var data ={};
var length = 0;
function matchSubset(s, sub){
if (!options.matchCase)
s = s.toLowerCase();
var i = s.indexOf(sub);
if (i == -1) return false;
return i == 0 || options.matchContains;
};
function add(q, value){
if (length > options.cacheLength){
flush();
}
if (!data[q]){
length++;
}
data[q] = value;
}
function populate(){
if (!options.data) return false;
// track the matches
var stMatchSets ={},
nullData = 0;
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
if (!options.url) options.cacheLength = 1;
// track all options for minChars = 0
stMatchSets[""] = [];
// loop through the array and create a lookup structure
for (var i = 0, ol = options.data.length; i < ol; i++){
var rawValue = options.data[i];
// if rawValue is a string, make an array otherwise just reference the array
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
var value = options.formatMatch(rawValue, i + 1, options.data.length);
if (value === false)
continue;
var firstChar = value.charAt(0).toLowerCase();
// if no lookup array for this character exists, look it up now
if (!stMatchSets[firstChar])
stMatchSets[firstChar] = [];
// if the match is a string
var row ={
value: value,
data: rawValue,
result: options.formatResult && options.formatResult(rawValue) || value
};
// push the current match into the set list
stMatchSets[firstChar].push(row);
// keep track of minChars zero items
if (nullData++<options.max){
stMatchSets[""].push(row);
}
};
// add the data items to the cache
$.each(stMatchSets,
function(i, value){
// increase the cache size
options.cacheLength++;
// add to the cache
add(i, value);
});
}
// populate any existing data
setTimeout(populate, 25);
function flush(){
data ={};
length = 0;
}
return{
flush: flush,
add: add,
populate: populate,
load: function(q){
if (!options.cacheLength || !length)
return null;
/* 
* if dealing w/local data and matchContains than we must make sure
* to loop through all the data collections looking for matches
*/
if (!options.url && options.matchContains){
// track all matches
var csub = [];
// loop through all the data grids for matches
for (var k in data){
// don't search through the stMatchSets[""] (minChars: 0) cache
// this prevents duplicates
if (k.length > 0){
var c = data[k];
$.each(c,
function(i, x){
// if we've got a match, add it to the array
if (matchSubset(x.value, q)){
csub.push(x);
}
});
}
}
return csub;
} else
// if the exact item exists, use it
if (data[q]){
return data[q];
} else
if (options.matchSubset){
for (var i = q.length - 1; i >= options.minChars; i--){
var c = data[q.substr(0, i)];
if (c){
var csub = [];
$.each(c,
function(i, x){
if (matchSubset(x.value, q)){
csub[csub.length] = x;
}
});
return csub;
}
}
}
return null;
}
};
};
$.Autocompleter.Select = function(options, input, select, config){
var CLASSES ={
ACTIVE: "ac_over"
};
var listItems,
active = -1,
data,
term = "",
needsInit = true,
element,
list;
// Create results
function init(){
if (!needsInit)
return;
element = $("<div/>")
.hide()
.addClass(options.resultsClass)
.css("position", "absolute")
.appendTo(document.body);
list = $("<ul/>").appendTo(element).mouseover(function(event){
if (target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI'){
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
$(target(event)).addClass(CLASSES.ACTIVE);
}
}).click(function(event){
$(target(event)).addClass(CLASSES.ACTIVE);
select();
// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
input.focus();
return false;
}).mousedown(function(){
config.mouseDownOnSelect = true;
}).mouseup(function(){
config.mouseDownOnSelect = false;
});
if (options.width > 0)
element.css("width", options.width);
needsInit = false;
}
function target(event){
var element = event.target;
while (element && element.tagName != "LI")
element = element.parentNode;
// more fun with IE, sometimes event.target is empty, just ignore it then
if (!element)
return [];
return element;
}
function moveSelect(step){
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
movePosition(step);
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
if (options.scroll){
var offset = 0;
listItems.slice(0, active).each(function(){
offset += this.offsetHeight;
});
if ((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight){
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
} else if (offset < list.scrollTop()){
list.scrollTop(offset);
}
}
};
function movePosition(step){
active += step;
if (active < 0){
active = listItems.size() - 1;
} else if (active >= listItems.size()){
active = 0;
}
}
function limitNumberOfItems(available){
return options.max && options.max < available
? options.max
: available;
}
function fillList(){
list.empty();
var max = limitNumberOfItems(data.length);
for (var i = 0; i < max; i++){
if (!data[i])
continue;
var formatted = options.formatItem(data[i].data, i + 1, max, data[i].value, term);
if (formatted === false)
continue;
var li = $("<li/>").html(options.highlight(formatted, term)).addClass(i % 2 == 0 ? "ac_even": "ac_odd").appendTo(list)[0];
$.data(li, "ac_data", data[i]);
}
listItems = list.find("li");
if (options.selectFirst){
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
active = 0;
}
// apply bgiframe if available
if ($.fn.bgiframe)
list.bgiframe();
}
return{
display: function(d, q){
init();
data = d;
term = q;
fillList();
},
next: function(){
moveSelect(1);
},
prev: function(){
moveSelect( - 1);
},
pageUp: function(){
if (active != 0 && active - 8 < 0){
moveSelect( - active);
} else{
moveSelect( - 8);
}
},
pageDown: function(){
if (active != listItems.size() - 1 && active + 8 > listItems.size()){
moveSelect(listItems.size() - 1 - active);
} else{
moveSelect(8);
}
},
hide: function(){
element && element.hide();
listItems && listItems.removeClass(CLASSES.ACTIVE);
active = -1;
},
visible: function(){
return element && element.is(":visible");
},
current: function(){
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
},
show: function(){
var offset = $(input).offset();
element.css({
width: typeof options.width == "string" || options.width > 0 ? options.width: $(input).width(),
top: offset.top + input.offsetHeight + (options.offsetTop || 0),
left: offset.left + (options.offsetLeft || 0)
}).show();
if (options.scroll){
list.scrollTop(0);
list.css({
maxHeight: options.scrollHeight,
overflow: 'auto'
});
if ($.browser.msie && typeof document.body.style.maxHeight === "undefined"){
var listHeight = 0;
listItems.each(function(){
listHeight += this.offsetHeight;
});
var scrollbarsVisible = listHeight > options.scrollHeight;
list.css('height', scrollbarsVisible ? options.scrollHeight: listHeight);
if (!scrollbarsVisible){
// IE doesn't recalculate width when scrollbar disappears
listItems.width(list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")));
}
}
}
},
selected: function(){
/* var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);*/
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE);
return selected && selected.length && $.data(selected[0], "ac_data");
},
emptyList: function(){
list && list.empty();
},
unbind: function(){
element && element.remove();
}
};
};
$.Autocompleter.Selection = function(field, start, end){
if (field.createTextRange){
var selRange = field.createTextRange();
selRange.collapse(true);
selRange.moveStart("character", start);
selRange.moveEnd("character", end);
selRange.select();
} else if (field.setSelectionRange){
field.setSelectionRange(start, end);
} else{
if (field.selectionStart){
field.selectionStart = start;
field.selectionEnd = end;
}
}
field.focus();
};
})(jQuery);

(function($j){
$j.fn.jTruncate = function(options){
var defaults = {
length: 300,
minTrail: 20,
moreText: "Read Full Summary" + String.fromCharCode (187),
lessText: String.fromCharCode (171) + "Hide Full Summary" ,
ellipsisText: "...",
moreAni: "",
lessAni: ""
};
var options = $j.extend(defaults, options);
return this.each(function(){
obj = $j(this);
var body = obj.html();
if(body.length > options.length + options.minTrail){
var splitLocation = body.indexOf(' ', options.length);
if(splitLocation != -1){
// truncate tip
var splitLocation = body.indexOf(' ', options.length);
var str1 = body.substring(0, splitLocation);
var str2 = body.substring(splitLocation, body.length - 1);
obj.html(str1 + '<span class="truncate_ellipsis">' + options.ellipsisText + 
'</span>' + '<span class="truncate_more">' + str2 + '</span>');
obj.find('.truncate_more').css("display", "none");
// insert more link
obj.append(
' <a href="#" class="truncate_more_link">' + options.moreText +'</a>'
);
// set onclick event for more/less link
var moreLink = $j('.truncate_more_link', obj);
var moreContent = $j('.truncate_more', obj);
var ellipsis = $j('.truncate_ellipsis', obj);
moreLink.click(function(){
if(moreLink.text() == options.moreText){
moreContent.show(options.moreAni);
moreLink.text(options.lessText);
ellipsis.css("display", "none");
}else{
moreContent.hide(options.lessAni);
moreLink.text(options.moreText);
ellipsis.css("display", "inline");
}
return false;
});
}
} // end if
});
};
})(jQuery);

var $j = jQuery.noConflict();
$j.ajaxSetup({
'cache' : true
});
$j(document).ready(function(){
MTV.init();
});
MTV = new function(){
this.initArray = new Array();
var hat;
var theme;
this.init = function(){
MTV.Events.addLinkEvents();
MTV.Voting.init();
MTVN.Typeahead.init();
MTVN.Search.init();
for(var i=0; i<MTV.initArray.length; i++){
MTV.initArray[i]();
}
return true;
}
this.hatTrick = function(hatNumber){
if(hat != undefined) hatNumber = hat;
var total = 66;
var bodyTag = document.getElementsByTagName('body')[0];
var classList = bodyTag.className;
if (classList.indexOf("hat") > -1){
var tempClasses = new Array();
var classes = classList.split(" ");
var j = 0;
for(i = 0; i < classes.length; i++){
if(classes[i].substr(0,3) != "hat") tempClasses[j++] = classes[i];
}
classList = tempClasses.join(" ");
}
//if (!hatNumber) hatNumber = Math.floor(total*Math.random());
//var newHat = (hat) ? " " + hatNumber : " hat" + hatNumber;
var newHat = " defaultMiscBucket";
//bodyTag.className = classList + newHat + "";
bodyTag.className = classList + newHat + "";
}
this.setHat = function(h){
hat = h;
}
this.getHat = function(){
return hat;
}
this.setTheme = function(t){
theme = t;
}
this.getTheme = function(){
return theme;
}
this.renderHeader = function(path){
document.write("<script src='" + path + "'><\/script>");
}
};

/*yepnope1.0.1|WTFPL*/(function(a,b,c){function H(){var a=z;a.loader={load:G,i:0};return a}function G(a,b,c){var e=b=="c"?r:q;i=0,b=b||"j",u(a)?F(e,a,b,this.i++,d,c):(h.splice(this.i++,0,a),h.length==1&&E());return this}function F(a,c,d,g,j,l){function q(){!o&&A(n.readyState)&&(p.r=o=1,!i&&B(),n.onload=n.onreadystatechange=null,e(function(){m.removeChild(n)},0))}var n=b.createElement(a),o=0,p={t:d,s:c,e:l};n.src=n.data=c,!k&&(n.style.display="none"),n.width=n.height="0",a!="object"&&(n.type=d),n.onload=n.onreadystatechange=q,a=="img"?n.onerror=q:a=="script"&&(n.onerror=function(){p.e=p.r=1,E()}),h.splice(g,0,p),m.insertBefore(n,k?null:f),e(function(){o||(m.removeChild(n),p.r=p.e=o=1,B())},z.errorTimeout)}function E(){var a=h.shift();i=1,a?a.t?e(function(){a.t=="c"?D(a):C(a)},0):(a(),B()):i=0}function D(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css",!a.e&&(o||j)?function g(a){e(function(){if(!d)try{a.sheet.cssRules.length?(d=1,B()):g(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,e(function(){B()},0)):g(a)}},0)}(c):(c.onload=function(){d||(d=1,e(function(){B()},0))},a.e&&c.onload()),e(function(){d||(d=1,B())},z.errorTimeout),!a.e&&f.parentNode.insertBefore(c,f)}function C(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&A(c.readyState)&&(d=1,B(),c.onload=c.onreadystatechange=null)},e(function(){d||(d=1,B())},z.errorTimeout),a.e?c.onload():f.parentNode.insertBefore(c,f)}function B(){var a=1,b=-1;while(h.length- ++b)if(h[b].s&&!(a=h[b].r))break;a&&E()}function A(a){return!a||a=="loaded"||a=="complete"}var d=b.documentElement,e=a.setTimeout,f=b.getElementsByTagName("script")[0],g=({}).toString,h=[],i=0,j="MozAppearance"in d.style,k=j&&!!b.createRange().compareNode,l=j&&!k,m=k?d:f.parentNode,n=a.opera&&g.call(a.opera)=="[object Opera]",o="webkitAppearance"in d.style,p=o&&"async"in b.createElement("script"),q=j?"object":n||p?"img":"script",r=o?"img":q,s=Array.isArray||function(a){return g.call(a)=="[object Array]"},t=function(a){return typeof a=="object"},u=function(a){return typeof a=="string"},v=function(a){return g.call(a)=="[object Function]"},w=[],x={},y,z;z=function(a){function h(a,b){function i(a){if(u(a))g(a,f,b,0,c);else if(t(a))for(h in a)a.hasOwnProperty(h)&&g(a[h],f,b,h,c)}var c=!!a.test,d=c?a.yep:a.nope,e=a.load||a.both,f=a.callback,h;i(d),i(e),a.complete&&b.load(a.complete)}function g(a,b,d,e,g){var h=f(a),i=h.autoCallback;if(!h.bypass){b&&(b=v(b)?b:b[a]||b[e]||b[a.split("/").pop().split("?")[0]]);if(h.instead)return h.instead(a,b,d,e,g);d.load(h.url,h.forceCSS||!h.forceJS&&/css$/.test(h.url)?"c":c,h.noexec),(v(b)||v(i))&&d.load(function(){H(),b&&b(h.origUrl,g,e),i&&i(h.origUrl,g,e)})}}function f(a){var b=a.split("!"),c=w.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=x[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=w[h](f);return f}var b,d,e=this.yepnope.loader;if(u(a))g(a,0,e,0);else if(s(a))for(b=0;b<a.length;b++)d=a[b],u(d)?g(d,0,e,0):s(d)?z(d):t(d)&&h(d,e);else t(a)&&h(a,e)},z.addPrefix=function(a,b){x[a]=b},z.addFilter=function(a){w.push(a)},z.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",y=function(){b.removeEventListener("DOMContentLoaded",y,0),b.readyState="complete"},0)),a.yepnope=H()})(this,this.document);


	
	
	


		
   
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
   
     


//Device detection 
(function(){
	var _h = location.hostname;
	var _d = /^www./.test(_h) ? _h.substring(4) : _h;
	if(document.cookie.indexOf("btg_device=") == -1){
		document.cookie = "btg_device="
			+ "m:" + (+false)
			+ ",t:" + (+false)
			+ ";path=/; expires=" + (new Date("December 31, 2038")).toUTCString() 
			+ ";domain=" + _d;
	}
})();


//Including Coda 3 config from CODA/sites/mtv.com/config.js

if(typeof btg=='undefined')var btg = {};

btg.config={
version: '3',
defferedAdLoading: false,
enablePOE: false,
backwardCompatibility: true,
hasReporting: true,
hasAds: true,
hasAdsDFP: false,
requireCOPPACompliance: false,
Omniture:{
enabled: true,
account: (typeof com_mtvi_mtv2flag!="undefined"&&com_mtvi_mtv2flag==true?'viamtv,viamtv2onmtv':'viamtv'),
charSet: 'ISO-8859-1',
dynamicAccountSelection: 'true',
dynamicAccountList: 'devviamtv=mtv-d,mtv-q,mtv-jd,mtv-jq,mtvx-d,mtvx-jd',
linkInternalFilters: 'javascript:,mtv.com,mtvx.com,mtvn.com',
videoViewEventDisable: true,
enableTimeParting: true,
trackInlineStats: true,
defaultHier: 'hier2',
enableVisitorNamespace: false,
enableMtvnVisitorGuid: false,
enableMeteorPlugin: true,
enableGuidPlugin: true,
enableGuidAuxiliaryCall: true,
enableFirstPartyCookie: false,
tabletAccount: '',
timezone: '-5',
trackExternalLinks: 'true',
fluxCommunityId: ((typeof(ucidOverride) == "string")?ucidOverride:'D3FCFFFF0002D51D0002FFFFFCD3')
},
Nielsen:{
enabled: true,
cid: '',
videoCensusId: 'c02',
idSynchFreq: 'always'
},
QuantCast:{
enabled: true,
adsEnabled: true,
labels: 'MTVN Music and Logo Domestic,MTVN Music,MTVN Global Digital Proper,MTVN Global Digital Network,MTVN Digital Tribes,MTV Site,MTV plus Generation,MTV Digital,MTVN Music and Logo Global Network,MTVN Music and Logo Global Proper,MTVN Music and Logo Tribes',
reportMode: 'direct', 
enableDemoTargeting: true

},
ComScore:{
enabled: true,
c2: '6036034'
},
Meteor:{
enabled: false,
applicationId: '',
multiDomain: false
},
ChoiceStream:{
enabled: false,
apiKey: '04d9f3470c432938',
profileId: '1280552002.1191903563'
},
DoubleClick:{
enabled: true,
dartSite: ((typeof(is6x6DartOverride) == "string")?is6x6DartOverride:'mtv.mtvi'),
isInternational: false,
isUnobtrusive: false,
allowMobile: true,
enabledMobileAdDomain: false,
reloadableAds: false,
reloadAdInterval: 10000,
adUnit: '',
enableMobileNid: true
},
Freewheel:{
enabled:false,
adBlockerDetection: false
},
International:{
enabled: false,
dartSite: '',
region: ''
},
ABTest:{
enabled: true
},
Flux:{
enabled: true,
communityId: ((typeof(ucidOverride) == "string")?ucidOverride:'D3FCFFFF0002D51D0002FFFFFCD3')
},
FluxHosted:{
enabled: false
},
Photos:{
enabled: true
},
TestAndTarget:{
enabled: false,
videoAdBlockerTargetingEnabled: false,
globalMboxID: 'viamtv'
},
Criteo:{
enabled: true
},
Rubicon:{
enabled: false,
siteId: '17941',
zoneId: '61777'
},
Demdex:{
enabled: true
},
Recommendations:{
enabled: true
},
LocalAdvisory:{
enabled: false,
phase: 0,
useStaticCreative: false,
staticCreativeDomID: ''
},
Yieldex:{
enabled: true
},
OmnitureIntegrate:{
enabled: false,
account: ''
},
iOSAdSDK:{
useExternalBrowser: false
}
};	

//Including Coda version 3.
var btg=typeof btg==="object"?btg:{};btg.config=typeof btg.config==="object"?btg.config:{};btg.isCoreLoaded=false;btg.isDOMLoaded=false;
(function(c,d){var e=false,f=true,g=c.document,h=g.documentElement,i=g.addEventListener?"addEventListener":"attachEvent",n=g.addEventListener?"removeEventListener":"detachEvent",k=g.addEventListener?"":"on",l=function(f){if(f.type=="readystatechange"&&g.readyState!="complete")return;(f.type=="load"?c:g)[n](k+f.type,l,false);if(!e&&(e=true))d.call()},j=function(){try{h.doScroll("left")}catch(c){setTimeout(j,50);return}l("poll")};if(g.readyState=="complete")d.call();else{if(g.createEventObject&&h.doScroll){try{f=
!c.frameElement}catch(o){}if(f)j()}g[i](k+"DOMContentLoaded",l,false);g[i](k+"readystatechange",l,false);c[i](k+"load",l,false)}})(window,function(){btg.isDOMLoaded=true});
btg.DOM={Events:{addListener:function(c,d,e){if(d=="DOMContentLoaded"&&!c.addEventListener)document.onreadystatechange=function(){if(document.readyState=="complete")e()};else if(c.attachEvent)c.attachEvent("on"+d,e);else if(c.addEventListener)c.addEventListener(d,e,false);else c["on"+d]=e},removeListener:function(c,d,e){if(c.detachEvent)c.detachEvent("on"+d,e);else if(c.removeEventListener)c.removeEventListener(d,e,false);else c["on"+d]=null}},Storage:{set:function(c,d,e){var f=btg.String.isDefined,
g=btg.Object.isDefined;if(f(c)&&f(d))try{if(e!==true&&g(localStorage))localStorage[c]=d;else if(g(sessionStorage))sessionStorage[c]=d}catch(h){btg.Error.log("CODA Error: DOM storage not available!")}},get:function(c,d){var e;isStrDef=btg.String.isDefined,isObjDef=btg.Object.isDefined;if(isStrDef(c))try{if(d!==true&&isObjDef(localStorage)&&isStrDef(localStorage[c]))e=localStorage[c];else if(isObjDef(sessionStorage)&&isStrDef(sessionStorage[c]))e=sessionStorage[c]}catch(f){btg.Error.log("CODA Error: DOM storage not available!")}return e},
clear:function(c){var d=btg.Object.isDefined;try{if(c!==true&&d(localStorage))localStorage.clear();else if(d(sessionStorage))sessionStorage.clear()}catch(e){btg.Error.log("CODA Error: DOM storage not available!")}}},createIframe:function(c){for(var d=document.createElement("iframe"),e=["id","name","width","height","scrolling","frameBorder","marginHeight","marginWidth","noResize"],f=e.length,g=0;g<f;g++){var h=e[g],i=c[h];if(i){d[h]=i;d.setAttribute(h,i)}}return d},appendIframe:function(c){if(!c.src)return null;
if(!c.parent||c.parent.nodeType!==1)c.parent=document.body;if(typeof c.style!=="object")c.style={height:"1px",width:"1px",visibility:"hidden",position:"absolute",bottom:"0",left:"-1000px"};var d=this.createIframe(c);if(typeof c.onload==="function")d.onload=c.onload;this.applyStyle(d,c.style);try{c.parent.appendChild(d)}catch(e){new btg.Alert("Coda Implementation ERROR: 3P Demdex call failed. Please make sure that Coda is included within the document body.");btg.Error.log("Coda Implementation ERROR: 3P Demdex call failed. Please make sure that Coda is included within the document body.")}d.src=
c.src;return d},applyStyle:function(c,d){var e=btg.Object.isDefined;if(!e(d)||!e(c))return;e=btg.Object.toString(d,";",":");if(btg.globalvars.is_IE){if(!btg.String.isDefined(c.id))c.id="coda_iframe_"+(new Date).getTime();document.createStyleSheet().addRule("#"+c.id,e)}else c.setAttribute("style",e)},loadScript:function(c,d,e){if(btg.String.isDefined(c))try{var f=document.createElement("script");f.setAttribute("type","text/javascript");f.setAttribute("src",c);if(typeof e=="function")f.onload=f.onreadystatechange=
e;if(d)document.body.appendChild(f);else document.getElementsByTagName("head")[0].appendChild(f)}catch(g){}},loadScriptOnHead:function(c){if(btg.String.isDefined(c))try{var d=document.createElement("script");d.setAttribute("type","text/javascript");d.setAttribute("src",c);document.getElementsByTagName("head")[0].appendChild(d)}catch(e){}},getStyle:function(c,d){var e=null,f=btg.Object.isDefined;try{if(f(c)&&btg.String.isDefined(d))if(f(document.defaultView)&&typeof document.defaultView.getComputedStyle==
"function")e=document.defaultView.getComputedStyle(c,null)[d];else if(typeof window.getComputedStyle=="function")e=window.getComputedStyle(c,null)[d];else if(f(c.currentStyle))e=c.currentStyle[d];else e=c.style[d]}catch(g){return e}return e},getContentVisibleHeight:function(){return parseInt(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0)},getOffsetTop:function(c){var d=0,e=btg.Object.isDefined;try{if(e(c)&&btg.Object.isFunction(c.getBoundingClientRect)){var f=
c.getBoundingClientRect();if(e(f)&&!isNaN(f.top))d=parseInt(f.top)}}catch(g){btg.Error.log("CODA: btg.DOM.getOffsetTop Error: "+g);return d}return d}};
btg.Cookie={read:function(c){for(var c=c+"=",d=document.cookie.split(";"),e=0,f=d.length;e<f;e++){for(var g=d[e];g.charAt(0)==" ";)g=g.substring(1,g.length);if(g.indexOf(c)==0)return unescape(g.substring(c.length,g.length))}return null},set:function(c,d,e,f,g){c=c+"="+escape(d)+"; path=/";if(e)c+=";expires="+e;if(!g)g=this.getCookieAutoDomain();if(g!="localhost")c+=";domain="+g;c+=";path="+(f?f:"/");document.cookie=c},remove:function(c,d,e){c=c+"=";if(!e)e=this.getCookieAutoDomain();if(e!="localhost")c+=
";domain="+e;c+=";path="+(d?d:"/");c+=";expires=Thu, 01-Jan-1970 00:00:01 GMT";document.cookie=c},getCookieAutoDomain:function(){var c=document.domain.split("."),d=c.length,e=d>2?c[d-2]+"."+c[d-1]:document.domain;if(d>=3&&btg.globalvars.TWOPART_TLDS.match(e)!=null)e=c[d-3]+"."+c[d-2]+"."+c[d-1];return e}};
btg.Object={isDefined:function(c){if(typeof c=="object"&&c!==null)return true;else return false},isArray:function(c){return btg.Object.isDefined(c)&&btg.Number.isInt(c.length)},toString:function(c,d,e,f){if(!d)d=",";if(!e)e="=";var g=[],h;for(h in c){if(!c.hasOwnProperty(h)||f&&!btg.String.isDefined(c[h]))continue;g.push(h+e+c[h])}return g.join(d)},copyProperties:function(c,d,e){if(btg.Object.isDefined(c)&&btg.Object.isDefined(d))for(var f in c)if(typeof d[f]!="undefined"){if(e)d[f]=c[f]}else d[f]=
c[f]},isConfigDefined:function(c){if(typeof c=="object"&&c!==null&&c.enabled==true)return true;else return false},isFunction:function(c){return typeof c==="function"},isEmptyObject:function(c){var d=true;if(typeof c==="object"&&c){for(var e in c)if(c.hasOwnProperty(e)){d=false;break}return d}}};
btg.String={isDefined:function(c){if(typeof c!=="string"||typeof c==="undefined"||c===null||c=="")return false;else return true},random:function(c){for(var d="",c=c?c:8,e=0;e<c;e++){var f=Math.floor(Math.random()*"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".length);d+="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".substring(f,f+1)}return d},createUUID:function(){for(var c=[],d=0;d<36;d++)c[d]=btg.Math.random(0,15).toString(16);c[14]=4;c[19]=["8","9","a","b"][btg.Math.random(0,3)];
c[8]=c[13]=c[18]=c[23]="-";return c=c.join("")},toObject:function(c,d,e){for(var e=e?e:"=",c=c.split(d?d:","),d={},f=0,g=c.length;f<g;f++){var h=c[f].split(e);d[h[0]]=h[1]}return d},queryStringToObject:function(c){c=c.indexOf("?")>-1?c.split("?")[1]:c;return btg.String.toObject(c,"&")},stripFileExtension:function(c){var d=c.lastIndexOf(".");if(d>0)return c.substring(0,d);else return c},charLtrim:function(c,d){if(c.indexOf(d)==0)c=c.substring(1);return c},charRtrim:function(c,d){var e=c.lastIndexOf(d),
f=c.length;if(e==f-1)c=c.substring(0,f-1);return c},charTrim:function(c,d){c=btg.String.charLtrim(c,d);return c=btg.String.charRtrim(c,d)},isMockupMode:function(){var c=false,d=this.queryStringToObject((btg.globalvars.IS_TOP_ACCESSIBLE?top:self).location.search);if(d.mockupMode&&d.mockupMode=="true")c=true;return c},mockItUp:function(c){c=c.replace(/[<]/g,"&lt;");return c=c.replace(/[>]/g,"&gt;")},getFileName:function(c){c=btg.String.isDefined(c)?c:"";return c=c.substring(c.lastIndexOf("/")+1)},getBetween:function(c,
d,e){var f="";if(btg.String.isDefined(c)){if(btg.String.isDefined(d)){var g=c.indexOf(d);if(g>=0)f=c.substring(g+d.length)}if(btg.String.isDefined(e)){c=f.indexOf(e);if(c>=0)f=f.substring(0,c)}}return f},encode:function(c,d){if(btg.String.isDefined(c))c=d?escape(c):encodeURIComponent(c);return c},decode:function(c,d){if(btg.String.isDefined(c))c=d?unescape(c):decodeURIComponent(c);return c},append:function(c,d,e){if(!e)e=",";d=d.split(e);d.push(c);return d.join(e)}};
btg.Number={isInt:function(c,d){if(!d)d=10;return parseInt(c,d)==c}};btg.Error={log:function(c){try{if(typeof console==="object"&&console.log&&btg.String.isDefined(c))console.log(c)}catch(d){}}};
(function(c){var d;try{d=typeof top.location.search!="undefined"&&typeof top.location.search!="unknown"}catch(e){d=false}var f=function(){try{var c="",c=self.location.pathname;if(c=="")c="/";return c}catch(d){}}();var g;try{g=location.href.toLowerCase().indexOf("/api/jsunittest/tests/")!=-1}catch(h){g=false}c.globalvars={VISITOR_NAMESPACE:"mtvn",IS_CODA_ADS_USED:false,MODULES_URL:"//btg.mtvnservices.com/aria/mods.html",INFINITE_COOKIE_EXPY:"Thu, 31-Dec-2038 11:59:59 GMT",FW_BLOCKED:false,IS_TOP_ACCESSIBLE:d,
PAGE_URL:f,IS_UNIT_TEST:g,FORCE_AD_WAIT_TIME:{PLAYER_LOADED:1E4,PLAYER_FAILED:1E4,PLAYER_LOAD_WAIT_TIME:1E4},VALID_DCOPT:["ist"],is_Chrome:false,is_Firefox:false,is_IE:false,is_Safari:false,is_iOS:false,NETWORKIDS:{DCLK_DOMESTIC_NID:"N1303",DCLK_DOMESTIC_NID_TEST:"N400129",DCLK_INTL_EMEA_NID:"N4570",DCLK_INTL_APAC_NID:"N4687",DCLK_INTL_EMEA_NID_TEST:"N308350",DCLK_INTL_APAC_NID_TEST:"N378645",DCLK_INTL_NID_MOBILE:"N7869",DCLK_INTL_NID_MOBILE_TEST:"N7869"},REGION_EMEA:"EMEA",REGION_APAC:"APAC",TWOPART_TLDS:"com.br,co.uk,co.hu,co.il,com.tr,com.pl,com.ru,co.kr,com.au,co.nz,com.tw"}})(btg);
(function(c){c.loadLocalConfig=function(){if(typeof c.config!="undefined"&&typeof c.config!="undefined")c.Object.copyProperties(c.config,this.config,true);if(typeof MTVN!="undefined"&&typeof MTVN.config!="undefined"&&typeof MTVN.config.btg!="undefined")for(b in MTVN.config.btg){if(!MTVN.config.btg.hasOwnProperty(b))continue;if(typeof MTVN.config.btg[b]==="object")c.Object.copyProperties(MTVN.config.btg[b],this.config[b],true);else this.config[b]=MTVN.config.btg[b]}if(typeof mtvn!="undefined"&&typeof mtvn.btg!=
"undefined"&&typeof mtvn.btg.config!="undefined"){if(typeof mtvn.btg.config.ReportSettings!="undefined")for(r in mtvn.btg.config.ReportSettings){if(!mtvn.btg.config.ReportSettings.hasOwnProperty(r))continue;if(typeof mtvn.btg.config.ReportSettings[r]==="object")c.Object.copyProperties(mtvn.btg.config.ReportSettings[r],this.config[r],true);else this.config[r]=mtvn.btg.config.ReportSettings[r]}if(typeof mtvn.btg.config.AdSettings!="undefined"){for(a in mtvn.btg.config.AdSettings){if(!mtvn.btg.config.AdSettings.hasOwnProperty(a))continue;
if(typeof mtvn.btg.config.AdSettings[a]==="object")c.Object.copyProperties(mtvn.btg.config.AdSettings[a],this.config[a],true);else this.config[a]=mtvn.btg.config.AdSettings[a]}if(typeof mtvn.btg.config.AdSettings.reloadableAds=="boolean")this.config.DoubleClick.reloadableAds=mtvn.btg.config.AdSettings.reloadableAds;if(typeof mtvn.btg.config.AdSettings.reloadInterval=="number")this.config.DoubleClick.reloadInterval=mtvn.btg.config.AdSettings.reloadInterval}}if(typeof com!="undefined"&&typeof com.mtvi!=
"undefined"&&typeof com.mtvi.reporting!="undefined"&&typeof com.mtvi.reporting.Account!="undefined"){if(typeof this.config.Omniture=="undefined")this.config.Omniture={enabled:true};this.config.Omniture.account=com.mtvi.reporting.Account.name;this.config.Omniture.dynamicAccountSelection=com.mtvi.reporting.Account.dynamic;this.config.Omniture.dynamicAccountList=com.mtvi.reporting.Account.list;this.config.Omniture.indexFileName=com.mtvi.reporting.Account.defaultIndexFileName;this.config.Omniture.linkInternalFilters=
com.mtvi.reporting.Account.filters;if(typeof com.mtvi.reporting.Account.dartSite!="undefined"){this.config.DoubleClick.enabled=true;this.config.DoubleClick.dartSite=com.mtvi.reporting.Account.dartSite}}}})(btg);
btg.Environment=new function(){var c=btg.String.isDefined;this.userAgent=function(d){var e=window.navigator.userAgent.replace(/\;|\(|\)|\,/gi,""),f={browser:"",device:"Desktop",os:""};if(/Chrome/.test(e)){f.browser="Chrome";d.globalvars.is_Chrome=true}else if(/Firefox/.test(e)){f.browser="Firefox";d.globalvars.is_Firefox=true}else if(/MSIE/.test(e)){f.browser="MSIE";d.globalvars.is_IE=true}else if(/Safari/.test(e)){f.browser="Safari";d.globalvars.is_Safari=true}else if(/Opera/.test(e))f.browser="Opera";
if(/Windows/.test(e))f.os="Windows";else if(/Macintosh/.test(e))f.os="Macintosh";else if(/Linux/.test(e))f.os="Linux";else if(/Unix/.test(e))f.os="Unix";if(/iPad/.test(e)){f.device="iPad";d.globalvars.is_iOS=true}else if(/iPod/.test(e)){f.device="iPod";d.globalvars.is_iOS=true}else if(/iPhone/.test(e)&&!/iPod/.test(e)){f.device="iPhone";d.globalvars.is_iOS=true}e=d.Cookie.read("btg_device");f.isMobile=false;f.isTablet=false;if(c(e)){device=d.String.toObject(e,",",":");if(c(device.m)&&device.m=="1"||
/^m\./.test(location.hostname))f.isMobile=true;else if(c(device.t)&&device.t=="1")f.isTablet=true}return f}(btg);this.getPlatform=function(){return this.userAgent.device};this.getCnamedDomain=function(){var c=location.hostname,e="",e=new RegExp(/[A-z0-9\-]*\.\bco\...\b|[A-z0-9\-]*\.uol\.\bcom\...\b|[A-z0-9\-]*\.\bcom\...\b|[A-z0-9\-]*\.\bcom\b|[A-z0-9\-]*\...$/);if(c.match(e)){m=e.exec(c);e="sc."+c.substr(m.index)}else e="sc."+c;return e};this.getRootDomain=function(){var c=location.hostname,e=new RegExp(/[A-z0-9\-]*\.\bco\...\b|[A-z0-9\-]*\.uol\.\bcom\...\b|[A-z0-9\-]*\.\bcom\...\b|[A-z0-9\-]*\.\bcom\b|[A-z0-9\-]*\...$/);
if(e.test(c)){m=e.exec(c);return c.substr(m.index)}else return c};this.isMobile=function(){var c=false;if(btg.Cookie.read("ak-mobile-detected")==="yes")c=true;return c};this.getDeviceType=function(){var c=btg.Cookie.read("ak-device-type");if(c)return c;else return false}};
btg.Controller=new function(){var c=btg.globalvars,d=false,e=false,f=false,g="";this.hasReporting=function(){return btg.config.hasReporting&&typeof btg.ReportingManager!="undefined"};this.hasAds=function(){return btg.config.hasAds&&typeof btg.AdManager!="undefined"};this.hasTnT=function(){return btg.Object.isDefined(btg.TestAndTarget)&&btg.config.TestAndTarget.enabled};this.init=function(){btg.loadLocalConfig();if(btg.config.requireCOPPACompliance==true){btg.config.Demdex.enabled=false;btg.config.Criteo.enabled=
false;btg.config.QuantCast.enabled=false;btg.config.Meteor.enabled=false;btg.config.Omniture.enableMeteorPlugin=false;btg.config.Omniture.enableGuidPlugin=false;btg.config.Omniture.enableGuidAuxiliaryCall=false}if(btg.config.Omniture.enableGuidPlugin==false)btg.Cookie.remove("vmn_uuid");d=this.hasReporting();e=this.hasAds();hasTnT=this.hasTnT();if(btg.Object.isConfigDefined(btg.config.Freewheel)&&btg.config.Freewheel.adBlockerDetection)new btg.Ajax({xDomain:true,autoSend:true,onerror:function(){btg.globalvars.FW_BLOCKED=
true},onload:function(){btg.globalvars.FW_BLOCKED=false},url:location.protocol+"//adm.fwmrm.net/crossdomain.xml"});c.IS_LIVE_ENV=function(){var d=true;try{if(btg.String.isDefined(btg.config.Omniture.dynamicAccountList)){var e=btg.config.Omniture.dynamicAccountList,f=e.indexOf("=");if(f>-1){var e=e.substring(f+1),e=e.split(","),g=self.location.hostname;if(c.IS_TOP_ACCESSIBLE)g=top.location.hostname;for(var f=0,l=e.length;f<l;f++)if(g.indexOf(e[f])>-1){d=false;break}}}}catch(j){}return d}();g=typeof c.PAGE_URL==
"string"&&c.PAGE_URL!=""?c.PAGE_URL:location.pathname;if(g.charAt(g.length-1)=="/")g+=typeof btg.config.indexFileName=="string"?btg.config.indexFileName:"index";btg.config._defaultPageName=g;if(d)btg.ReportingManager.init();if(e)btg.AdManager.init();if(hasTnT)btg.TestAndTarget.init();this.init=function(){btg.loadLocalConfig();return this};return this};this.gameInit=function(){if(btg.config)btg.ReportingManager.init();if(btg.config)btg.AdManager.init();if(!f&&com.mtvnet.games.GameSettings){btg.GameReportingManager.init();
btg.GameAdManager.init();f=true}return true};this.loadGame=function(c){if(f){btg.GameAdManager.loadGame(c);btg.GameReportingManager.gameLoad(c)}};this.sendPageCall=function(c){this.init();if(d){if(typeof c=="undefined"||!c)c={};btg.ReportingManager.sendPageCall(c);btg.ReportingManager.getData()}};this.sendLinkEvent=function(c){this.init();if(d){if(typeof c=="undefined"||!c)c={};btg.ReportingManager.sendLinkEvent(c)}};this.placeAd=function(c){this.init();if(e)return btg.AdManager.placeAd(c)};this.reloadAds=
function(){if(e){btg.AdManager.reloadAll();return this}};this.placeIFrameAd=function(c,d){this.init();btg.AdManager.placeIFrameAd(c,d)};this.getAdUrl=function(c){this.init();if(e)return btg.AdManager.getAdUrl(c)};this.getVersion=function(){return btg.config.version};this.getFullVersion=function(){return btg.config.fullVersion?btg.config.fullVersion:btg.config.version};this.createMboxes=function(){};this.setChoiceStreamRequest=function(c,e){if(d)btg.ReportingManager.setChoiceStreamRequest(c,e)}};
btg.Beacon=function(c){this.url=c;this.data=null};btg.Beacon.prototype={setData:function(c){this.data=btg.Object.toString(c,"&")},formatSrc:function(){if(this.data)if(this.url.indexOf("?")>-1)this.url+="&"+this.data;else this.url+="?"+this.data;return this.url},send:function(){var c=new Image(1,1);c.src=this.formatSrc();c.onload=function(){};c.onabort=function(){};c.onerror=function(){}}};btg.Alert=function(){};
btg.Events=new function(){var c=function(){this.callbacks=[];this.subscribe=function(c){if(typeof c=="function")this.callbacks[this.callbacks.length]=c};this.remove=function(c){for(var e=0,f=this.callbacks.length;e<f;e++)if(this.callbacks[e]==c)delete this.callbacks[e]};this.fire=function(){for(var c=0,e=this.callbacks.length;c<e;c++)try{if(typeof this.callbacks[c]=="function")this.callbacks[c].apply(this,arguments)}catch(f){new btg.Alert('An event callback has failed. "'+f.number+": "+f.message+
'".')}}};this.add=function(d){this[d]=new c;return this};this.CORE_LOADED=new c;this.flipBookView=new c;this.adLoaded=new c;this.AD_LOAD=new c;this.Player_Freewheel_failsafe=new c;this.ABTest_Group_Assigned=new c;this.ON_GAME_CONFIG_LOADED=new c;this.ON_GAME_LOAD=new c;this.ON_GAME_PLAY=new c;this.ON_GAME_LEVELSTART=new c;this.DEMDEX_RESPONSE=new c};
btg.JSON=function(){function c(c){return c<10?"0"+c:c}function d(c,g){var h,i,n,k;h=/["\\\x00-\x1f\x7f-\x9f]/g;var l;switch(typeof c){case "string":return h.test(c)?'"'+c.replace(h,function(c){var d=e[c];if(d)return d;d=c.charCodeAt();return"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16)})+'"':'"'+c+'"';case "number":return isFinite(c)?String(c):"null";case "boolean":case "null":return String(c);case "object":if(!c)return"null";if(typeof c.toJSON==="function")return d(c.toJSON());h=[];if(typeof c.length===
"number"&&!c.propertyIsEnumerable("length")){k=c.length;for(i=0;i<k;i+=1)h.push(d(c[i],g)||"null");return"["+h.join(",")+"]"}if(g){k=g.length;for(i=0;i<k;i+=1){n=g[i];if(typeof n==="string")if(l=d(c[n],g))h.push(d(n)+":"+l)}}else for(n in c)if(typeof n==="string")if(l=d(c[n],g))h.push(d(n)+":"+l);return"{"+h.join(",")+"}"}}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+c(this.getUTCMonth()+1)+"-"+c(this.getUTCDate())+"T"+c(this.getUTCHours())+":"+c(this.getUTCMinutes())+":"+c(this.getUTCSeconds())+
"Z"};var e={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return{stringify:d,parse:function(c,d){function e(c,f){var i,j;if(f&&typeof f==="object")for(i in f)if(Object.prototype.hasOwnProperty.apply(f,[i])){j=e(i,f[i]);if(j!==undefined)f[i]=j}return d(c,f)}var i;if(/^[\],:{}\s]*$/.test(c.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){i=eval("("+c+")");return typeof d===
"function"?e("",i):i}throw new SyntaxError("parseJSON");}}}();btg.Math={random:function(){var c,d;if(arguments.length>1){c=arguments[0];d=arguments[1]}else{c=0;d=arguments[0]}return Math.floor(Math.random()*(d-c+1)+c)}};
btg.Sections={getAdSections:function(){var c=btg.config,d=self.location.pathname;if(d=="")d="/";if(d.lastIndexOf("/")==d.length-1)d+=btg.Object.isDefined(c)&&btg.String.isDefined(c.defaultIndexFileName)?c.defaultIndexFileName:"index";if(d!="/"&&d.indexOf("/")==0)d=d.substring(1);return d},getReportingSections:function(){return self.location.pathname}};
btg.Window={getNodeLinkName:function(c){for(var d=null,e=0,f=c.childNodes.length;e<f;e++){var g=c.childNodes[e];switch(g.nodeType){case 3:d=g.nodeValue;break;case 1:if(c.attributes.title&&c.attributes.title.nodeValue!="")d=c.attributes.title.nodeValue;else if(c.attributes.alt&&c.attributes.alt.nodeValue!="")d=c.attributes.alt.nodeValue}}return d},debug:function(c){var d=document.getElementById("debug");if(!d){d=document.createElement("div");d.setAttribute("id","debug");document.getElementsByTagName("body")[0].appendChild(d)}d.innerHTML=
d.innerHTML+c+"<br>"}};
btg.Class={inheritFrom:function(c,d){function e(){if(arguments.length>0&&typeof c==="function")c.apply(this,arguments)}if(typeof c==="function"||typeof c==="object")if(typeof d==="function"||typeof d==="object"){var f=d.prototype;d.prototype=typeof c==="function"?new c:c;for(var g in f)d.prototype[g]=f[g];d.prototype.constructor=d;e.prototype=typeof d==="function"?new d:d;e.prototype.constructor=e}else{e.prototype=typeof c==="function"?new c:c;e.prototype.constructor=e}else btg.Error.log("Coda ERROR: btg.Class.inheritFrom(a_superClass,a_subClass) requires at least a_superClass argument!");return e}};
btg.Timer=function(c,d){this.id=c;this.isRunning=false;this.currentCount=0;this.milliseconds=d?d:100;this.intervalId=null;this.listeners=[]};
btg.Timer.prototype={on:function(c,d){if(typeof d=="function")this.listeners[c]=d},execListener:function(c){if(typeof this.listeners[c]=="function")this.listeners[c]()},start:function(){if(!this.isRunning){this.isRunning=true;this.intervalId=setInterval(this.id+".count()",this.milliseconds)}},count:function(){this.currentCount=this.currentCount+this.milliseconds;this.execListener("count")},stop:function(){clearInterval(this.intervalId);this.isRunning=false},reset:function(){this.stop();this.currentCount=
0;this.start()}};
btg.TimeTracker=function(c){var d=btg.String.isDefined,e=btg.Cookie,f="",g=null,h=d(c)?c:"";this.init=function(){g=(new Date).getTime();btg.DOM.Events.addListener(window,"unload",this.saveTimeSpent);return true};this.setData=function(c){if(d(c))f=c};this.getTimeSpentOnPage=function(){var c="",c=(new Date).getTime(),c=Math.round((c-g)/100);if(c<1)c="";g=(new Date).getTime();return c};this.saveTimeSpent=function(){if(d(h)){var c=(new Date).getTime(),c=Math.round((c-g)/100);if(c<1)c=1;c=c;c+=d(f)?","+
f:"";e.set(h,c)}};this.getTimespent=function(){if(d(h)){var c=e.read(h);e.remove(h);g=(new Date).getTime();return d(c)?c:""}}};
btg.Ajax=function(c){var d=btg.Object.isDefined(c)?c:{};d.method=btg.String.isDefined(d.method)?d.method:"GET";var e;if(d.xDomain===true){var f,g=document.head||document.getElementsByTagName("head")[0]||document.documentElement;this.sendRequest=function(){if(!btg.String.isDefined(d.url)){btg.Error.log("Coda ERROR: Ajax request URL not specified!");return"[ERROR: Ajax request URL not specified!]"}f=document.createElement("script");f.async=true;if(btg.String.isDefined(d.scriptCharset))f.charset=d.scriptCharset;
f.src=d.url;f.onload=function(){if(typeof d.onload=="function")d.onload(d);if(f.parentNode)f.parentNode.removeChild(f);f=null};f.onerror=function(){if(typeof d.onerror=="function")d.onerror(d);if(f.parentNode)f.parentNode.removeChild(f);f=null};try{g.insertBefore(f,g.firstChild)}catch(c){if(typeof d.onFail=="function"){d.error=c;d.fail=true;d.onFail(d)}return false}}}else{if(window.XMLHttpRequest)e=new XMLHttpRequest;else e=new ActiveXObject("Microsoft.XMLHTTP");this.sendRequest=function(){if(!btg.String.isDefined(d.url)){btg.Error.log("Coda ERROR: Ajax request URL not specified!");
return"[ERROR: Ajax request URL not specified!]"}e.onreadystatechange=function(){if(e.readyState==4){d.responseText=e.responseText;d.responseXML=e.responseXML;if(e.status==404){if(typeof d.on404=="function")d.on404(d)}else if(typeof d.onSuccess=="function"){d.success=true;d.onSuccess(d)}}};try{e.open(d.method,d.url,true);e.send();return true}catch(c){if(typeof d.onFail=="function"){d.error=c;d.fail=true;d.onFail(d)}return false}}}if(d.autoSend===true)this.sendRequest()};
(function(c){var d=["demdexcall","demdexfwsegment","uuid","usersegment","ad","trackingserver"],e=function(e){var g=e.data,h,i;if(g){if(typeof g!="object"||g==null)try{g=btg.JSON.parse(g)}catch(n){return}h=g.type;i=g.value}if(h&&d.join().indexOf(h)!=-1)switch(h){case d[0]:e={};g=0;for(h=i.length;g<h;g++){var k=i[g].split("=");e[k[0]]=k[1]}btg.Demdex.sendPageCall(e);break;case d[1]:g={type:d[1],value:btg.Demdex.getFWSegment()};if(g.value)e.source.postMessage(btg.JSON.stringify(g),"*");break;case d[2]:g=
{type:d[2],value:btg.Cookie.read("vmn_uuid")};if(g.value)e.source.postMessage(btg.JSON.stringify(g),"*");break;case d[3]:g={type:d[3],value:btg.Cookie.read("mtvn_btg_userSegments")};if(g.value)e.source.postMessage(btg.JSON.stringify(g),"*");case d[4]:i=i;if(btg.String.isDefined(i.fn)){var k=i.fn.split("."),l=k.pop(),j=c,g=0;for(h=k.length;g<h;g++)j=j[k[g]];j[l].call(this,i.args)}case d[5]:if(btg.globalvars.is_iOS||btg.config.Omniture.enableFirstPartyCookie){g={type:d[5],value:btg.Environment.getCnamedDomain()};
e.source.postMessage(btg.JSON.stringify(g),"*")}}};if(typeof c.addEventListener!=="undefined")c.addEventListener("message",e,false);else if(typeof c.attachEvent!=="undefined")c.attachEvent("onmessage",e)})(window);
(function(c){c.Singleton=function(d){var e=function(c){if(typeof c==="function")return new c;return c},f=e(d.__implement),g=e(d.__extend),d=e(d.__construct),h;for(h in g)if(g.hasOwnProperty(h))if(!d[h])d[h]=g[h];for(h in f)if(f.hasOwnProperty(h))if(!d[h])c.Error.log(sub.instance+" must implement '"+h+"' "+typeof f[h]);if(typeof d.init==="function")d.init();return d}})(btg);
btg.DependencyManager=function(c){var d=btg.config,e=c?c:8E3,f=false,g=[],h=[];this.add=function(c,d,g,l){if(typeof c=="undefined"||typeof d=="undefined")return false;for(var j=0,o=h.length;j<o;j++)if(h[j].flagname==c)return false;h[h.length]={flagname:c,callback:d,interval:g?g:100};if(!f){f=true;window.setTimeout(this.sendCalls,e)}if(l)this.checkDependency(c);return true};this.remove=function(c){if(typeof c=="string"&&c!="")for(var d=0,e=h.length;d<e;d++)if(h[d].flagname==c){h.splice(d,1);break}if(!this.hasDependency())this.sendCalls()};
this.checkDependency=function(c){for(var d=null,e=0,f=h.length;e<f;e++)if(h[e].flagname==c)d=h[e];if(!d)return false;if(d.callback.apply())this.remove(c);else{var g=this;window.setTimeout(function(){g.checkDependency(c)},d.interval)}};this.hasDependency=function(c){if(btg.String.isDefined(c)){for(var d=h.length,e=0;e<d;e++)if(h[e].flagname==c)return true;return false}return h.length>=1};this.addToCallQueue=function(c,e){if(!e)return false;for(var f=new Array,h=2,j=arguments.length;h<j;h++)f.push(arguments[h]);
g[g.length]={context:c?c:this,callback:e,args:f,config:d};return true};this.sendCalls=function(){h=[];for(var c=d,e=0,f=g.length;e<f;e++){d=g[e].config;g[e].callback.apply(g[e].context,g[e].args)}d=c;g=[]}};
btg.PluginManager=function(c){for(var d=new Array,e=1,f=arguments.length;e<f;e++)d.push(arguments[e]);e=0;for(f=c.length;e<f;e++)if(btg.Object.isDefined(c[e])&&typeof c[e].init=="function")c[e].init.apply(this,d);this.run=function(d){for(var e=0,f=c.length;e<f;e++)if(btg.Object.isDefined(c[e])&&typeof c[e].run=="function")d=c[e].run(d);return d}};
btg.QueueManager=function(c){this.id=c.id;this.timeToWait=!isNaN(c.timeToWait)?c.timeToWait:1;this.handler=typeof c.handler=="function"?c.handler:function(){};this.notificationHandler=typeof c.notificationHandler=="function"?c.notificationHandler:function(){};this.intervalId=null;this.isProcessing=false;this.queue=[];this.processedQueue=[];this.maxNumItems=c.maxNumItems;this.maxElapsed=c.maxElapsed;this.itemsAdded=this.totalItems=this.elapsed=0};
btg.QueueManager.prototype={init:function(){this.isProcessing=true;this.processQueue();this.intervalId=setInterval(this.id+".processQueue()",this.timeToWait)},addToQueue:function(){this.queue.push(arguments);this.itemsAdded++;if(!this.isProcessing)this.init()},processQueue:function(){if(this.isProcessing==true)if(this.queue.length>0){var c=this.queue.shift();this.elapsed=this.elapsed+this.timeToWait;this.totalItems++;if(!this.hasLimit()){this.handler(c);this.processedQueue.push(c)}else{this.notificationHandler(this);
this.clearQueue();this.stop()}}else this.stop()},stop:function(){clearInterval(this.intervalId);this.isProcessing=false;this.itemsAdded=this.totalItems=this.elapsed=0},hasLimit:function(){return this.elapsed==this.maxElapsed||this.totalItems>this.maxNumItems},clearQueue:function(){this.queue=[];this.processedQueue=[]}};
btg.GUID=new function(){var c=null,d=null,e=function(){var c=btg.Cookie.read("vmn_uuid");if(typeof c=="string")d=c;return typeof d=="string"&&d!=""},f=function(){var c=btg.Cookie.read("vmn_3pc");return typeof c=="string"&&c!=""},g=function(){return typeof btg.config.Omniture.enableGuidPlugin=="boolean"&&btg.config.Omniture.enableGuidPlugin};this.isGUIDReported=false;this.hasGUIDCookie=function(){return e()};this.get3pcCookie=function(){var c=btg.Cookie.read("vmn_3pc");return!btg.String.isDefined(c)?
null:c};this.init=function(d){if(!g())return false;c=d;if(typeof c.guidIdVarMap=="undefined")c.guidIdVarMap=["eVar57"];if(typeof c.guidIdVarMap=="string")c.guidIdVarMap=c.guidIdVarMap.split(",");return true};this.run=function(f){if(!g())return f;if(!e()){new btg.Alert("Failed to find the UUID value.");return f}for(var h=0,i=c.guidIdVarMap.length;h<i;h++)f[c.guidIdVarMap[h]]=d;this.isGUIDReported=true;return f};this.guidScript=function(){var c=btg.GUID;btg.Controller.init();if(c.hasGUIDCookie()&&!c.isGUIDReported){c.sendLinkEventCall();
return c.isGUIDReported=true}return false};this.sendLinkEventCall=function(){var c={linkName:"GUID reporting",linkType:"o"};if(g()){btg.Controller.sendLinkEvent(c);if(btg.Object.isConfigDefined(btg.config.Demdex)&&btg.Demdex)btg.Demdex.sendPageCall(c)}};if(g())try{var h=location.protocol+"//btg.mtvnservices.com/aria/uuid.html?c="+btg.Math.random(9999999999);if(!e()||!f())btg.DOM.loadScript(h)}catch(i){}else{btg.Cookie.set("vmn_uuid","EMPTY","Thu, 01-Jan-70 00:00:01 GMT;");btg.Cookie.set("mtvn_guid",
"EMPTY","Thu, 01-Jan-70 00:00:01 GMT;");btg.DOM.loadScript("http://btg.mtvnservices.com/aria/uuid.html?delete=1&c="+btg.Math.random(9999999999));return false}};try{btg.DOM.Events.addListener(window,"load",function(){var c=btg.config,d=btg.Object.isConfigDefined;if(d(c.Omniture))if(c.Omniture.enableGuidPlugin&&c.Omniture.enableGuidAuxiliaryCall&&!btg.GUID.isGUIDReported){c=new btg.DependencyManager;c.add("vmn_uuid",btg.GUID.guidScript);c.checkDependency("vmn_uuid")}})}catch(e$$22){};if(btg && btg.config)btg.config.fullVersion='3.13.376';

//Attempting to include CODA/builds/3/Demdex.js
var demdex_seg="",demdex_seg="";
(function(l,k){btg.Demdex=new function(){var i="//mtvn.demdex.net";l.aam_tnt_cb=function(a){if(typeof a.stuff!="undefined"&&a.stuff!=""){demdex_seg=a.stuff;for(var a=0,b=demdex_seg.length;a<b;a++)if(demdex_seg[a].cn=="aam_sc")if(demdex_seg[a].cv.split(",")){var c=demdex_seg[a].cv.replace("aam=","");if(c){if(!l.localStorage){if(c.length>120){c=c.substr(0,120);c=c.substr(0,c.lastIndexOf(","))}btg.Cookie.set("vmn_aam",c)}else btg.DOM.Storage.set("vmn_aam",c);break}}}};this.getDpid=function(){var a="";
if(btg.Environment.getPlatform()=="Desktop")a=332;else if(btg.globalvars.is_iOS=="true")a=dpidIos;else if(btg.Environment.userAgent.isMobile=="true")a=dpidAndroid;return a};var m=btg.Cookie.read("vmn_uuid");if(btg.Cookie.read("vmn_3pc")==0&&m)btg.DOM.loadScript(i+"/event?d_stuff=1&d_dst=1&d_rtbd=json&d_cts=1&d_cb=aam_tnt_cb&d_dpid="+this.getDpid()+"&d_dpuuid="+m,false);else btg.DOM.loadScript(i+"/event?d_stuff=1&d_dst=1&d_rtbd=json&d_cts=1&d_cb=aam_tnt_cb",false);var i="//mtvn.demdex.net",f=btg.Cookie,
n=new btg.Beacon,o=false,j=btg.String,g=btg.String.isDefined,h=btg.Object.isDefined;this.canSendRequest=true;this.dependencies=new btg.DependencyManager;this.data=null;this.sendIdSyncCall=function(){if(f.read("vmn_3pc")=="0"||!f.read("vmn_uuid"))return;var a=f.read("vmn_uuid");if(!f.read("mtvn_dmp_init")&&a){var b=new Date;n.url="//dpm.demdex.net/ibs:dpid=332&dpuuid="+a;n.send();b.setHours(23);b.setMinutes(59);f.set("mtvn_dmp_init",1,b)}};this.init=function(){this.setData();this.dependencies.add("demdex_response",
function(){return(btg.Demdex?btg.Demdex:{}).canSendRequest},500,false)};this.sendPageCall=function(a,b){this.dependencies.checkDependency("demdex_response");if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.sendPageCall,a,b);return}this.canSendRequest=false;var c=i+"/event?",d={d_rtbd:"json",d_dst:1,d_cts:1,d_cb:"btg.Demdex.response"};if(b&&typeof b==="object")for(var e in b)if(b.hasOwnProperty(e))d["d_"+e]=j.encode(j.decode(b[e]));if(f.read("vmn_3pc")=="0"){d.d_dpid=
this.getDpid();d.d_dpuuid=f.read("vmn_uuid")}a.host=location.hostname;if(f.read("vmn_host")==null){this.sendSiteVisitCall();a.ref=k.referrer;f.set("vmn_host",1)}if(a&&typeof a==="object")for(e in a)if(a.hasOwnProperty(e)&&a[e]){var g=e;if(e.match(/^(prop\d{1,2})$/ig))g=e.replace("prop","c");else if(e.match(/^(evar\d{1,2})$/ig))g=e.replace("eVar","v");else if(e.match(/^(hier\d{1,2})$/ig))g=e.replace("hier","h");else if(e.match(/^(channel)$/ig))g=e.replace("channel","ch");d["c_"+g]=j.encode(j.decode(a[e]))}btg.DOM.loadScript(c+
btg.Object.toString(d,"&"))};this.sendSiteVisitCall=function(){this.dependencies.checkDependency("demdex_response");if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.sendSiteVisitCall);return}this.canSendRequest=false;var a=f.read("vmn_uuid"),b=i+"/event?",a={d_rtbd:"json",d_dst:1,d_cts:1,d_cb:"btg.Demdex.response",c_uuid:a,c_visit:location.hostname+"_visit"};if(f.read("vmn_3pc")=="0"){a.d_dpid=this.getDpid();a.d_dpuuid=f.read("vmn_uuid")}btg.DOM.loadScript(b+btg.Object.toString(a,
"&"))};this.sendSocialCall=function(a){this.dependencies.checkDependency("demdex_response");if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.sendSocialCall,a);return}this.canSendRequest=false;var b=f.read("vmn_uuid"),c=i+"/event?",b={d_rtbd:"json",d_dst:1,d_cts:1,d_cb:"btg.Demdex.response",c_uuid:b};if(f.read("vmn_3pc")=="0"){a.d_dpid=this.getDpid();a.d_dpuuid=f.read("vmn_uuid")}if(a&&typeof a==="object")for(var d in a)if(a.hasOwnProperty(d)&&a[d])b["c_"+d]=j.encode(j.decode(a[d]));
btg.DOM.loadScript(c+btg.Object.toString(b,"&"))};this.getFWSegment=function(){return this.getSegment("fw")};this.getSegment=function(a){var b=this.data,c;if(h(b)&&h(b.stuff)&&g(a))for(var b=b.stuff,d=0,e=b.length;d<e;d++)if(h(b[d])&&g(b[d].cn)&&b[d].cn==a&&g(b[d].cv)){c=b[d].cv;break}return c};this.setSegment=function(a,b){if(g(a)&&g(b)){this.data=h(this.data)?this.data:{};if(!h(this.data.stuff)||this.data.stuff.length<=0)this.data.stuff=[{cn:a,cv:b}];else for(var c=this.data.stuff,d=0,e=c.length;d<
e;d++)if(h(c[d])&&g(c[d].cn))if(c[d].cn==a){this.data.stuff[d].cv=b;break}else{this.data.stuff[c.length]={cn:a,cv:b};break}}};this.setData=function(){this.setSegment("dfp",btg.DOM.Storage.get("demdexDFP"));this.setSegment("fw",btg.DOM.Storage.get("demdexFW"))};this.saveToDOM=function(){var a=this.getSegment("dfp"),b=this.getSegment("fw");if(g(a))btg.DOM.Storage.set("demdexDFP",a);if(g(b))btg.DOM.Storage.set("demdexFW",b)};this.response=function(a){this.data=a;this.saveToDOM();btg.Demdex.canSendRequest=
true;if(!o&&location.protocol!="https:"){btg.DOM.appendIframe({src:location.protocol+"//fast.mtvn.demdex.net/DSD-gz/mtvn-dest.html?"+"targus=1&targusvalidttl=14400&"+"bizo=1&bizovalidttl=14400&"+"nexac=1&nexacvalidttl=14400&"+"acx=1&acxvalidttl=14400&"+"addthis=1&addthisvalidttl=14400&"+"is_exelate=1&exvalidttl=302400&"+"is_mediamath=1&mmvalidttl=10080&"+"rubicon=1&rubiconvalidttl=14400&"+"tapad=1&tapadvalidttl=20160&"+"turn=1&turnvalidttl=30240&"+"qtct=1&qtctvalidttl=20160"});o=true}if(h(btg.MediaPlayer))btg.MediaPlayer.setDemdexFWSegment(a);
btg.Events.DEMDEX_RESPONSE.fire(a);a:{if(!btg.Demdex.data)break a;if(!btg.Demdex.data.dests)break a;for(var a=btg.Demdex.data.dests,b=0;b<a.length;b++){var c=k.createElement("img");c.src=a[b].c;k.body.appendChild(c)}}}}})(window,document);

//Attempting to include CODA/builds/3/Reporting.js
btg.ReportingManager=new function(){var d=false,f=false,e=false,g,b,c,h,i=false;this.isScriptIncluded={comscore:false,quantcast:false};this.init=function(){if(i)return;b=btg.config;var a=btg.Object.isConfigDefined;if(a(b.Omniture)&&btg.Omniture){c=new btg.Omniture(b.Omniture);d=true}if(a(b.Nielsen)&&btg.Nielsen)new btg.Nielsen(b.Nielsen);if(a(b.QuantCast)&&btg.QuantCast){h=new btg.QuantCast(b.QuantCast);f=true}if(a(b.ComScore)&&btg.ComScore)new btg.ComScore(b.ComScore);if(b.ChoiceStream&&b.ChoiceStream.enabled&&
btg.ChoiceStream){choicestream=new btg.ChoiceStream(b.ChoiceStream);e=true}if(a(b.ChoiceStream)&&btg.ChoiceStream){choicestream=new btg.ChoiceStream(b.ChoiceStream);e=true}if(a(b.Demdex)&&btg.Demdex){btg.Demdex.init();btg.Demdex.sendIdSyncCall();hasDemdex=true}i=true};this.sendPageCall=function(a){if(d){c.sendPageCall(typeof a.omniture=="object"&&a.omniture!=null?a.omniture:a);g=c.getPageName()}if(f)h.sendPageCall(typeof a.quantCast=="object"&&a.quantCast!=null?a.quantCast:a)};this.sendLinkEvent=
function(a){if(d)c.sendLinkEvent(typeof a.omniture=="object"&&a.omniture!=null?a.omniture:a)};this.getData=function(){btg.Controller.init();return{pageName:g}};this.getOmniture=function(){return d?c:null};this.setChoiceStreamRequest=function(a,b){if(e)choicestream.setChoiceStreamRequest(a,b)}};btg.Omniture=function(a){this.pageViewEventSet=false;this.btgIsStr=btg.String.isDefined;this.name="Omniture";this.values=[];this.newRepeatProp=this.btgIsStr(a.newRepeatProp)?a.newRepeatProp:"prop41";this.config=a;this.hcode=btg.Hcode;this.hcode.setAccount(this.config.account);if(btg.globalvars.is_iOS||this.config.enableFirstPartyCookie){this.hcode.trackingServer=btg.Environment.getCnamedDomain();if(this.btgIsStr(this.config.tabletAccount)&&btg.globalvars.is_iOS)this.hcode.setAccount(this.config.tabletAccount)}for(var b in this.config)this.hcode[b]=
this.config[b];this.url="http"+(this.hcode.ssl?"s":"")+"://"+this.hcode.un+".112.2o7.net/b/ss/"+this.hcode.un+"/1/";this.dependencies=new btg.DependencyManager;this.plugins=new btg.PluginManager([btg.GUID,btg.Flux,btg.Recommendations,btg.Photos],this.config,this.dependencies);if(typeof btg.config.Omniture.enableVisitorNamespace=="boolean"&&btg.config.Omniture.enableVisitorNamespace)this.setAttribute("visitorNamespace",btg.globalvars.VISITOR_NAMESPACE);if(typeof this.config.userSegmentVarMap=="undefined"){this.config.userSegmentVarMap=
{traffic:"prop31",commerce:"products"};btg.config.Omniture.userSegmentVarMap=this.config.userSegmentVarMap}if(typeof btg.UserSegment!="undefined")btg.UserSegment.init(this);if(typeof this.config.timePartingVarMap=="undefined")this.config.timePartingVarMap={trafficDay:"prop33",trafficHour:"prop34",commerceDay:"eVar45",commerceHour:"eVar46"};if(typeof this.config.pageViewEvent!="string")this.config.pageViewEvent="event16";if(typeof btg.MediaPlayer!="undefined")btg.MediaPlayer.init(this)};
btg.Omniture.prototype={setAttribute:function(a,b){if(this.btgIsStr(a)){this.hcode[a]=this.btgIsStr(b)?b:"";return true}else return false},getAttribute:function(a){return this.hcode[a]},setValues:function(a){for(var b in a){this.setAttribute(b,a[b]);this.values.push(b)}return true},clearValues:function(){for(var a=0,b=this.values.length;a<b;a++){if(/(pageName|visitorNamespace)/.test(this.values[a]))continue;this.setAttribute(this.values[a],"")}this.clearNewRepeat();this.values=this.getPageName()?
["pageName"]:[];return true},setNewRepeat:function(){this.setAttribute(this.newRepeatProp,this.hcode.getNewRepeat());return true},clearNewRepeat:function(){this.setAttribute(this.newRepeatProp,"");return true},getValOnce:function(a,b,c){return this.hcode.getValOnce(a,b,c)},getNewRepeat:function(){return this.hcode.getNewRepeat()},getPageName:function(){return this.getAttribute("pageName")},preprocessData:function(a){a=this.plugins.run(a);if(this.btgIsStr(a.account))this.hcode.setAccount(a.account);
else this.hcode.setAccount(this.config.account);if(typeof mboxCreate=="function"&&btg.Object.isDefined(btg.TestAndTarget)&&btg.config.TestAndTarget.enabled)a.tnt=this.hcode.trackTNT();if(typeof btg.UserSegment!="undefined")a=btg.UserSegment.setData(this,a);var b=btg.Cookie.read;if(b("vmn_3pc")&&b("vmn_3pc")=="0")a.eVar58="3PB";if(typeof btg.config.Omniture.enableVisitorNamespace=="boolean"&&btg.config.Omniture.enableVisitorNamespace)a.visitorNamespace=btg.globalvars.VISITOR_NAMESPACE;return a},sendPageCall:function(a){if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,
this.sendPageCall,a);return}a=typeof a!="object"?{}:a;if(typeof a.pageName!="string"||a.pageName=="")a.pageName=typeof this.hcode.pageName==="string"&&this.hcode.pageName!=""?this.hcode.pageName:btg.config._defaultPageName;if(typeof this.config.noPagenameSlash!="undefined"&&this.config.noPagenameSlash&&a.pageName.charAt(0)=="/")a.pageName=a.pageName.substring(1);if(typeof this.config.defaultHier=="string"&&this.config.defaultHier!="")if(typeof a[this.config.defaultHier]!=="string"||a[this.config.defaultHier]==
""){if(typeof this.hcode[this.config.defaultHier]==="string"&&this.hcode[this.config.defaultHier]!="")var b=this.hcode[this.config.defaultHier];else if(typeof a.docHierarchy==="string"&&a.docHierarchy!="")b=a.docHierarchy;else b=a.pageName;if(b.charAt(b.length-1)=="/")if(typeof btg.config.indexFileName==="string")a[this.config.defaultHier]=b+btg.config.indexFileName;else a[this.config.defaultHier]=b+"index";else a[this.config.defaultHier]=b;a[this.config.defaultHier]=btg.String.charLtrim(a[this.config.defaultHier],
"/")}if(typeof a.channel!="string"||a.channel=="")if(typeof this.hcode.channel=="string")a.channel=this.hcode.channel;else if(a.pageName=="/")a.channel=a.pageName;else for(var b=a.pageName.split("/"),c=0,d=b.length;c<d;c++)if(b[c]!=""){a.channel=b[c];break}if(typeof a.channel=="string")a.eVar49=a.channel;if(this.btgIsStr(this.config.franchise))a.eVar68=a.prop68=this.config.franchise;if(typeof btg.SEO!="undefined")a=btg.SEO.setData(this,a);if(typeof btg.BrowserToolbar!="undefined")a=btg.BrowserToolbar.setData(this,
a);if(typeof btg.Search!="undefined")a=btg.Search.setData(a);if(typeof btg.Search!="undefined")a=btg.Search.chkConversions(a);if(typeof this.config.enableTimeParting!="undefined"&&this.config.enableTimeParting==true&&typeof this.config.timePartingVarMap!="undefined"){b=typeof btg.config.Omniture.timezone!="undefined"?btg.config.Omniture.timezone:"-5";a[this.config.timePartingVarMap.commerceHour]=a[this.config.timePartingVarMap.trafficHour]=this.hcode.getTimeParting("h",b);a[this.config.timePartingVarMap.commerceDay]=
a[this.config.timePartingVarMap.trafficDay]=this.hcode.getTimeParting("d",b)}if(typeof this.config.percentPageViewedVarMap!="undefined"){if(typeof this.config.percentPageViewedVarMap.previousPage!="undefined")a[this.config.percentPageViewedVarMap.previousPage]=this.hcode.getPreviousValue(a.pageName,"s_pn");if(typeof this.config.percentPageViewedVarMap.percentage!="undefined")if(this.config.percentPageViewedVarMap.percentage.indexOf("event")>=0){if(typeof a.events=="string"&&a.events!="")a.events+=
",";else a.events="";a.events+=this.config.percentPageViewedVarMap.percentage;if(typeof a.products=="string"&&a.products!="")a.products+=",";else a.products="";a.products+=";;;;"+this.config.percentPageViewedVarMap.percentage+"="+this.hcode.getPercentPageViewed()}else a[this.config.percentPageViewedVarMap.percentage]=this.hcode.getPercentPageViewed()}if(!this.pageViewEventSet){b=typeof a.events==="string"?a.events:"";if(typeof this.config.pageViewEvent==="string"&&b.indexOf(this.config.pageViewEvent)<
0){if(b!="")b+=",";b+=this.config.pageViewEvent;a.events=b;this.pageViewEventSet=true}}if(typeof btg.GameReporter!="undefined"){btg.GameReporter.gtsEvent="event74";a=btg.GameReporter.setData(a)}a=this.preprocessData(a);b=null;if(window.localStorage)b=btg.DOM.Storage.get("vmn_aam");else b=btg.Cookie.read("vmn_aam");if(b&&btg.config.requireCOPPACompliance!=true)a.list3=b;b=btg.Cookie.read("vmn_uuid");a.eVar67=(b&&btg.config.Omniture.enableGuidPlugin?b:"EMPTY")+"_"+(new Date).getTime();this.setValues(this.config);
this.setValues(a);this.setNewRepeat();this.attachLoggedEvent();if(btg.Object.isConfigDefined(btg.config.Demdex)&&btg.Demdex){a[this.newRepeatProp]=this.getAttribute(this.newRepeatProp);btg.Demdex.sendPageCall(a)}this.hcode.t();this.clearValues();if(this.config.trackExternalLinks.toString()=="true")this.hcode.trackExternalLinks=true;return true},sendLinkEvent:function(a){this.hcode.trackExternalLinks=false;if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.sendPageCall,
a);return}a=typeof a!="object"?{}:a;a.lnk=a.lnk?this.hcode.co(a.lnk):true;a.linkType=a.linkType?a.linkType:"o";a.referrer=location.href;a=this.preprocessData(a);this.setValues(this.config);this.setValues(a);this.attachLoggedEvent();this.hcode.tl(a.lnk,a.linkType,a.linkName);this.clearValues();if(btg.config.Omniture.trackExternalLinks===true){var b=this;setTimeout(function(){b.hcode.trackExternalLinks=true},1)}return true},setAccountVars:function(a){this.setAttribute("un",a.name);this.setAttribute("dynamicAccountSelection",
a.dynamic);this.setAttribute("dynamicAccountList",a.list);this.setAttribute("linkInternalFilters",a.filters);this.setAttribute("charSet",a.chartset);for(var b in a)if(this.btgIsStr(b))this.setAttribute(b,this.btgIsStr(a[b])?a[b]:"")},logEvent:function(a){var b=btg.Cookie.set;if(this.btgIsStr(a)){if(this.btgIsStr(a.UIEvent))b("UIEvent",a.UIEvent);if(this.btgIsStr(a.UIEventName))b("UIEventName",a.UIEventName);if(this.btgIsStr(a.UITrackingCode))b("UITrackingCode",a.UITrackingCode)}},attachLoggedEvent:function(){var a=
btg.Cookie.read,b=btg.Cookie.remove;if(this.btgIsStr(a("UIEvent"))){this.setAttribute("events",a("UIEvent"));b("UIEvent")}if(this.btgIsStr(a("UIEventName"))){this.setAttribute("eVar40",a("UIEventName"));b("UIEventName")}if(this.btgIsStr(a("UITrackingCode"))){this.setAttribute("campaign",a("UITrackingCode"));b("UITrackingCode")}return true},clearAllVars:function(){for(var a=1;a<=50;a++){this.setAttribute("eVar"+a,"");this.setAttribute("prop"+a,"");if(a<6)this.setAttribute("hier"+a,"")}this.setAttribute("pageName",
"");this.setAttribute("channel","");return true}};btg.Nielsen=function(b){if(!btg.Controller.hasReporting())return;this.config=b;this.dependencies=new btg.DependencyManager;this.dependencies.add("nielsen_uuid_present",function(){return btg.String.isDefined(btg.Cookie.read("vmn_uuid"))?true:false},100,true);if(this.dependencies.hasDependency())this.dependencies.addToCallQueue(this,this.sendPageCall);else this.sendPageCall()};
btg.Nielsen.prototype={sendPageCall:function(){if(!btg.Controller.hasReporting())return;var b=btg.Cookie.read("vmn_uuid"),c=btg.String.isDefined(btg.config.Nielsen.cid)?btg.config.Nielsen.cid:"us-mtvn",a=new Image(1,1);a.onerror=a.onload=function(){a.onerror=a.onload=null};var d=escape(window.location.href);a.src=["//secure-us.imrworldwide.com/cgi-bin/m?ci="+c+"&cg="+b+"&cc=1&si=",d,"&rp=",escape(document.referrer),"&ts=compact&rnd=",(new Date).getTime()].join("");this.sendPageCall=function(){}}};btg.UserSegment=new function(){var d=btg.Cookie;this.init=function(a){var b=d.read("mtvn_btg_userSegments");a.userSegments=b?b.split(","):[];return true};this.set=function(a,b){if(!b)b=btg.ReportingManager.getOmniture();for(var c=0,e=b.userSegments.length;c<e;c++)if(b.userSegments[c]==a)return false;b.userSegments[b.userSegments.length]=a;d.set("mtvn_btg_userSegments",b.userSegments.join(","));return true};this.add=function(a,b){this.set(b,a);return true};this.getSegments=function(a){return a.userSegments};
this.getStr=function(a,b,c){if(!b)b="";if(!c)c="";return typeof a.userSegments=="object"&&a.userSegments.length>0?b+a.userSegments.join(c+","+b)+c:""};this.setData=function(a,b){b[a.config.userSegmentVarMap.traffic]=b[a.config.userSegmentVarMap.traffic]?b[a.config.userSegmentVarMap.traffic]+(this.getStr(a)!=""?",":"")+this.getStr(a):this.getStr(a);b[a.config.userSegmentVarMap.commerce]=b[a.config.userSegmentVarMap.commerce]?b[a.config.userSegmentVarMap.commerce]+(this.getStr(a,"User Segment;")!=""?
",":"")+this.getStr(a,"User Segment;"):this.getStr(a,"User Segment;");return b}};btg.Search=new function(){var f=btg.Cookie,g=f.set,b="",e=function(a){if(b.indexOf(a)<0){if(b!="")b+=",";b+=a}return b};this.init=function(){};this.setData=function(a){if(typeof com_mtvi_SSDC!="object")return a;if(typeof a.events=="string")b=a.events;var c="events,prop31";e("event36");a.eVar3=typeof com_mtvi_SSDC.srchtype=="string"?com_mtvi_SSDC.srchtype:"GENERAL";if(typeof com_mtvi_SSDC.srchsyn!="undefined"){e("event33");if(typeof com_mtvi_SSDC.srchsyn=="object"){for(var d=0,f=com_mtvi_SSDC.srchsyn.length;d<
f;d++)com_mtvi_SSDC.srchsyn[d]=com_mtvi_SSDC.srchsyn[d].replace(/\,/,"");com_mtvi_SSDC.srchsyn=com_mtvi_SSDC.srchsyn.join(",")}a.eVar36=com_mtvi_SSDC.srchsyn;c+=",eVar36"}if(typeof com_mtvi_SSDC.srchterm=="string"){e("event38");a.eVar2=com_mtvi_SSDC.srchterm;c+=",eVar2"}else if(typeof com_mtvi_SSDC.srchfail=="string"){e("event37");a.eVar4=typeof com_mtvi_SSDC.appfailure=="boolean"&&com_mtvi_SSDC.appfailure?"APP_FAILURE":com_mtvi_SSDC.srchfail;c+=",eVar4"}btg.UserSegment.set("SiteSearcher");a.linkTrackVars=
c;a.linkTrackEvents=b;a.events=b;return a};this.sendLinkEvent=function(){if(!com_mtvi_SSDC)return false;var a={linkName:"SITE_SEARCH_RESULTS",linkType:"o"},a=this.setData(a);btg.Controller.sendLinkEvent(a);return true};this.chkConversions=function(a){var c=f.read,d=f.remove;if(typeof a.events=="string")b=a.events;if(c("mtvn_btg_SSDC_conv")){e("event35");d("mtvn_btg_SSDC_conv")}if(c("mtvn_btg_SSDC_syn_conv")){e("event34");d("mtvn_btg_SSDC_syn_conv")}if(c("mtvn_btg_SSDC_typeahead_conv")){e("event39");
d("mtvn_btg_SSDC_typeahead_conv")}a.events=b;return a};this.setConversion=function(){g("mtvn_btg_SSDC_conv",1)};this.setSynConversion=function(){g("mtvn_btg_SSDC_syn_conv",1)};this.setTypeAheadConversion=function(){g("mtvn_btg_SSDC_typeahead_conv",1)}};btg.SEO=new function(){this.setData=function(e,c){for(var b=[["google.com","GoogleUser"],["msn.com","MSNUser"],["yahoo.com","YahooUser"]],a=0,d=b.length;a<d;a++)if(document.referrer.indexOf(b[a][0])>-1)if(typeof btg.UserSegment!="undefined")btg.UserSegment.set(b[a][1]);return c}};var s_code="",s_objectID;
function s_gi(c,i,g){var d="s.version='H.25.5';s.an=s_an;s.logDebug=function(m){var s=this,tcf=new Function('var e;try{console.log(\"'+s.rep(s.rep(s.rep(m,\"\\\\\",\"\\\\"+'\\\\"),"\\n","\\\\n"),"\\"","\\\\\\"")+\'");}catch(e){}\');tcf()};s.cls=function(x,c){var i,y=\'\';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}retur'+"n y};s.fl=function(x,l){return x?(''+x).substring(0,l):x};s.co=function(o){return o};s.num=function(x){x=''+x;for(var p=0;p<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1))<0)return 0;ret"+"urn 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',f=\"+~!*()'\",i,c=s.charSet,n,l,e,y='';c=c?c.toUpperCase():'';if(x){x=''+x;if(s.em==3){x=encodeURIComponent("+
"x);for(i=0;i<f.length;i++) {n=f.substring(i,i+1);if(x.indexOf(n)>=0)x=s.rep(x,n,\"%\"+n.charCodeAt(0).toString(16).toUpperCase())}}else if(c=='AUTO'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.su"+"bstring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h.substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';else y+=escape(c)}x=y}else x=s.rep(escape(''+x),'+"+"','%2B');if(c&&c!='AUTO'&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00"+
"'+x.substring(i);i=x.indexOf('%',i)}}}return x};s.epa=function(x){var s=this,y,tcf;if(x){x=s.rep(''+x,'+',' ');if(s.em==3){tcf=new Function('x','var y,e;try{y=decodeURIComponent(x)}catch(e){y=unesc"+"ape(x)}return y');return tcf(x)}else return unescape(x)}return y};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s[f](t,a);if(r)return r"+";z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a.indexOf(':');if(c>=0)a=a.substring(0,c);c=a.indexOf('=');if(c>=0)a=a.substring(0,c);if(t.substring("+
"0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf'"+",f);return s.fsg};s.mpc=function(m,a){var s=this,c,l,n,v;v=s.d.visibilityState;if(!v)v=s.d.webkitVisibilityState;if(v&&v=='prerender'){if(!s.mpq){s.mpq=new Array;l=s.sp('webkitvisibilitychange,visi"+"bilitychange',',');for(n=0;n<l.length;n++){s.d.addEventListener(l[n],new Function('var s=s_c_il['+s._in+'],c,v;v=s.d.visibilityState;if(!v)v=s.d.webkitVisibilityState;if(s.mpq&&v==\"visible\"){whil"+
"e(s.mpq.length>0){c=s.mpq.shift();s[c.m].apply(s,c.a)}s.mpq=0}'),false)}}c=new Object;c.m=m;c.a=a;s.mpq.push(c);return 1}return 0};s.si=function(){var s=this,i,k,v,c=s_gi+'var s=s_gi(\"'+s.oun+'\")"+";s.sa(\"'+s.un+'\");';for(i=0;i<s.va_g.length;i++){k=s.va_g[i];v=s[k];if(v!=undefined){if(typeof(v)!='number')c+='s.'+k+'=\"'+s_fe(v)+'\";';else c+='s.'+k+'='+v+';'}}c+=\"s.lnk=s.eo=s.linkName=s.li"+"nkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';\";return c};s.c_d='';s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostnam"+
"e,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPeriods;if(d&&!s.c_d){n=n?parseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'"+".','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<"+"0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-6"+
"0);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':''"+");return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i"+";l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x.b=r?0:o[e];x.o[e]=f}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tc"+
"f=new Function('s','f','a','t','var e,r;try{r=s[f](a)}catch(e){r=s[t](e)}return r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s"+".wd,'onerror',1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfsoe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0"+";return true');s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=this,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return "+
"s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)fo"+"r(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,r.t,r.u)}};s.flushBufferedRequests=function(){};s.mr=function(sess,q,rs,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackin"+"gServerBase,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Object,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase()"+
";else dc='d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/'+s.version+(s.t"+"cn?'T':'')+'/'+sess+'?AQB=1&ndh=1'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac)rs=s.fl(rs,2047)}if(s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s.rc)s.rc=new Object;if(!s.rc[u"+"n]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u=un;r.r=rs;l[l.length]=r;retur"+
"n ''}imn+='_'+s.rc[un];s.rc[un]++}if(s.debugTracking){var d='AppMeasurement Debug: '+rs,dl=s.sp(rs,'&'),dln;for(dln=0;dln<dl.length;dln++)d+=\"\\n\\t\"+s.epa(dl[dln]);s.logDebug(d)}im=s.wd[imn];if("+"!im)im=s.wd[imn]=new Image;im.s_l=0;im.onload=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il['+s._in+'];s.bcr();s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nr"+"s){s.nrs=1;s.m_m('rs')}else s.nrs++;im.src=rs;if(s.useForcedLinkTracking||s.bcf){if(!s.forcedLinkTrackingTimeout)s.forcedLinkTrackingTimeout=250;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+'"+
"].bcr()',s.forcedLinkTrackingTimeout);}else if((s.lnk||s.eo)&&(!ta||ta=='_self'||ta=='_top'||ta=='_parent'||(s.wd.name&&ta==s.wd.name))){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=ne"+"w Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg=function(v){var s=this;if(!s.wd['s_'+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.s"+"ubstring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s.pt(v,',','glf',0)};s.rf=function(x){var s=this,y,i,j,h,p,l=0,q,a,b='',c='',t;if(x&&x.len"+
"gth>255){y=''+x;i=y.indexOf('?');if(i>0){q=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase();j=0;if(h.substring(0,7)=='http://')j+=7;else if(h.substring(0,8)=='https://')j+=8;i=h.indexOf(\"/\","+"j);if(i>0){h=h.substring(j,i);p=y.substring(i);y=y.substring(0,i);if(h.indexOf('google')>=0)l=',q,ie,start,search_key,word,kw,cd,';else if(h.indexOf('yahoo.co')>=0)l=',p,ei,';if(l&&q){a=s.sp(q,'&')"+";if(a&&a.length>1){for(j=0;j<a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.substring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c)q=b+'&'+c;else c=''}i=253-(q.length-c."+
"length)-y.length;x=y+(i>0?p.substring(0,i):'')+'?'+q}}}}return x};s.s2q=function(k,v,vf,vfp,f){var s=this,qs='',sk,sv,sp,ss,nke,nk,nf,nfl=0,nfn,nfm;if(k==\"contextData\")k=\"c\";if(v){for(sk in v)i"+"f((!f||sk.substring(0,f.length)==f)&&v[sk]&&(!vf||vf.indexOf(','+(vfp?vfp+'.':'')+sk+',')>=0)&&(!Object||!Object.prototype||!Object.prototype[sk])){nfm=0;if(nfl)for(nfn=0;nfn<nfl.length;nfn++)if(sk"+".substring(0,nfl[nfn].length)==nfl[nfn])nfm=1;if(!nfm){if(qs=='')qs+='&'+k+'.';sv=v[sk];if(f)sk=sk.substring(f.length);if(sk.length>0){nke=sk.indexOf('.');if(nke>0){nk=sk.substring(0,nke);nf=(f?f:'"+
"')+nk+'.';if(!nfl)nfl=new Array;nfl[nfl.length]=nf;qs+=s.s2q(nk,v,vf,vfp,nf)}else{if(typeof(sv)=='boolean'){if(sv)sv='true';else sv='false'}if(sv){if(vfp=='retrieveLightData'&&f.indexOf('.contextDa"+"ta.')<0){sp=sk.substring(0,4);ss=sk.substring(4);if(sk=='transactionID')sk='xact';else if(sk=='channel')sk='ch';else if(sk=='campaign')sk='v0';else if(s.num(ss)){if(sp=='prop')sk='c'+ss;else if(sp="+"='eVar')sk='v'+ss;else if(sp=='list')sk='l'+ss;else if(sp=='hier'){sk='h'+ss;sv=sv.substring(0,255)}}}qs+='&'+s.ape(sk)+'='+s.ape(sv)}}}}}if(qs!='')qs+='&.'+k}return qs};s.hav=function(){var s=this"+
",qs='',l,fv='',fe='',mn,i,e;if(s.lightProfileID){l=s.va_m;fv=s.lightTrackVars;if(fv)fv=','+fv+','+s.vl_mr+','}else{l=s.va_t;if(s.pe||s.linkType){fv=s.linkTrackVars;fe=s.linkTrackEvents;if(s.pe){mn="+"s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}}if(fv)fv=','+fv+','+s.vl_l+','+s.vl_l2;if(fe){fe=','+fe+',';if(fv)fv+=',events,'}if (s.events"+"2)e=(e?',':'')+s.events2}for(i=0;i<l.length;i++){var k=l[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(!v)if(k=='events'&&e){v=e;e=''}if(v&&(!fv||fv.indexOf(','+k+',')>=0)&&k!="+
"'linkName'&&k!='linkType'){if(k=='timestamp')q='ts';else if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL'){q='g';if(v.length>255){s.pageURLRest=v.substring(25"+"5);v=v.substring(0,255);}}else if(k=='pageURLRest')q='-g';else if(k=='referrer'){q='r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q="+"'vmf';if(s.ssl&&s.visitorMigrationServerSecure)v=''}else if(k=='visitorMigrationServerSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUT"+
"O')v='ISO8859-1';else if(s.em==2||s.em==3)v='UTF-8'}else if(k=='visitorNamespace')q='ns';else if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q="+"'vvp';else if(k=='currencyCode')q='cc';else if(k=='channel')q='ch';else if(k=='transactionID')q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else "+"if(k=='javascriptVersion')q='j';else if(k=='javaEnabled')q='v';else if(k=='cookiesEnabled')q='k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct"+
"';else if(k=='homepage')q='hp';else if(k=='plugins')q='p';else if(k=='events'){if(e)v+=(v?',':'')+e;if(fe)v=s.fs(v,fe)}else if(k=='events2')v='';else if(k=='contextData'){qs+=s.s2q('c',s[k],fv,k,0)"+";v=''}else if(k=='lightProfileID')q='mtp';else if(k=='lightStoreForSeconds'){q='mtss';if(!s.lightProfileID)v=''}else if(k=='lightIncrementBy'){q='mti';if(!s.lightProfileID)v=''}else if(k=='retrieve"+"LightProfiles')q='mtsr';else if(k=='deleteLightProfiles')q='mtsd';else if(k=='retrieveLightData'){if(s.retrieveLightProfiles)qs+=s.s2q('mts',s[k],fv,k,0);v=''}else if(s.num(x)){if(b=='prop')q='c'+n"+
";else if(b=='eVar')q='v'+n;else if(b=='list')q='l'+n;else if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+s.ape(q)+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}return qs};s.ltdf=function(t,h){t=t?t."+"toLowerCase():'';h=h?h.toLowerCase():'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase()"+":'';h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.loca"+
"tion.hostname;h=h.toLowerCase();if(s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.indexOf('#')!=0&&h.indexOf('about:')!=0&&h.indexOf('javascript:')!=0&&(lef"+"||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=this;s.t();s.lnk=0;if(b)r"+"eturn this[b](e);return true');s.bcr=function(){var s=this;if(s.bct&&s.bce)s.bct.dispatchEvent(s.bce);if(s.bcf){if(typeof(s.bcf)=='function')s.bcf();else if(s.bct&&s.bct.href)s.d.location=s.bct.hre"+
"f}s.bct=s.bce=s.bcf=0};s.bc=new Function('e','if(e&&e.s_fe)return;var s=s_c_il['+s._in+'],f,tcf,t,n,nrs,a,h;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;if(!s.bbc)s.useForcedLinkTracking=0;else if(!s."+'useForcedLinkTracking){s.b.removeEventListener("click",s.bc,true);s.bbc=s.useForcedLinkTracking=0;return}else s.b.removeEventListener("click",s.bc,false);s.eo=e.srcElement?e.srcElement:e.target'+';nrs=s.nrs;s.t();s.eo=0;if(s.nrs>nrs&&s.useForcedLinkTracking&&e.target){a=e.target;while(a&&a!=s.b&&a.tagName.toUpperCase()!="A"&&a.tagName.toUpperCase()!="AREA")a=a.parentNode;if(a){h=a.href;'+
'if(h.indexOf("#")==0||h.indexOf("about:")==0||h.indexOf("javascript:")==0)h=0;t=a.target;if(e.target.dispatchEvent&&h&&(!t||t=="_self"||t=="_top"||t=="_parent"||(s.wd.name&&t==s.wd.name'+'))){e.stopPropagation();if (e.stopImmediatePropagation) {e.stopImmediatePropagation();}e.preventDefault();n=s.d.createEvent("MouseEvents");n.initMouseEvent("click",e.bubbles,e.cancelable,e.view'+",e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget);n.s_fe=1;s.bct=e.target;s.bce=n}}}');s.oh=function(o){var s=this,l=s.wd.location,"+
"h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i>j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.path"+"name.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l.pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=function(o){var t=o.tagName;if(o.tagUrn||(o."+"scopeName&&o.scopeName.toUpperCase()!='HTML'))return '';t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if((t=='INPUT'||t=='BUTTON')&&o.type&&o.type.toUpperCase)t=o.type.toUpperCase("+
");else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=='AREA')&&(!c||!p||p.toLowerCase().indexOf('"+"javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(t=='INPUT'||t=='SUBMIT'){if(o.value)n=o.value;else if(o.innerText)n=o.inn"+"erText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e=t.indexOf('='),u=e>=0?t.su"+
"bstring(0,e):'',q=e>=0?s.epa(t.substring(e+1)):'';if(u&&q&&(','+u+',').indexOf(','+un+',')>=0){if(u!=s.un&&s.un.indexOf(',')>=0)q='&u='+u+q+'&u=0';return q}return ''};s.rq=function(un){if(!un)un=th"+"is.un;var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1"+"));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.sq"+
"u=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in"+" s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],"+'r=true,b=s.eh(s.wd,"onload"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.links.length;i++){o=s.d.links[i];oc=o.onclick?""+o.onclick:"";if((oc.indexOf("s_gs(")<0||oc.indexOf(".s_oc(")>=0)&&oc.i'+
'ndexOf(".tl(")<0)s.eh(o,"onclick",0,s.lc);}return r\');s.wds=function(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b.attachEvent(\'onclick\',s.bc);else if(s.b&'+"&s.b.addEventListener){if(s.n&&s.n.userAgent.indexOf('WebKit')>=0&&s.d.createEvent){s.bbc=1;s.useForcedLinkTracking=1;s.b.addEventListener('click',s.bc,true)}s.b.addEventListener('click',s.bc,false"+")}else s.eh(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900"+
"?1900:0));if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t"+".indexOf('='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountLis"+"t,m=s.dynamicAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.ind"+
"exOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s=this;if(s.un&&s.mpc('sa',arguments))return;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+"+"un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n.substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m'"+";m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s.wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n"+
"]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m){r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l[i]]=m[l[i]];r._il[r._in]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new "+'Function(\'n\',\'g\',\'e\',\'if(!g)g="m_"+n;var s=s_c_il[\'+s._in+\'],c=s[g+"_c"],m,x,f=0;if(s.mpc("m_a",arguments))return;if(!c)c=s.wd["s_"+g+"_c"];if(c&&s_d)s[g]=new Function("s",s_ft(s_d(c)))'+';x=s[g];if(!x)x=s.wd[\\\'s_\\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!="m_"+n)){m._i=f=1;if((""+x).indexOf("function")>=0)x(s);else s.m_m("x",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d'+
"=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i];if(!n||x==n){m=s.m_i(x);u=m[t];if(u){if((''+u).indexOf"+"('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u=m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}"+"}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o.e,1);g[i]=0}};s.loadModule=function(n,u,d,l,e,ln){var s"+
"=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.substring(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){"+"if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)cle"+"arTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c++;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'"+
"}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement(\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o.defer=true;o.onload=o.onreadystatechange=f1;o.f2=f2;o.l"+"=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catch(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m"+"_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}return m};s.voa=function(vo,r){var s=this,l=s.va_g,i,k,v,x;for(i=0;i<l.length;i++){k=l[i];v=vo[k];if(v||vo['!'+k]){"+
'if(!r&&(k=="contextData"||k=="retrieveLightData")&&s[k])for(x in s[k])if(!v[x])v[x]=s[k][x];s[k]=v}}};s.vob=function(vo){var s=this,l=s.va_g,i,k;for(i=0;i<l.length;i++){k=l[i];vo[k]=s[k];if(!vo'+"[k])vo['!'+k]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.dll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!s.m_m(\"d\")||d.getTime()-vo._t>=s.maxDelay){s.dll[i]=0"+";s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){var s=this,d=new Date;if(!vo)vo=new Object;s.vob(vo);vo._"+
"t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.maxDelay)s.maxDelay=250;s.dlt()};s.gfid=function(){var s=this,d='0123456789ABCDEF',k='s_fid',fid=s.c_r(k),h='',l='',i,j,m=8,n=4,"+"e=new Date,y;if(!fid||fid.indexOf('-')<0){for(i=0;i<16;i++){j=Math.floor(Math.random()*m);h+=d.substring(j,j+1);j=Math.floor(Math.random()*n);l+=d.substring(j,j+1);m=n=16}fid=h+'-'+l;}y=e.getYear()"+";e.setYear(y+2+(y<1900?1900:0));if(!s.c_w(k,fid,e))fid=0;return fid};s.applyADMS=function(){var s=this,vb=new Object;if(s.wd.ADMS&&!s.visitorID&&!s.admsc){if(!s.adms)s.adms=ADMS.getDefault();if(!s."+
"admsq){s.visitorID=s.adms.getVisitorID(new Function('v','var s=s_c_il['+s._in+'],l=s.admsq,i;if(v==-1)v=0;if(v)s.visitorID=v;s.admsq=0;if(l){s.admsc=1;for(i=0;i<l.length;i++)s.t(l[i]);s.admsc=0;}')"+");if(!s.visitorID)s.admsq=new Array}if(s.admsq){s.vob(vb);vb['!visitorID']=0;s.admsq.push(vb);return 1}else{if(s.visitorID==-1)s.visitorID=0}}return 0};s.track=s.t=function(vo){var s=this,trk=1,tm="+"new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1900?y"+
"+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),ta=-1,q='',qs='',code='',vb=new Object;if(s.mpc('t',arguments))return;"+"s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j='1.1';i"+"f(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Object;tcf=new Function('o','var e,i=0;try{i"+
"=new Iterator(o)}catch(e){}return i');i=tcf(o);if(i&&i.next){j='1.7';if(a.reduce){j='1.8';if(j.trim){j='1.8.1';if(Date.parse){j='1.8.2';if(Object.create)j='1.8.5'}}}}}}}}}if(s.apv>=4)x=screen.width"+"+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>"+"=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s"+
'.b.addBehavior("#default#homePage");hp=s.b.isHomePage(tl)?"Y":"N"}catch(e){}return hp\');hp=tcf(s,tl);tcf=new Function(\'s\',\'var e,ct=0;try{s.b.addBehavior("#default#clientCaps");ct=s.b.conne'+"ctionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.resolution=x;s.colorDepth=c;s.javascriptVer"+"sion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;s.td=1}if(vo){s.vob(vb);s.voa(vo)}s.fid=s.gfid();if(s.applyADMS())return"+
" '';if((vo&&vo._t)||!s.m_m('d')){if(s.usePlugins)s.doPlugins(s);if(!s.abort){var l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s._1_referrer){s.re"+"ferrer=r;s._1_referrer=1}s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk,p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.parentElement?o.par"+"entElement:o.parentNode;if(o){t=s.ot(o);n=s.oid(o);x=o.s_oidt}}if(!n||t=='BODY')o='';if(o){oc=o.onclick?''+o.onclick:'';if((oc.indexOf('s_gs(')>=0&&oc.indexOf('.s_oc(')<0)||oc.indexOf('.tl(')>=0)o="+
"0}}if(o){if(n)ta=o.target;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l)){s.pe='lnk_'+(t=='d'||t"+"=='e'?t:'o');s.pev1=(h?s.ape(h):'');s.pev2=(l?s.ape(l):'')}else trk=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(o.dataset&&o.dataset.sObjectId){s.wd.s_objectID=o.da"+"taset.sObjectId;}else if(o.getAttribute&&o.getAttribute('data-s-object-id')){s.wd.s_objectID=o.getAttribute('data-s-object-id');}else if(s.useForcedLinkTracking){s.wd.s_objectID='';oc=o.onclick?''+"+
"o.onclick:'';if(oc){var ocb=oc.indexOf('s_objectID'),oce,ocq,ocx;if(ocb>=0){ocb+=10;while(ocb<oc.length&&(\"= \\t\\r\\n\").indexOf(oc.charAt(ocb))>=0)ocb++;if(ocb<oc.length){oce=ocb;ocq=ocx=0;while"+"(oce<oc.length&&(oc.charAt(oce)!=';'||ocq)){if(ocq){if(oc.charAt(oce)==ocq&&!ocx)ocq=0;else if(oc.charAt(oce)==\"\\\\\")ocx=!ocx;else ocx=0;}else{ocq=oc.charAt(oce);if(ocq!='\"'&&ocq!=\"'\")ocq=0}o"+"ce++;}oc=oc.substring(ocb,oce);if(oc){o.s_soid=new Function('s','var e;try{s.wd.s_objectID='+oc+'}catch(e){}');o.s_soid(s)}}}}}if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+"+
"s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}else trk=0}if(trk||qs){s.sampled=s.vs(sed);if(trk){if(s.sampled)code=s.mr(sess,(vt"+"?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq()),0,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=s.lightProfileID=s.retrieveLightProfiles=s.deleteLightProfiles=''}s.sq(qs)}}}else s.dl(vo);if(vo)s.v"+"oa(vb,1);s.abort=0;s.pageURLRest=s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';return code};s.t"+
"rackLink=s.tl=function(o,t,n,vo,f){var s=this;s.lnk=o;s.linkType=t;s.linkName=n;if(f){s.bct=o;s.bcf=f}s.t(vo)};s.trackLight=function(p,ss,i,vo){var s=this;s.lightProfileID=p;s.lightStoreForSeconds="+"ss;s.lightIncrementBy=i;s.t(vo)};s.setTagContainer=function(n){var s=this,l=s.wd.s_c_il,i,t,x,y;s.tcn=n;if(l)for(i=0;i<l.length;i++){t=l[i];if(t&&t._c=='s_l'&&t.tagContainerName==n){s.voa(t);if(t.l"+"mq)for(i=0;i<t.lmq.length;i++){x=t.lmq[i];y='m_'+x.n;if(!s[y]&&!s[y+'_c']){s[y]=t[y];s[y+'_c']=t[y+'_c']}s.loadModule(x.n,x.u,x.d)}if(t.ml)for(x in t.ml)if(s[x]){y=s[x];x=t.ml[x];for(i in x)if(!Obj"+
"ect.prototype[i]){if(typeof(x[i])!='function'||(''+x[i]).indexOf('s_c_il')<0)y[i]=x[i]}}if(t.mmq)for(i=0;i<t.mmq.length;i++){x=t.mmq[i];if(s[x.m]){y=s[x.m];if(y[x.f]&&typeof(y[x.f])=='function'){if"+"(x.a)y[x.f].apply(y,x.a);else y[x.f].apply(y)}}}if(t.tq)for(i=0;i<t.tq.length;i++)s.t(t.tq[i]);t.s=s;return}}};s.wd=window;s.ssl=(s.wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=docum"+"ent;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgent;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVer"+
"sion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Explorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac="+"(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s"+".ns6+10));else s.apv=parseFloat(v);s.em=0;if(s.em.toPrecision)s.em=3;else if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i=='%U0100'?1:0))}if(s.oun)s."+
"sa(s.oun);s.sa(un);s.vl_l='timestamp,dynamicVariablePrefix,visitorID,fid,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods"+",cookieLifetime,pageName,pageURL,referrer,contextData,currencyCode,lightProfileID,lightStoreForSeconds,lightIncrementBy,retrieveLightProfiles,deleteLightProfiles,retrieveLightData';s.va_l=s.sp(s.vl"+"_l,',');s.vl_mr=s.vl_m='timestamp,charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,contextData,lightProfileID,lightStoreForSeconds,lightIncrementBy';s.vl_t=s.vl_l+',variableProvider,chan"+
"nel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,events2,products,linkName,linkType';var n;for(n=1;n<=75;n++){s.vl_t+=',prop'+n+',eVar'+n;s.vl_m+=',prop'+n+',eVar'+n}for(n=1;n"+"<=5;n++)s.vl_t+=',hier'+n;for(n=1;n<=3;n++)s.vl_t+=',list'+n;s.va_m=s.sp(s.vl_m,',');s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidth,"+"browserHeight,connectionType,homepage,pageURLRest,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disab"+
"leBufferedRequests,mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks,trackExternalLinks,trackInlineStats,linkLeaveQuerySt"+"ring,linkDownloadFileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,lightTrackVars,_1_referrer,un';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);s.conte"+"xtData=new Object;s.retrieveLightData=new Object;if(!ss)s.wds();if(pg){s.wd.s_co=function(o){return o};s.wd.s_gs=function(un){s_gi(un,1,1).t()};s.wd.s_dc=function(un){s_gi(un,1).t()}}",
b=window,e=b.s_c_il,f=navigator,l=f.userAgent,f=f.appVersion,m=f.indexOf("MSIE "),n=l.indexOf("Netscape6/"),h,k,j,a;if(c){c=c.toLowerCase();if(e)for(k=0;k<2;k++)for(h=0;h<e.length;h++){a=e[h];j=a._c;if((!j||j=="s_c"||k>0&&j=="s_l")&&(a.oun==c||a.fs&&a.sa&&a.fs(a.oun,c))){if(a.sa)a.sa(c);if(j=="s_c")return a}else a=0}}b.s_an="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";b.s_sp=new Function("x","d","var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.subst"+
"ring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a");b.s_jn=new Function("a","d","var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x");b.s_rep=new Function("x","o","n","return s_jn(s_sp(x,o),n)");b.s_d=new Function("x","var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d"+"=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn("+
"x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x");b.s_fe=new Function("c","return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");b.s_fa=new Function("f","var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':"+"a");b.s_ft=new Function("c","c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){i"+
"f(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")"+"'+c.substring(e+1);s=c.indexOf('=function(')}return c;");d=s_d(d);if(m>0){e=parseInt(h=f.substring(m+5));if(e>3)e=parseFloat(h)}else if(n>0)e=parseFloat(l.substring(n+10));else e=parseFloat(f);if(e<5||f.indexOf("Opera")>=0||l.indexOf("Opera")>=0)d=s_ft(d);if(!a){a=new Object;if(!b.s_c_in){b.s_c_il=new Array;
b.s_c_in=0}a._il=b.s_c_il;a._in=b.s_c_in;a._il[a._in]=a;b.s_c_in++}a._c="s_c";(new Function("s","un","pg","ss",d))(a,c,i,g);return a}function s_giqf(){var c=window,i=c.s_giq,g,d,b;if(i)for(g=0;g<i.length;g++){d=i[g];b=s_gi(d.oun);b.sa(d.un);b.setTagContainer(d.tagContainerName)}c.s_giq=0}s_giqf();btg.Hcode=s_gi("");if(typeof btg.Hcode==="object")btg.Hcode.setAccount=function(a){this.un=a};if(typeof btg.Hcode==="object")btg.Hcode.getNewRepeat=new Function(""+"var s=this,e=new Date(),cval,ct=e.getTime(),y=e.getYear();e.setTime"+"(ct+30*24*60*60*1000);cval=s.c_r('s_nr');if(cval.length==0){s.c_w("+"'s_nr',ct,e);return 'New';}if(cval.length!=0&&ct-cval<30*60*1000){s"+".c_w('s_nr',ct,e);return 'New';}if(cval<1123916400001){e.setTime(cv"+"al+30*24*60*60*1000);s.c_w('s_nr',ct,e);return 'Repeat';}else retur"+"n 'Repeat';");if(typeof btg.Hcode==="object")(function(a){a.Hcode.getTimeParting=new Function("t","z",""+"var s=this,cy;dc=new Date('1/1/2000');"+"if(dc.getDay()!=6||dc.getMonth()!=0){return'Data Not Available'}"+"else{;z=parseFloat(z);var dsts=new Date(s.dstStart);"+"var dste=new Date(s.dstEnd);fl=dste;cd=new Date();if(cd>dsts&&cd<fl)"+"{z=z+1}else{z=z};utc=cd.getTime()+(cd.getTimezoneOffset()*60000);"+"tz=new Date(utc + (3600000*z));thisy=tz.getFullYear();"+"var days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday',"+
"'Saturday'];if(thisy!=s.currentYear){return'Data Not Available'}else{;"+"thish=tz.getHours();thismin=tz.getMinutes();thisd=tz.getDay();"+"var dow=days[thisd];var ap='AM';var dt='Weekday';var mint='00';"+"if(thismin>30){mint='30'}if(thish>=12){ap='PM';thish=thish-12};"+"if (thish==0){thish=12};if(thisd==6||thisd==0){dt='Weekend'};"+"var timestring=thish+':'+mint+ap;if(t=='h'){return timestring}"+"if(t=='d'){return dow};if(t=='w'){return dt}}};");a.Hcode.currentYear=(new Date).getFullYear();var b=
7-(new Date("03/01/"+a.Hcode.currentYear)).getDay()+7+1,c=(7-(new Date("11/01/"+a.Hcode.currentYear)).getDay())%7+1;a.Hcode.dstStart="03/"+b+"/"+a.Hcode.currentYear;a.Hcode.dstEnd="11/"+c+"/"+a.Hcode.currentYear})(btg);if(typeof btg.Hcode==="object")btg.Hcode.getValOnce=new Function("v","c","e",""+"var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime("+")+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");if(typeof btg.Hcode==="object"){btg.Hcode.getPreviousValue=new Function("v","c","el",""+"var s=this,t=new Date,i,j,r='';t.setTime(t.getTime()+1800000);if(el"+"){if(s.events){i=split(el,',');j=split(s.events,',');for(x in i"+"){for(y in j){if(i[x]==j[y]){if(s.c_r(c)) r=s.c_r(c);v?s.c_w(c,v,t)"+":s.c_w(c,'no value',t);return r}}}}}else{if(s.c_r(c)) r=s.c_r(c);v?"+"s.c_w(c,v,t):s.c_w(c,'no value',t);return r}");var split=new Function("l","d",""+"var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x"+
"++]=l.substring(0,i);l=l.substring(i+d.length);}return a")};if(typeof btg.Hcode==="object"){btg.Hcode.getPercentPageViewed=new Function("",""+"var s=this;if(typeof(s.linkType)=='undefined'||s.linkType=='e'){var"+" v=s.c_r('s_ppv');s.c_w('s_ppv',0);return v;}");btg.Hcode.getPPVCalc=new Function("",""+"var s=s_c_il["+btg.Hcode._in+"],dh=Math.max(Math.max(s.d.body.scrollHeight,"+"s.d.documentElement.scrollHeight),Math.max(s.d.body.offsetHeight,s."+"d.documentElement.offsetHeight),Math.max(s.d.body.clientHeight,s.d."+"documentElement.clientHeight)),vph=s.wd.innerHeight||(s.d.documentE"+
"lement.clientHeight||s.d.body.clientHeight),st=s.wd.pageYOffset||(s"+".wd.document.documentElement.scrollTop||s.wd.document.body.scrollTo"+"p),vh=st+vph,pv=Math.round(vh/dh*100),cp=s.c_r('s_ppv');if(pv>100){"+"s.c_w('s_ppv','');}else if(pv>cp){s.c_w('s_ppv',pv);}");btg.Hcode.getPPVSetup=new Function("",""+"var s=this;if(s.wd.addEventListener){s.wd.addEventListener('load',s"+".getPPVCalc,false);s.wd.addEventListener('scroll',s.getPPVCalc,fals"+"e);s.wd.addEventListener('resize',s.getPPVCalc,false);}else if(s.wd"+
".attachEvent){s.wd.attachEvent('onload',s.getPPVCalc);s.wd.attachEv"+"ent('onscroll',s.getPPVCalc);s.wd.attachEvent('onresize',s.getPPVCa"+"lc);}");btg.Hcode.getPPVSetup()};if(typeof btg.Hcode==="object"){btg.Hcode.getQueryParam=new Function("p","d","u",""+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati"+"on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p"+".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-"+"1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i="+"=p.length?i:i+1)}return v");btg.Hcode.p_gpv=new Function("k","u",""+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"+
"=s.pt(q,'&','p_gvf',k)}return v");btg.Hcode.p_gvf=new Function("t","k",""+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."+"epa(v)}return ''")};if(typeof btg.Hcode==="object"&&btg.config.OmnitureIntegrate&&btg.config.OmnitureIntegrate.enabled){btg.Hcode.loadModule("Integrate");btg.Hcode.Integrate.onLoad=function(){var b=btg.config.OmnitureIntegrate.account,e=btg.config.Omniture.account;if(!btg.config.Omniture.enableFirstPartyCookie&&btg.config.Omniture.enableVisitorNamespace&&b&&e.indexOf(b)==-1){btg.Hcode.Integrate.add("CopyHit");var c=0;btg.Hcode.Integrate.CopyHit.useVars=function(d,f){var a="",g=btg.Environment.getCnamedDomain();if(c==
0)a=window["s_i_"+d.visitorNamespace].src;else a=window["s_i_"+d.visitorNamespace+"_"+c].src;a=a.replace(d.visitorNamespace+".112.2o7.net",g);a=a.replace(e,b);f.beacon(a);c++}}};btg.Hcode.m_Integrate_c="var m=s.m_i('Integrate');m.add=function(n,o){var m=this,p;if(!o)o='s_Integrate_'+n;if(!m.s.wd[o])m.s.wd[o]=new Object;m[n]=new Object;p=m[n];p._n=n;p._m=m;p._c=0;p._d=0;p.disable=0;p"+".get=m.get;p.delay=m.delay;p.ready=m.ready;p.beacon=m.beacon;p.script=m.script;m.l[m.l.length]=n};m._g=function(t){var m=this,s=m.s,i,p,f=(t?'use':'set')+'Vars',tcf;for(i=0;i<m.l.length;i++){p=m[m."+
"l[i]];if(p&&!p.disable&&p[f]){if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','p','f','var e;try{p[f](s,p)}catch(e){}');tcf(s,p,f)}else p[f](s,p)}}};m._t=function(){this._g(1)};m._fu=func"+"tion(p,u){var m=this,s=m.s,v,x,y,z,tm=new Date;if(u.toLowerCase().substring(0,4) != 'http')u='http://'+u;if(s.ssl)u=s.rep(u,'http:','https:');p.RAND=Math&&Math.random?Math.floor(Math.random()*10000"+"000000000):tm.getTime();p.RAND+=Math.floor(tm.getTime()/10800000)%10;x=0;while(x>=0){x=u.indexOf('[',x);if(x>=0){y=u.indexOf(']',x);if(y>x){z=u.substring(x+1,y);if(z.length>2&&z.substring(0,2)=='s."+
"'){v=s[z.substring(2)];if(!v)v=''}else{v=''+p[z];if(!(v==p[z]||parseFloat(v)==p[z]))z=0}if(z) {u=u.substring(0,x)+s.rep(escape(v),'+','%2B')+u.substring(y+1);x=y-(z.length-v.length+1)} else {x=y}}}"+"}return u};m.get=function(u,v){var p=this,m=p._m;if(!p.disable){if(!v)v='s_'+m._in+'_Integrate_'+p._n+'_get_'+p._c;p._c++;p.VAR=v;p._d++;m.s.loadModule('Integrate:'+v,m._fu(p,u),0,1,p._n)}};m.delay"+"=function(){var p=this;if(p._d<=0)p._d=1};m.ready=function(){var p=this,m=p._m;p._d=0;if(!p.disable)m.s.dlt()};m._d=function(){var m=this,i,p;for(i=0;i<m.l.length;i++){p=m[m.l[i]];if(p&&!p.disable&"+
"&p._d>0)return 1}return 0};m._x=function(d,n){var p=this[n],x;if(!p.disable){for(x in d)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))p[x]=d[x];p._d--}};m.beacon=function(u){var p=this,m"+"=p._m,s=m.s,imn='s_i_'+m._in+'_Integrate_'+p._n+'_'+p._c,im;if(!p.disable&&s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){p._c++;im=s.wd[imn]=new Image;im.src=m._fu(p,u)}};m.s"+"cript=function(u){var p=this,m=p._m;if(!p.disable)m.s.loadModule(0,m._fu(p,u),0,1)};m.l=new Array;if(m.onLoad)m.onLoad(s,m)";
btg.Hcode.m_i("Integrate")};btg.Loadtime={initTime:Number(new Date),initFlag:0,timeRangeArr:[0,0.9,2.9,4.9,6.9,9.9,12.9,15.9,19.9,24.9,30],reportURL:"http://{suiteName}.112.2o7.net/b/ss/{suiteName}/1/H.1-pdv-2/{ord}?pageName={siteName}&c11=PLAYER-LOAD-TEST&c12={delta}&events=event1&products=;;;;event1={playerLoadTime}",suiteName:"viarnd",siteNameVal:"media.mtvnservices.com",timerStateCheck:function(a){if(typeof siteName!="undefined")this.siteNameVal=siteName;if(a=="connected"&&this.initFlag==0){this.initFlag++;var d=a=(Number(new Date)-
this.initTime)/1E3,a=a>30?30:a,c=0;switch(a){case 0:c="0-1";break;case 30:c="30";break;default:for(var b=1,e=this.timeRangeArr.length;b<e;b++)if(this.timeRangeArr[b-1]<a&&this.timeRangeArr[b]>=a){c=Math.ceil(this.timeRangeArr[b-1])+"-"+Math.ceil(this.timeRangeArr[b]);break}}this.reportURL=this.reportURL.replace(/http:/,"https:"==document.location.protocol?"https:":"http:").replace(/\{suiteName\}/g,this.suiteName).replace(/\{ord\}/,Math.floor(Math.random()*1E12)).replace(/\{siteName\}/g,this.siteNameVal).replace(/\{delta\}/,
c).replace(/\{playerLoadTime\}/,d);(new Image).src=this.reportURL}}};btg.MediaPlayer={context:null,playerCommandQueue:null,isBrightcove:false,isPlayerAvailable:false,isHtml5:false,html5MetaData:{},init:function(a){this.context=a;this.playerCommandQueue=new btg.QueueManager({id:"btg.MediaPlayer.playerCommandQueue",timeToWait:100,maxNumItems:10,maxElapsed:1E3,handler:this.execute})},playStarted:false,players:[],addPlayer:function(a,b){var c=this.isHtml5?a.id:a;this.players[c]=new this.Player(a,b);return this.players[c]},setEndSlateClick:function(a){var b=btg.Cookie.set;
b("mtvn_btg_esclicked",a)},getEndSlateClick:function(){return btg.Cookie.read("mtvn_btg_esclicked")},PlayerController:function(a,b){return this.addPlayer(a,b)},pause:function(){var a=btg.MediaPlayer,b;for(b in a.players)if(a.players.hasOwnProperty(b))a.players[b].player.pause()},unpause:function(){var a=btg.MediaPlayer,b;for(b in a.players)if(a.players.hasOwnProperty(b))if(a.players[b].player.unpause)a.players[b].player.unpause();else if(a.players[b].player.play)a.players[b].player.play()},execute:function(a){var b=
btg.MediaPlayer;if(b.playStarted||b.isPlayerAvailable)switch(a){case "unpause":b.unpause();break;case "pause":b.pause()}else b.playerCommandQueue.queue.push(a)},reportingInit:function(){try{btg.config.Omniture.videoViewEventDisable=true;btg.Demdex.sendIdSyncCall()}catch(a){}},getFirstPartyServer:function(){var a=null;if(btg.config.Omniture.enableFirstPartyCookie)a=btg.Environment.getCnamedDomain();return a},getVmnUUID:function(){return btg.Cookie.read("vmn_uuid")},setDemdexFWSegment:function(){var a=
btg.Demdex.getFWSegment(),b=btg.MediaPlayer;if(a)for(var c in b.players)if(b.players.hasOwnProperty(c)&&b.players[c].player&&b.players[c].player.setDemdexFWSegment)b.players[c].player.setDemdexFWSegment(a)},Player:function(a,b){var c=btg.Controller,g=btg.Cookie,f=btg.MediaPlayer,i=btg.config;this.playerId=this.isHtml5?a.id:a;this.player=this.lastGuid=null;this.playerLoaded=false;this.onLoaded=function(){this.player=f.getPlayerObject(a);this.playerLoaded=true;if(!btg.MediaPlayer.isBrightcove){f.addListeners(this.player);
if(typeof window[b]=="function")b(this)}btg.MediaPlayer.isPlayerAvailable=true};this.onDump=function(){};this.dump=function(){var a="";if(this.playerLoaded)a=this.player.getLogDump();else a="player not loaded";this.onDump(a)};this.onPlayHeadUpdate=function(a){a=f.isHtml5?a.data:a;if((a=a==-1||a==null||typeof a=="undefined"?1.5:a)&&a>1)if(!f.playStarted){f.playStarted=true;f.playerCommandQueue.init()}};this.onMetaData=function(a){if(btg.MediaPlayer.isHtml5)try{html5MetaData=a={guid:a.data.rss.guid,
contentType:a.data.rss.group.categories.contentType}}catch(b){}if(location.search.match(/showMetaData\=true/)){str="";for(m in a)str+=m+": "+a[m]+"\n";alert(this.lastGuid+"\n\n\n"+str)}var d="",e=document.location.search,h=e.toLowerCase().indexOf("xrs=mpes_")!=-1?true:false,j=a.contentType==="c3_adpod";if(h)for(var e=e.replace(/^\?/g,"").split("&"),h=0,k=e.length;h<k;h++)if(e[h].split("=")[0]=="xrs")d=btg.String.isDefined(e[h].split("=")[1])?e[h].split("=")[1]:"";if(a.guid&&this.lastGuid!==a.guid){d=
{linkName:"Video View",linkType:"o",eVar28:a.contentType,events:"event15"+(f.getEndSlateClick()=="true"?",event45":""),campaign:d};if(typeof i.Omniture.enableTestAndTargetTrial!="undefined"&&i.Omniture.enableTestAndTargetTrial){(e=g.read("mtvn_btg_tnt"))?e.split("_")[0]:"";e?e.split("_")[1]:"false"}g.set("mtvn_btg_tnt","");if(btg.globalvars.FW_BLOCKED){d.events+=btg.String.isDefined(d.events)&&d.events.lastIndexOf(",")==d.events.length-1?"event79":",event79";d.eVar25="Freewheel Blocked"}if(typeof i.Omniture.videoViewEventDisable!=
"undefined"&&i.Omniture.videoViewEventDisable){if(btg.globalvars.FW_BLOCKED){d={linkName:"Freewheel Blocked",linkType:"o",eVar25:"Freewheel Blocked",events:"event79"};c.sendLinkEvent(d)}}else{if(typeof btg.UserSegment!="undefined"){btg.UserSegment.add(f.context,"VideoViewer");if(j)btg.UserSegment.add(btg.MediaPlayer.context,"C3VideoViewer")}f.setEndSlateClick("false");c.sendLinkEvent(d)}}this.lastGuid=a.guid};this.onEndslateLoad=function(){if(typeof this.onEndslateFired!="undefined")return;else this.onEndslateFired=
true;if(typeof btg.UserSegment!="undefined")btg.UserSegment.add(f.context,"EndslateViewer");c.sendLinkEvent({linkName:"Endslate View",linkType:"o",events:"event44"})}},getPlayerObject:function(a){if(btg.MediaPlayer.isHtml5)a=a;else if(btg.MediaPlayer.isBrightcove)a=bcPlayer.getPlayer(a).getModule(APIModules.VIDEO_PLAYER);else{if(navigator.appName.indexOf("Microsoft"))a=window[a]?window[a]:document[a]?document[a]:null;else a=document[a]?document[a]:window[a]?window[a]:null;if(a&&typeof a.length!="undefined")for(var b in a)if(typeof a[b].pause!=
"undefined"){a=a[b];break}}return a},addListeners:function(a){if(btg.MediaPlayer.isHtml5){a.addEventListener("onMetadata",btg.MediaPlayer.players[a.id].onMetaData);a.addEventListener("onPlayheadUpdate",btg.MediaPlayer.players[a.id].onPlayHeadUpdate)}else if(!btg.MediaPlayer.isBrightcove){a.addEventListener("METADATA",'btg.MediaPlayer.players["'+a.id+'"].onMetaData');a.addEventListener("ENDSLATE_CLICK",'btg.MediaPlayer.players["'+a.id+'"].onEndslateLoad');a.addEventListener("PLAYHEAD_UPDATE",'btg.MediaPlayer.players["'+
a.id+'"].onPlayHeadUpdate');if(a.addReportingEventListener){a.addReportingEventListener("DEMDEXVIDEOSTARTCALL","btg.Demdex.sendPageCall");a.addReportingEventListener("DEMDEXVIDEOENDCALL","btg.Demdex.sendPageCall");a.addReportingEventListener("DEMDEXEMBED","btg.Demdex.sendSocialCall");a.addReportingEventListener("DEMDEXLINK","btg.Demdex.sendSocialCall");a.addReportingEventListener("DEMDEXSHARE","btg.Demdex.sendSocialCall");a.addReportingEventListener("REPORTINGINIT","btg.MediaPlayer.reportingInit");
a.addReportingEventListener("FIRSTPARTYSERVER","btg.MediaPlayer.getFirstPartyServer");a.addReportingEventListener("VMNUUID","btg.MediaPlayer.getVmnUUID");a.addReportingEventListener("ENDSLATECLICK","btg.MediaPlayer.setEndSlateClick")}}},onWindowLoaded:function(){var a=btg.MediaPlayer,b=window.mtvnPlayerLoaded;window.mtvnPlayerLoaded=function(c){var g;if(btg.Object.isDefined(c)){a.isHtml5=true;g=c.id;if(c.isFlash){a.isHtml5=false;c=c.id}}else g=c;if(typeof b!="undefined")b(g);if(!a.isHtml5&&typeof document.getElementById(g)==
"undefined")return;if(typeof a.players[g]=="undefined")a.addPlayer(c);a.players[g].onLoaded()}}};try{var onTemplateLoaded=function(a){btg.MediaPlayer.isBrightcove=true;btg.MediaPlayer.addPlayer(a);btg.MediaPlayer.players[a].onLoaded()};btg.MediaPlayer.onWindowLoaded();var MTVNPlayer=MTVNPlayer||{};MTVNPlayer.addCallback=function(a){this.onAPIReady=function(b){return b?function(){b();a()}:a}(this.onAPIReady)};MTVNPlayer.addCallback(function(a){return function(){MTVNPlayer.onPlayer(a)}}(mtvnPlayerLoaded))}catch(e$$4){};btg.Preload=function(){this.playUpUrl=location.protocol+"//media.mtvnservices.com/player/images/Button_playBig_upSkin.png";this.playOverUrl=location.protocol+"//media.mtvnservices.com/player/images/Button_playBig_overSkin.png";this.playButtonWidth=92;this.playButtonHeight=70;this.embedCount=0;this.getElementsByClassName=function(a,d){for(var e=[],c=new RegExp("\\b"+d+"\\b"),b=document.getElementsByTagName(a),f=0,h=b.length;f<h;f++)if(c.test(b[f].className))e.push(b[f]);return e};this.attachClickToWrappers=
function(a,d,e){for(var a=this.getElementsByClassName("div",a),c=0,b=a.length;c<b;c++)this.onClickWrapper(a[c],d,e)};this.attachToWrappers=function(a,d,e){for(var a=this.getElementsByClassName("div",a),c=0,b=a.length;c<b;c++)this.attachToWrapper(a[c],d,e)};this.attachToWrapper=function(a,d,e){var c=this.embedCount,b="pUp"+this.embedCount,f="pOver"+this.embedCount,h=a.getElementsByTagName("img")[0];a.style.position="relative";var g=document.createElement("img");g.src=this.playOverUrl;g.style.position=
"absolute";g.style.zIndex=15;g.style.left=h.width/2-this.playButtonWidth/2;g.style.top=h.height/2-this.playButtonHeight/2;g.style.display="none";g.className="pOver";g.id=f;var i=document.createElement("img");i.src=this.playUpUrl;i.style.position="absolute";i.style.zIndex=15;i.style.left=h.width/2-this.playButtonWidth/2;i.style.top=h.height/2-this.playButtonHeight/2;i.style.display="block";i.className="pUp";i.id=b;a.m=new Object;a.m.idNumber=c;a.m.overIdName=f;a.m.upIdName=b;a.appendChild(g);a.appendChild(i);
this.onClickWrapper(a,d,e);this.onEnterWrapper(a);this.onExitWrapper(a);this.embedCount++};this.onEnterWrapper=function(a){a.onmouseover=function(){document.getElementById(this.m.overIdName).style.display="block";document.getElementById(this.m.upIdName).style.display="none"}};this.onExitWrapper=function(a){a.onmouseout=function(){document.getElementById(this.m.overIdName).style.display="none";document.getElementById(this.m.upIdName).style.display="block"}};this.createEmbedTag=function(a,d,e,c){var b=
document.createElement("embed");b.setAttribute("src",location.protocol+"//media.mtvnservices.com/"+a);b.setAttribute("height",d);b.setAttribute("width",e);b.setAttribute("id",a);b.setAttribute("flashVars",c);b.setAttribute("wmode","window");b.setAttribute("allowFullScreen",true);b.setAttribute("allowScriptAccess","always");b.setAttribute("type","application/x-shockwave-flash");b.style.backgroundColor="black";return b};this.onClickWrapper=function(a,d,e){a.onclick=function(){var c=this.id,b;if(this.getElementsByTagName("q").length>
0)b=this.getElementsByTagName("q")[0].innerHTML;if(this.getAttribute("flashVars"))b=this.getAttribute("flashVars");if(d==0){var f=this.getElementsByTagName("img")[0];d=f.height;e=f.width}pOver=document.getElementById(this.m.overIdName);this.removeChild(pOver);pUp=document.getElementById(this.m.upIdName);this.removeChild(pUp);for(var f=this.getElementsByTagName("img"),h=0,g=f.length;h<g;h++)this.removeChild(f[h]);this.appendChild(MTVNPlayerPreload.createEmbedTag(c,d,e,b));a.onmouseout=function(){};
a.onmouseover=function(){};a.onclick=function(){}}}}();

//Attempting to include CODA/builds/3/Ads.js
(function(e){e.KeyValues=function(a){this.delimiter=g(a)?a:";";this.pairs={mobile:{k:null,slot:null},sections:{sec0:null,sec1:null,sec2:null,sec3:null,sec4:null,sec5:null,sec6:null,sec7:null,sec8:null,sec9:null,secN:null},required:{pos:null,tag:null,mtype:null},site:{art:null,gen:null,pform:null,partner:null,vid:null,demo:[],dl:null,ga:null,event:null,node:null},custom:{},reserved:{sz:null,tile:null,dcmt:null,dcopt:null,"!category":[],dcove:null,u:null,spotlight:null,ord:null}}};e.KeyValues.prototype=
{add:function(a){if(g(a))a=a.split(this.delimiter);for(var c=a.length,d=0;d<c;d++){if(a[d].indexOf("=")<0)continue;var b=a[d].split("="),h=b[0].replace(/[^A-Za-z0-9\-\_\/\!]/gim,"_"),b=b[1].replace(/[^A-Za-z0-9\-\_\/\.\?\,\%]/gim,"_");if(!g(b)||/(null|undefined)/.test(b))continue;var e=false;for(p in this.pairs){if(!this.pairs.hasOwnProperty(p))continue;var f=this.pairs[p];if(typeof f[h]!=="undefined"){i(f,h,b);e=true}}if(!e)i(this.pairs.custom,h,b)}},toString:function(){var a=[];for(p in this.pairs){if(!this.pairs.hasOwnProperty(p))continue;
var c=this.pairs[p];for(key in c){var d=c[key];if(d==null)continue;if(f(d))for(var b=0,e=d.length;b<e;b++)a.push(key+"="+d[b]);else a.push(key+"="+d)}}return a.join(this.delimiter)}};var g=e.String.isDefined,f=e.Object.isArray,i=function(a,c,d){if(typeof a[c]=="undefined")a[c]=[];if(f(a[c])){for(var b=0,e=a[c].length;b<e;b++)if(a[c][b]==d)return a[c];a[c].push(d)}else a[c]=d;return a[c]}})(btg);btg.AdManager=function(){if(btg.isDOMLoaded)this.createAdsFromMarkup();else btg.DOM.Events.addListener(document,"DOMContentLoaded",function(){btg.AdManager.createAdsFromMarkup()});var e=btg.String.isDefined,m=btg.Object.isDefined,i=btg.Number.isInt,o=btg.Object.isConfigDefined,c={},b={tile:1,slot:1,reloadIntervalDefault:3E4,reloadIntervalMin:1E4,ord:null},j=false,f=b.reloadIntervalDefault,n=false,g=new btg.DependencyManager(4E3);if(o(btg.config.Demdex)&&btg.Demdex)g.add("demdex_data",function(){return btg.Object.isDefined(btg.Demdex.data)},
100,true);if(btg.config.Omniture.enableGuidPlugin==true&&btg.Omniture)g.add("uuid",function(){return e(btg.Cookie.read("vmn_uuid"))&&btg.Cookie.read("vmn_3pc")!="0"},100,true);var k=function(a){a=btg.AdManager.getAd(a);a.place();return a};return{keyValues:new btg.KeyValues,init:function(){if(!i(b.ord))b.ord=this.getNewOrd();btg.Object.copyProperties(btg.config.DoubleClick,b,true);if(e(b.keyValues))this.keyValues.add(b.keyValues);if(b.reloadableAds){j=b.reloadableAds;delete b.reloadableAds}if(b.reloadInterval){f=
b.reloadInterval;delete b.reloadInterval}return this},getNewOrd:function(){return btg.Math.random(1E17,1E18)},addKeyValues:function(a){this.keyValues.add(a);return this},getAd:function(a){this.init();var l=i(a.tile),d=i(a.slot);btg.Object.copyProperties(b,a);var e=new btg.DoubleClick(a);if(!l)b.tile++;if(!d)b.slot++;if(!a.isSurrogate)c[e.id]=e;return e},getAds:function(){return c},placeAd:function(a){this.init();if(btg.isDOMLoaded)a.isUnobtrusive=true;if(typeof j=="boolean"&&j==true&&!n){n=true;if(i(f)&&
f<=b.reloadIntervalMin)f=b.reloadIntervalMin;setInterval("btg.AdManager.reloadAll(false)",f)}if(btg.config.DoubleClick.isUnobtrusive&&a.isUnobtrusive!==false||a.isUnobtrusive===true)if(btg.isDOMLoaded){if(!a.containerDOMID){btg.Error.log("Coda: You cannot place an ad after the DOM has loaded without specifying the id of an existing element in which to insert the ad.");return}return k(a)}else{if(!a.containerDOMID||!m(document.getElementById(a.containerDOMID))){a.containerDOMID="ad-"+b.tile+"-container";
var l="<div id='"+a.containerDOMID+"'";if(a.isSurrogate==true)l+=" style='display:none;visibility:hidden;position:absolute;top:0px;left:0px;width:0px;height:0px;'";l+="></div>";document.write(l)}btg.DOM.Events.addListener(document,"DOMContentLoaded",function(){if(g.hasDependency())g.addToCallQueue(btg.AdManager,function(){return k(a)});return k(a)})}else return k(a)},createAdsFromMarkup:function(){if(document.querySelectorAll)var a=document.querySelectorAll("div[id][data-ad-sizes]");else for(var a=
[],b=document.getElementsByTagName("div"),d=0,c=b.length;d<c;d++){var f=b[d];if(e(f.id)&&e(f.getAttribute("data-ad-sizes")))a.push(f)}if(!m(a)||a.length<1)return;b=0;for(c=a.length;b<c;b++){var h=a.item?a.item(b):a[b],d=h.id,f=h.getAttribute("data-ad-sizes"),g=h.getAttribute("data-ad-keyvalues"),g=e(g)?g:"",h=h.getAttribute("data-ad-reload-interval"),j=i(h)&&h>0?true:false;k({isUnobtrusive:true,contentType:"adi",containerDOMID:d,size:f,keyValues:g.replace(/,/g,";"),isReloadable:j,reloadInterval:h})}btg.AdManager.createAdsFromMarkup=
function(){return false}},getAdUrl:function(a){return this.getAd(a).url},reloadAll:function(a){var b=this.getNewOrd(),d;for(d in c){if(!c.hasOwnProperty(d))continue;if(!a&&(c[d].config.isReloadable==false||i(c[d].config.reloadInterval)))continue;c[d].reload(b);c[d].clearReloadInterval()}return this},reloadAd:function(a){if(e(a))a=c[a];if(!m(a))return;a.clearReloadInterval();a.reload();return this},hideAd:function(a){if(!e(a.adId)||!m(c[a.adId]))return;c[a.adId].hide();return this}}}();btg.SurrogateAd=new function(){var b={poe:{size:"6x6",cookieName:"vmn_poe",contentType:"adj",position:"atf",isAllowed:function(){if(typeof btg.config.enablePOE=="undefined"||!btg.config.enablePOE)return false;if(typeof btg.config.DoubleClick.keyValues!="undefined"&&/\!category\=poe/.test(btg.config.DoubleClick.keyValues))return false;return true},setKeyValues:function(){if(typeof btg.config.LocalAdvisory=="undefined"||!btg.config.LocalAdvisory.enabled)return;if(!btg.Number.isInt(btg.config.LocalAdvisory.phase)||
btg.config.LocalAdvisory.phase==0)return;if(/vmn_la_freq=1/.test(document.cookie))return;var a=new Date,b=a.getTime()+7200*1E3;a.setTime(b);document.cookie="vmn_la_freq=1"+"; expires="+a.toGMTString()+"; path=/";if(btg.config.LocalAdvisory.useStaticCreative){if(a=document.getElementById(btg.config.LocalAdvisory.staticCreativeDomID)){a.style.display="block";a.style.visibility="visible"}return}a=location.hostname;if(/^www./i.test(a))a=a.substring(4);btg.AdManager.addKeyValues("host="+a);btg.AdManager.addKeyValues("phase="+
btg.config.LocalAdvisory.phase);if(typeof vmn_btg_ESIVars!="undefined")btg.AdManager.addKeyValues("provider="+vmn_btg_ESIVars.asnum)}}};this.load=function(a){if(!btg.Object.isConfigDefined(btg.config.DoubleClick))return;btg.Controller.init();if(btg.String.isDefined(a)&&btg.Object.isDefined(b[a])&&btg.Object.isConfigDefined(btg.config.DoubleClick)){a=b[a];if(typeof a.isAllowed!="undefined"&&!a.isAllowed())return;if(typeof a.setKeyValues=="function")a.setKeyValues();a.isSurrogate=true;if(btg.String.isDefined(a.cookieName)){if(!btg.String.isDefined(btg.Cookie.read(a.cookieName))){btg.AdManager.placeAd(a);
btg.Cookie.set(a.cookieName,a.size)}}else btg.AdManager.placeAd(a)}}};(function(b){b.DoubleClick=function(d){function h(a){if(i(a)&&e(a.id)&&e(a.url)){var b=window.frames[a.id];if(b&&b.location)b.location.replace(a.url)}}function k(a){var b=a.config,c=a.id,a=a.url,d="";if(b.isSurrogate)d+="<div style='display:none;visibility:hidden;position:absolute;top:0px;left:0px;width:0px;height:0px;'>";d+="<scr"+'ipt type="text/javascript" id="'+c+'" src="'+a+'"><'+"/script>";if(b.isSurrogate)d+="</div>";return d}function l(a){var b=a.config,c="";if(b.isSurrogate)c+="<div style='display:none;visibility:hidden;position:absolute;top:0px;left:0px;width:0px;height:0px;'>";
c+='<iframe allowtransparency="true" src="'+a.url+"\" onload=\"btg.Events['AD_LOAD'].fire('"+a.id+'\');" id="'+a.id+'" name="'+a.id+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="'+a.width+'" height="'+a.height+'"></iframe>';if(b.isSurrogate)c+="</div>";return c}function m(a){var d=a.config,c=document.createElement("iframe");c.setAttribute("id",a.id);c.setAttribute("name",a.id);c.onload=function(){b.Events.AD_LOAD.fire(a.id)};c.setAttribute("frameborder","0");c.setAttribute("allowtransparency",
"true");c.setAttribute("scrolling","no");c.setAttribute("marginheight","0");c.setAttribute("marginwidth","0");c.setAttribute("width",a.width);c.setAttribute("height",a.height);if(d.isSurrogate)c.setAttribute("style","display:none;visibility:hidden;position:absolute;top:0px;left:0px;width:0px;height:0px;");return c}if(!d)return{};var e=b.String.isDefined,i=b.Object.isDefined,f=b.Number.isInt,j=b.Error.log,g,n=b.config.DoubleClick.isInternational==true?true:false,o=function(a){var b=a.config.DoubleClick.allowMobile==
true&&(a.Environment.userAgent.isMobile||a.Environment.userAgent.isTablet);if(n)return a.DoubleClickURL_International;else if(b)return a.DoubleClickURL_Mobile;else return a.DoubleClickURL_Domestic}(b);return b.Singleton({__construct:{config:d,init:function(){this.config=d;if(!e(this.config.dartSite))j("Coda: To generate an ad or ad URL, you must define a DART site.");if(!e(this.config.size))j("Coda: To generate an ad or ad URL, you must define a size.");if(!e(this.config.contentType))this.config.contentType=
"adj";if(this.config.isReloadable==true||b.config.DoubleClick.reloadableAds&&this.config.isReloadable!=false||this.config.isUnobtrusive==true)this.config.contentType="adi";if(this.config.size.indexOf(",")>0)this.config.useScriptTag=true;this.url="undefined";this.id=this.config.id="ad_"+d.tile;this.width=d.size.split("x")[0];this.height=d.size.split("x")[1];if(b.Rubicon){b.Rubicon.makeRequest(d.size);d=b.Rubicon.appendKeyValues(d)}if(d.url)this.url=d.url;else{var a=new b.DoubleClickURL(o,this.config);
this.url=a.url;this.config=a.config}},place:function(){var a=this.config;if(a.size=="6x6")if(e(b.Cookie.read("vmn_poe")))return null;else b.Cookie.set("vmn_poe","6x6");var d=this.id;if(/mockupmode=1/i.test(location.search)){document.write(this.url);return}if(a.useScriptTag!==false&&a.contentType=="adj"){a=k(this);document.write(a);return}else if(a.isUnobtrusive){if(!e(a.containerDOMID)||!i(document.getElementById(a.containerDOMID)))return;var c=m(this);document.getElementById(a.containerDOMID).appendChild(c);
h(this)}else{c=l(this);document.write(c)}if(a.isReloadable==true&&f(a.reloadInterval)){_reloadInterval=a.reloadInterval>a.reloadIntervalMin?a.reloadInterval:a.reloadIntervalMin;g=setInterval(function(){var a=b.AdManager.getAds()[d];if(a)a.reload()},_reloadInterval)}},reload:function(a){if(this.config.useScriptTag){this.clearReloadInterval();return this}if(!f(a))this.config.ord=b.AdManager.getNewOrd();else this.config.ord=a;this.init();h(this);return this},clearReloadInterval:function(){if(f(g)){this.config.isReloadable=
false;clearInterval(g)}return this},hide:function(){var a=document.getElementById(this.id);if(a)a.style.display="none"}}})}})(btg);btg.DoubleClickURL=function(f,d){var b=btg.String.isDefined,e=btg.Number.isInt,g={url:"",UVALS_DELIMITER:"-",config:d,keyValues:new btg.KeyValues,urlParts:{server:"",contentType:"",dartSite:"",positionType:"",zone:"",keyValues:"",ord:btg.AdManager.ord},configure:function(){if(!b(this.config.mediaType))this.config.mediaType="standard";if(b(this.config.protocol))this.urlParts.protocol=this.config.protocol;if(b(d.server))this.urlParts.server=this.config.server;if(b(this.config.contentType))this.urlParts.contentType=
this.config.contentType;if(e(d.ord))this.urlParts.ord=this.config.ord;if(b(this.config.keyValues))this.keyValues.add(this.config.keyValues);this.keyValues.add(btg.AdManager.keyValues.toString())},getSections:function(){var a=this.config;if(b(a.sections))a=a.sections.charAt(0)=="/"?a.sections.substring(1):a.sections;else a=location.pathname.substring(1);var a=a.split("/"),c=a.length-1;if(e(a[0].charAt(0)))a[0]="_"+a[0];if(a[0]=="")a[0]="_hp";else if((a.length<2||a[1]=="")&&a[0]!="_hp")a[1]="_mn";if(a[c].indexOf(".")>=
0)a[c]=a[c].substring(0,a[c].lastIndexOf("."));return a}};return btg.Singleton({__construct:f,__extend:g,__implement:{init:function(){}}})};btg.DoubleClickURL_Domestic=function(){function i(a){a=a.config;if(d(a.contentType))return a.contentType;return"adj"}function j(a){a=a.config.dartSite;if(!d(a))return false;if(btg.Environment.getPlatform()==="iPad"&&a.indexOf(".tab")===-1)a+=".tab";return a}function k(a){var c=a.config,b=function(){if(c.isUnobtrusive){var a=document.getElementById(c.domContainerId);if(a){var a=parseInt(a.adOffsetTop),b=parseInt(document.documentElement.clientHeight);return!isNaN(a)&&!isNaN(b)&&a<b?"atf":"btf"}else return"unk"}else{if(d(c.position))return c.position;
if(d(c.positionThreshold))c.positionThreshold=parseInt(c.positionThreshold);if(!f(c.positionThreshold))return"unk";a=d(btg.Cookie.read("vmn_poe"))?c.positionThreshold:c.positionThreshold+1;return c.tile<=a?"atf":"btf"}}();a.keyValues.add("pos="+b);switch(c.contentType){case "adi":a="i";break;case "a":a="a";break;default:a="j"}var e=c.mediaType.substring(0,1);return b+"_"+a+"_"+e}function l(a){if(!d(a.keyValues.pairs.site.partner))return"";a.keyValues.add("!category="+a.keyValues.pairs.site.partner);
a.keyValues.add("!category=partner");return a.keyValues.pairs.site.partner+"/"}function m(a){var c=a.config;return function(){var b=d(c.zoneOverride)?c.zoneOverride.replace(/^\/?(a|b)tf_\w_\w\//,"").split("/"):a.getSections();if(d(a.keyValues.pairs.custom.vertical)){b.unshift(a.keyValues.pairs.custom.vertical);a.keyValues.add("!category="+a.keyValues.pairs.custom.vertical);a.keyValues.add("!category=vertical")}return b=b.join("/")}().substring(0,62)}function n(a){var c=a.config,b="u=",e=btg.Cookie.read("vmn_uuid");
if(d(e)){b+=e;if(btg.config.Yieldex.enabled)b+=a.UVALS_DELIMITER;else a.keyValues.add(b)}e=function(a){for(var c=a.getSections(),b=[],d=0;d<c.length;d++)b.push("sec"+d+"="+c[d]);a.keyValues.add(b.join(";"));return b.join(";")}(a);a.keyValues.add(e);if(btg.config.Yieldex.enabled&&d(e)){e=e.replace(/=/g,"_");e=e.replace(/;/g,"-");b+=e;a.keyValues.add(b)}if(h(btg.config.Criteo)&&btg.Criteo){b=btg.Criteo.getKeyValue();if(d(b)){if(b.length>64){new btg.Alert("Criteo targeting params over max length limit: "+
b,2);b=b.substring(0,64);b=b.substring(0,b.lastIndexOf(";"))}a.keyValues.add(b)}}if(h(btg.config.Demdex)&&btg.Demdex){b=function(){btg.Demdex.setData();var a=btg.Demdex.getSegment("dfp");if(!d(a))return null;a=a.split(",").join(";");a=a.substring(0,256);return a=a.substring(0,a.lastIndexOf(";"))}();if(d(b))a.keyValues.add(b)}if(d(c.contentType))a.keyValues.add("tag="+c.contentType);if(d(c.mediaType))a.keyValues.add("mtype="+c.mediaType);if(f(c.tile)){a.keyValues.add("tile="+c.tile);if(c.tile===1)a.keyValues.add("dcopt=ist")}if(d(c.size))a.keyValues.add("sz="+
c.size);b=function(){var b=btg.Cookie.read("qcDemo");if(!(o(btg.config.QuantCast)&&btg.config.QuantCast.enabled&&typeof btg.config.QuantCast.enableDemoTargeting=="boolean"?btg.config.QuantCast.enableDemoTargeting:true)||!d(b))return null;if(d(a.keyValues.pairs.site.demo)&&a.keyValues.pairs.site.demo=="D")return null;return b}();if(d(b))a.keyValues.add("demo="+b);if(btg.globalvars.IS_TOP_ACCESSIBLE)var g=btg.String.queryStringToObject(top.location.search.toLowerCase()).testmode;if(d(g))a.keyValues.add("testmode="+
g);if(f(c.ord))a.keyValues.add("ord="+c.ord+"?");return a.keyValues.toString()}function p(a){var c=btg.globalvars.NETWORKIDS;return nid=a.config.isTestNid?c.DCLK_DOMESTIC_NID_TEST:c.DCLK_DOMESTIC_NID}var d=btg.String.isDefined,o=btg.Object.isDefined,f=btg.Number.isInt,h=btg.Object.isConfigDefined;return{init:function(){this.configure();this.url=((d(this.config.ssl)||location.protocol=="https:"?"https:":"http:")+"//"+"ad.doubleclick.net"+"/"+p(this)+"/"+i(this)+"/"+j(this)+"/"+k(this)+"/"+l(this)+
m(this)+";"+n(this)).substring(0,1024)}}};btg.DoubleClickURL_International=function(){function h(a){a=a.config;if(c(a.contentType))return a.contentType;return"adj"}function i(a){a=a.config;if(!c(a.dartSite))return false;return a.dartSite}function j(a){var b=a.config;return(c(b.zoneOverride)?b.zoneOverride.replace(/^\/?(a|b)tf_\w_\w\//,"").split("/"):a.getSections())[0].substring(0,62)}function k(a){var b=a.config,e="u=",d=btg.Cookie.read("vmn_uuid");if(c(d)){e+=d;if(btg.config.Yieldex.enabled)e+=a.UVALS_DELIMITER;else a.keyValues.add(e)}d=
function(a){var a=a.getSections(),b=a[1]?a[1]:"none",c=a.length>=3?a.slice(2).join("/"):"none";return"sec0="+a[0]+";sec1="+b+";secN="+c}(a);a.keyValues.add(d);if(btg.config.Yieldex.enabled&&c(d)){d=d.replace(/=/g,"_");d=d.replace(/;/g,"-");e+=d;a.keyValues.add(e)}if(f(b.tile))a.keyValues.add("tile="+b.tile);if(c(b.size))a.keyValues.add("sz="+b.size);if(c(b.size))a.keyValues.add("sz="+b.size);a.keyValues.add("log="+(c(b.log)?b.log:"0"));a.keyValues.add("demo="+(c(b.demo)?b.demo:"none"));a.keyValues.add("event="+
(c(b.event)?b.event:"none"));a.keyValues.add("search_kw="+(c(b.keyword)?b.keyword:"none"));a.keyValues.add("vid="+(c(b.vid)?b.vid:"none"));a.keyValues.add("vid_type="+(c(b.vid_type)?b.vid_type:"none"));a.keyValues.add("region="+(c(b.region)?b.region:"none"));a.keyValues.add("dcove=d");a.keyValues.add("url="+location.pathname);if(btg.globalvars.IS_TOP_ACCESSIBLE)var g=btg.String.queryStringToObject(top.location.search.toLowerCase()).testmode;if(c(g))a.keyValues.add("testmode="+g);if(f(b.ord))a.keyValues.add("ord="+
b.ord+"?");return a.keyValues.toString()}function l(a){var b="",c=btg.globalvars.NETWORKIDS;if(a.config.isTestNid)if(btg.config.International.region==btg.globalvars.REGION_APAC)b=c.DCLK_INTL_APAC_NID_TEST;else{if(btg.config.International.region==btg.globalvars.REGION_EMEA)b=c.DCLK_INTL_EMEA_NID_TEST}else if(btg.config.International.region==btg.globalvars.REGION_APAC)b=c.DCLK_INTL_APAC_NID;else if(btg.config.International.region==btg.globalvars.REGION_EMEA)b=c.DCLK_INTL_EMEA_NID;if(b!="")b=b+"/";return b}
var c=btg.String.isDefined,f=btg.Number.isInt;return{init:function(){this.configure();this.url=((c(this.config.ssl)||location.protocol=="https:"?"https:":"http:")+"//"+"ad.doubleclick.net"+"/"+l(this)+h(this)+"/"+i(this)+"/"+j(this)+";"+k(this)).substring(0,1024)}}};btg.DoubleClickURL_Mobile=function(){function i(a){a=a.config.dartSite;if(!e(a))return false;var b=new RegExp(".tab","i");if(!(new RegExp(".mob","i")).test(a)&&!b.test(a))if(btg.Environment.userAgent.isMobile)a+=".mob";else if(btg.Environment.userAgent.isTablet)a+=".tab";return a}function j(a){var b=a.config;return(e(b.zoneOverride)?b.zoneOverride.replace(/^\/?(a|b)tf_\w_\w\//,"").split("/"):a.getSections()).join("/").substring(0,62)}function k(a){var b=a.config;if(e(a.keyValues.pairs.site.rev))b=
a.keyValues.pairs.site.rev;else if(e(a.keyValues.pairs.site.partner))b=a.keyValues.pairs.site.partner;else if(e(b.rev))b=b.partner;else if(e(b.partner))b=b.partner;else return null;a.keyValues.add("rev"+b);return b}function l(a){var b=a.config,c=btg.globalvars.NETWORKIDS,d="";if(a.config.enableMobileNid)if(a.config.isInternational)d=b.isTestNid?c.DCLK_INTL_NID_MOBILE_TEST:c.DCLK_INTL_NID_MOBILE;else d=b.isTestNid?c.DCLK_DOMESTIC_NID_TEST:c.DCLK_DOMESTIC_NID;return d}function m(a){var b=a.config,c=
"",d=l(a);if(d)c+=d+"/";d=i(a);c+=d;d="m"+a.config.slot;a.keyValues.add("slot="+d);c+="/"+d;d=j(a);c+="/"+d;if(d=k(a)){a.keyValues.add("partner="+d);c+="/"+d}d=function(a){for(var a=a.getSections(),b=[],c=0,d=a.length;c<d;c++)b.push("sec"+c+"="+a[c]);return b.join(";")}(a);if(btg.config.Yieldex.enabled){var g;g=d.replace(/=/g,"_");g=g.replace(/;/g,"-");c+=";u="+g}a.keyValues.add("k="+c);a.keyValues.add(d);if(e(b.size)){b=/(120x20|168x28|216x36)/.test(b.size)?"300x50":b.size;a.keyValues.add("sz="+
b);a.keyValues.add("ad_sz="+b)}if(btg.globalvars.IS_TOP_ACCESSIBLE)var f=btg.String.queryStringToObject(top.location.search.toLowerCase()).testmode;if(e(f))a.keyValues.add("testmode="+f);return a.keyValues.toString().substring(0,800)}function n(a){var a=a.config,b=new btg.KeyValues("&");if(a.contentType!="adi"){var c=f(a.dw)?a.dw:"1";b.add("dw="+c)}else{b.add("tp=1");b.add("sdh=1")}c=f(a.forecast)?a.forecast:"1";b.add("forecast="+c);c="u=";if(e(h)){c+=h;b.add(c)}if(e(a.c))b.add("c="+a.c);return b.toString()}
var e=btg.String.isDefined,f=btg.Number.isInt,h=function(a){var b=a.Cookie.read("vmn_mobile_uuid");if(!e(b)){b=a.String.createUUID();a.Cookie.set("vmn_mobile_uuid"+"="+b+";expires="+a.globalvars.INFINITE_COOKIE_EXPY)}return b}(btg);return{init:function(){this.configure();this.url=((e(this.config.ssl)||location.protocol=="https:"?"https:":"http:")+"//"+"ad.mo.doubleclick.net/DARTProxy/mobile.handler?"+m(this)+"&"+n(this)).substring(0,1024)}}};

//Attempting to include CODA/builds/3/Flux.js
(function(a){var h=a.Object.isDefined,i=a.String.isDefined,d,f="non-member",g="not logged-in",j=null,k=function(){return h(a.config.Flux)&&typeof a.config.Flux.enabled!="undefined"&&a.config.Flux.enabled===true&&i(a.config.Flux.communityId)};a.Flux=new function(){this.init=function(){if(!k())return;d=h(a.config.Flux.varmap)?a.config.Flux.varmap:{};if(!i(d.memberState))d.memberState="prop5";if(!i(d.loginState))d.loginState="prop6";var c=new a.DependencyManager(1E4);c.add("fluxDependencies",function(){return typeof Flux4!=
"undefined"},100,true);if(c.hasDependency())c.addToCallQueue(this,l);else l()};this.run=function(c){if(!k())return c;var b=window.Widgets4Context;if(h(b)&&h(b.user)){g=b.user.memberType;if(b.user.communityMember)f="member";a.UserSegment.set("LoggedIn");a.UserSegment.set(b.user.memberType)}c[d.loginState]=g;c[d.memberState]=f;return c};this.onSignUp=function(a,b){window.Widgets4Context.user=b;e({linkName:"Community - Sign up, Join, & Sign in",events:"event90,event87,event91",eVar51:b.initialThirdPartyConnection,
eVar59:a.widgetName,eVar61:b.ucid,eVar62:f+"; "+g})};this.onJoin=function(a,b){window.Widgets4Context.user=b;e({linkName:"Community - Join",events:"event87",eVar59:a.widgetName,eVar61:b.ucid,eVar62:f+"; "+g})};this.onSignIn=function(a,b){window.Widgets4Context.user=b;e({linkName:"Community - Sign in",events:"event91",eVar51:b.initialThirdPartyConnection,eVar59:a.widgetName,eVar61:b.ucid,eVar62:f+"; "+g})};this.onShared=function(a,b){e({linkName:"Community - Share",events:"event84",eVar51:a,eVar65:b})};
this.onFollowed=function(a,b){e({linkName:"Community - Follow",events:"event86",eVar51:a,eVar65:b})};this.onCommented=function(a,b){var d={linkName:"Community - Comment",events:"event88",eVar65:b};if(typeof window.Widgets4Context!="undefined")d.eVar51=window.Widgets4Context.user.initialThirdPartyConnection;e(d)};this.onSignOut=function(){try{var c="//btg.mtvnservices.com/aria/2032/2003/uuid5.html?reset=1&c="+a.Math.random(9999999999);a.DOM.loadScript(c)}catch(b){}};var e=function(c){var b;if(!j)j=
a.ReportingManager.getOmniture().getAttribute("pageName");b=j;c.linkType="o";c.eVar60=b;a.Controller.sendLinkEvent(c);c.pageName=b;a.Demdex.sendPageCall(c)},l=function(){if(typeof Flux4=="undefined")return;Flux4.addEventListener("signUp",function(){a.Flux.onSignUp.apply(a.Flux,arguments)});Flux4.addEventListener("join",function(){a.Flux.onJoin.apply(a.Flux,arguments)});Flux4.addEventListener("signIn",function(){a.Flux.onSignIn.apply(a.Flux,arguments)});Flux4.addEventListener("onShared",function(){a.Flux.onShared.apply(a.Flux,
arguments)});Flux4.addEventListener("onFollowed",function(){a.Flux.onFollowed.apply(a.Flux,arguments)});Flux4.addEventListener("onCommented",function(){a.Flux.onCommented.apply(a.Flux,arguments)});Flux4.addEventListener("signOut",function(){a.Flux.onSignOut.apply(a.Flux,arguments)})}};if(k())a.DOM.loadScript("//daapiak.flux.com/2.0/00001/json/"+a.config.Flux.communityId+"/feeds/widgets4ContextShortest?windowVariable=Widgets4Context")})(btg);

//Attempting to include CODA/builds/3/ABTest.js
btg.ABTest=function(d,b,f){var g=btg.Cookie;if(typeof d!=="string"||btg.String.charTrim(d," ")==""){btg.Error.log("Coda ERROR: btg.ABTest: The first argument to the constructor must be a unique ID of the type {String}.");return null}if(typeof b!="object"||b.length<2){btg.Error.log('Coda ERROR: btg.ABTest: The second argument to the constructor must be an Array of 2 or more Objects, each with a "name" and a "weight" property.');return null}var e=0,h=Math.floor(Math.random()*(100-1+1)+1),i="MTVN_ABTest_"+
d,a=g.read(i),c=null;this.getId=function(){return d};this.getGroup=function(){return c};if(a&&a!="")c=a;else{b.sort(function(a,b){return b.weight-a.weight});for(var a=0,j=b.length;a<j;a++){var k=e+b[a].weight;if(h>e&&h<=k)c=b[a].name;e+=b[a].weight}if(!c){btg.Error.log("Coda ERROR: btg.ABTest: Couldn't assign user to an A/B Test group.");return null}if(e!=100){btg.Error.log("Coda ERROR: btg.ABTest: The sum of the weights of your A/B Test groups must equal 100 exactly.");return null}g.set(i,c,"Thu, 31-Dec-2038 11:59:59 GMT")}btg.UserSegment.set(d+
": "+c);btg.Events.ABTest_Group_Assigned.fire(d,c);if(typeof f=="function")f.call(this)};

//Attempting to include CODA/builds/3/ComScore.js
btg.ComScore=function(a){if(!btg.Controller.hasReporting())return;this.btgIsStr=btg.String.isDefined;this.config=a;this.c1=this.btgIsStr(this.config.c1)?this.config.c1:"2";this.c2=this.btgIsStr(this.config.c2)?this.config.c2:"6036034";this.c3=this.btgIsStr(this.config.c3)?this.config.c3:"";this.c4=this.btgIsStr(this.config.c4)?this.config.c4:escape(document.location.href);this.c5=this.btgIsStr(this.config.c5)?this.config.c5:"20000";this.c6=this.btgIsStr(this.config.c6)?this.config.c6:"";this.c15=
this.btgIsStr(this.config.c15)?this.config.c15:"";this.sendPageCall()};
btg.ComScore.prototype={sendPageCall:function(a){if(!btg.Controller.hasReporting())return;var b=btg.ReportingManager;if(typeof a==="object"){if(this.btgIsStr(a.comScore1))this.c1=a.comScore1;if(this.btgIsStr(a.comScore2))this.c2=a.comScore2;if(this.btgIsStr(a.comScore3))this.c3=a.comScore3;if(this.btgIsStr(a.comScore4))this.c4=a.comScore4;if(this.btgIsStr(a.comScore5))this.c5=a.comScore5;if(this.btgIsStr(a.comScore6))this.c6=a.comScore6;if(this.btgIsStr(a.comScore15))this.c15=a.comScore15}this.c4=
encodeURIComponent(this.c4);a=["c1=",this.c1,"&c2=",this.c2,"&c3=",this.c3,"&c4=",this.c4,"&c5=",this.c5,"&c6=",this.c6,"&c15=",this.c15].join("");try{if(!btg.globalvars.IS_UNIT_TEST&&!b.isScriptIncluded.comscore){btg.DOM.loadScript((document.location.protocol=="https:"?"https://sb":"http://b")+".scorecardresearch.com/beacon.js?"+a);b.isScriptIncluded.comscore=true}}catch(c){}}};

//Attempting to include CODA/builds/3/Nielsen.js

//Attempting to include CODA/builds/3/Criteo.js
btg.Criteo=function(){var a=location.protocol+"//rtax.criteo.com/delivery/rta/rta.js?netId="+"1513"+"&cookieName="+"cto_via"+"&rnd="+btg.Math.random(1E17,1E18)+"&varName="+"crtg_content";btg.DOM.loadScript(a);return{getKeyValue:function(){return btg.Cookie.read("cto_via")}}}();

//Attempting to include CODA/builds/3/Gemius.js
btg.Gemius=function(b){var e=(document.location.protocol=="https:"?"https://":"http://")+"PREFIX.hit.gemius.pl",b=b,c,f=[1,10,100],g=[],h=[];this.btgIsStr=mtvn.btg.util.String.isDefined;this.btgU=mtvn.btg.util;this.btgGv=mtvn.btg.globalvars;this.btgU.DOM.loadScript((document.location.protocol=="https:"?"https://":"http://")+"pro.hit.gemius.pl/gstream.js");this.dependencies=new mtvn.btg.managers.DependencyManager;this.dependencies.add("gemius_script_load",function(){return typeof gemiusStream=="object"},
100);this.dependencies.checkDependency("gemius_script_load");this.load=function(a){if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.load,a);return}c=a.guid;gemiusStream.newStream(b,c,a.duration,h,g,"1234567.89",e,f)};this.event=function(a){if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.event,a);return}var d=a.eventType=="seeking"?"seekingStarted":a.eventType,a=a.playHead;if(d=="complete"){gemiusStream.event(b,c,a,d);gemiusStream.closeStream(b,
c,a)}else if(d.match(/playing|paused|seekingstarted|buffering|stopped/ig))gemiusStream.event(b,c,a,d)}};

//Attempting to include CODA/builds/3/QuantCast.js
btg.QuantCast=function(a){this.labels="";this.config=a;this.labels=this.config.labels};btg.QuantCast.prototype={sendPageCall:function(a){if(this.config.reportMode=="direct"){var b=btg.QuantCast.Ads;if(b.dependencies.hasDependency()){b.dependencies.addToCallQueue(this,this.sendPageCall,a);return}try{_qoptions={labels:this.labels};_qacct="p-94wNw88f65Rhk";quantserve()}catch(c){}}}};
btg.QuantCast.Ads=new function(){this.dependencies=new btg.DependencyManager;this.dependencies.add("qc_script_load",function(){return typeof quantserve=="function"},100,true);this.setLabels=function(a,b){try{if(this.dependencies.hasDependency()){this.dependencies.addToCallQueue(this,this.setLabels,a,b);return}var c="",d="",e="",d=a.dartSite.replace(/\./g,"_"),e=b.replace(/^\//m,""),e=e.replace(/\//g,"."),c=btg.config.QuantCast.labels+",Viacom Global Digital Network.MTVN Digital Ad Sales.Content.Pages."+
d+"."+e;_qoptions={labels:c};_qacct="p-94wNw88f65Rhk";quantserve()}catch(f){}};this.setCookieDemoTargetVal=function(a){for(var b=[],c=0,d=a.segments.length;c<d;c++)b[c]="demo="+a.segments[c].id;btg.Cookie.set("qcDemo",escape(b.join(";")))}};try{(function(){if(!btg.Controller.hasReporting())return;var a=btg.config.QuantCast;if(a.enabled)btg.DOM.loadScript(("https:"==document.location.protocol?"//secure":"//edge")+".quantserve.com/quant.js");if(a.enableDemoTargeting&&!btg.String.isDefined(btg.Cookie.read("qcDemo")))btg.DOM.loadScript("//pixel.quantserve.com/api/segments.json?a=p-94wNw88f65Rhk&callback=btg.QuantCast.Ads.setCookieDemoTargetVal")})()}catch(e$$2){};

//Attempting to include CODA/builds/3/TestAndTarget.js
var mboxCopyright="Copyright 1996-2012. Adobe Systems Incorporated. All rights reserved.";mboxUrlBuilder=function(a,b){this.a=a;this.b=b;this.c=new Array;this.d=function(a){return a};this.f=null};mboxUrlBuilder.prototype.addParameter=function(a,b){if((new RegExp("('|\")")).exec(a))throw"Parameter '"+a+"' contains invalid characters";for(var c=0;c<this.c.length;c++){var d=this.c[c];if(d.name==a){d.value=b;return this}}c=new Object;c.name=a;c.value=b;this.c[this.c.length]=c;return this};
mboxUrlBuilder.prototype.addParameters=function(a){if(!a)return this;for(var b=0;b<a.length;b++){var c=a[b].indexOf("=");if(c==-1||c==0)continue;this.addParameter(a[b].substring(0,c),a[b].substring(c+1,a[b].length))}return this};mboxUrlBuilder.prototype.setServerType=function(a){this.o=a};mboxUrlBuilder.prototype.setBasePath=function(a){this.f=a};mboxUrlBuilder.prototype.setUrlProcessAction=function(a){this.d=a};
mboxUrlBuilder.prototype.buildUrl=function(){for(var a=(document.location.protocol=="file:"?"http:":document.location.protocol)+"//"+this.a+(this.f?this.f:"/m2/"+this.b+"/mbox/"+this.o),b=a.indexOf("?")!=-1?"&":"?",c=0;c<this.c.length;c++){var d=this.c[c];a+=b+encodeURIComponent(d.name)+"="+encodeURIComponent(d.value);b="&"}return this.t(this.d(a))};mboxUrlBuilder.prototype.getParameters=function(){return this.c};mboxUrlBuilder.prototype.setParameters=function(a){this.c=a};
mboxUrlBuilder.prototype.clone=function(){var a=new mboxUrlBuilder(this.a,this.b);a.setServerType(this.o);a.setBasePath(this.f);a.setUrlProcessAction(this.d);for(var b=0;b<this.c.length;b++)a.addParameter(this.c[b].name,this.c[b].value);return a};mboxUrlBuilder.prototype.t=function(a){return a.replace(/\"/g,"&quot;").replace(/>/g,"&gt;")};mboxStandardFetcher=function(){};mboxStandardFetcher.prototype.getType=function(){return"standard"};
mboxStandardFetcher.prototype.fetch=function(a){a.setServerType(this.getType());document.write("<"+"scr"+'ipt src="'+a.buildUrl()+'" language="JavaScript"><'+"/scr"+"ipt>")};mboxStandardFetcher.prototype.cancel=function(){};mboxAjaxFetcher=function(){};mboxAjaxFetcher.prototype.getType=function(){return"ajax"};mboxAjaxFetcher.prototype.fetch=function(a){a.setServerType(this.getType());a=a.buildUrl();this.x=document.createElement("script");this.x.src=a;document.body.appendChild(this.x)};
mboxAjaxFetcher.prototype.cancel=function(){};mboxMap=function(){this.y=new Object;this.z=new Array};mboxMap.prototype.put=function(a,b){if(!this.y[a])this.z[this.z.length]=a;this.y[a]=b};mboxMap.prototype.get=function(a){return this.y[a]};mboxMap.prototype.remove=function(a){this.y[a]=undefined};mboxMap.prototype.each=function(a){for(var b=0;b<this.z.length;b++){var c=this.z[b],d=this.y[c];if(d)if(a(c,d)===false)break}};
mboxFactory=function(a,b,c){this.E=false;this.C=a;this.D=c;this.F=new mboxList;mboxFactories.put(c,this);this.H=(this.G=typeof document.createElement("div").replaceChild!="undefined"&&true&&typeof document.getElementById!="undefined"&&typeof(window.attachEvent||document.addEventListener||window.addEventListener)!="undefined"&&typeof encodeURIComponent!="undefined")&&mboxGetPageParameter("mboxDisable")==null;var d=c=="default";this.J=new mboxCookieManager("mbox"+(d?"":"-"+c),mboxCookiePageDomain());
this.H=this.H&&this.J.isEnabled()&&this.J.getCookie("disable")==null;if(this.isAdmin())this.enable();this.K();this.L=mboxGenerateId();this.M=mboxScreenHeight();this.N=mboxScreenWidth();this.O=mboxBrowserWidth();this.P=mboxBrowserHeight();this.Q=mboxScreenColorDepth();this.R=mboxBrowserTimeOffset();this.S=new mboxSession(this.L,"mboxSession","session",31*60,this.J);this.T=new mboxPC("PC",1209600,this.J);this.w=new mboxUrlBuilder(a,b);this.U(this.w,d);this.W=this.V=(new Date).getTime();var e=this;this.addOnLoad(function(){e.W=
(new Date).getTime()});if(this.G){this.addOnLoad(function(){e.E=true;e.getMboxes().each(function(a){a.setFetcher(new mboxAjaxFetcher);a.finalize()})});if(this.H){this.limitTraffic(100,10368E3);this.Z();this._=new mboxSignaler(function(a,b){return e.create(a,b)},this.J)}}};mboxFactory.prototype.isEnabled=function(){return this.H};mboxFactory.prototype.getDisableReason=function(){return this.J.getCookie("disable")};mboxFactory.prototype.isSupported=function(){return this.G};
mboxFactory.prototype.disable=function(a,b){if(typeof a=="undefined")a=60*60;if(typeof b=="undefined")b="unspecified";if(!this.isAdmin()){this.H=false;this.J.setCookie("disable",b,a)}};mboxFactory.prototype.enable=function(){this.H=true;this.J.deleteCookie("disable")};mboxFactory.prototype.isAdmin=function(){return document.location.href.indexOf("mboxEnv")!=-1};mboxFactory.prototype.limitTraffic=function(){};
mboxFactory.prototype.addOnLoad=function(a){if(this.isDomLoaded())a();else{var b=false,c=function(){if(b)return;b=true;a()};this.hb.push(c);if(this.isDomLoaded()&&!b)c()}};mboxFactory.prototype.getEllapsedTime=function(){return this.W-this.V};mboxFactory.prototype.getEllapsedTimeUntil=function(a){return a-this.V};mboxFactory.prototype.getMboxes=function(){return this.F};mboxFactory.prototype.get=function(a,b){return this.F.get(a).getById(b||0)};
mboxFactory.prototype.update=function(a,b){if(!this.isEnabled())return;if(!this.isDomLoaded()){var c=this;this.addOnLoad(function(){c.update(a,b)});return}if(this.F.get(a).length()==0)throw"Mbox "+a+" is not defined";this.F.get(a).each(function(a){a.getUrlBuilder().addParameter("mboxPage",mboxGenerateId());a.load(b)})};
mboxFactory.prototype.create=function(a,b,c){if(!this.isSupported())return null;var d=this.w.clone();d.addParameter("mboxCount",this.F.length()+1);d.addParameters(b);var b=this.F.get(a).length(),e=this.D+"-"+a+"-"+b;if(c)c=new mboxLocatorNode(c);else{if(this.E)throw"The page has already been loaded, can't write marker";c=new mboxLocatorDefault(e)}try{var g=this,f=new mbox(a,b,d,c,"mboxImported-"+e);if(this.H)f.setFetcher(this.E?new mboxAjaxFetcher:new mboxStandardFetcher);f.setOnError(function(a){f.setMessage(a);
f.activate();if(!f.isActivated()){g.disable(60*60,a);window.location.reload(false)}});this.F.add(f)}catch(h){this.disable();throw'Failed creating mbox "'+a+'", the error was: '+h;}a=new Date;d.addParameter("mboxTime",a.getTime()-a.getTimezoneOffset()*6E4);return f};mboxFactory.prototype.getCookieManager=function(){return this.J};mboxFactory.prototype.getPageId=function(){return this.L};mboxFactory.prototype.getPCId=function(){return this.T};mboxFactory.prototype.getSessionId=function(){return this.S};
mboxFactory.prototype.getSignaler=function(){return this._};mboxFactory.prototype.getUrlBuilder=function(){return this.w};
mboxFactory.prototype.U=function(a,b){a.addParameter("mboxHost",document.location.hostname).addParameter("mboxSession",this.S.getId());if(!b)a.addParameter("mboxFactoryId",this.D);if(this.T.getId()!=null)a.addParameter("mboxPC",this.T.getId());a.addParameter("mboxPage",this.L);a.addParameter("screenHeight",this.M);a.addParameter("screenWidth",this.N);a.addParameter("browserWidth",this.O);a.addParameter("browserHeight",this.P);a.addParameter("browserTimeOffset",this.R);a.addParameter("colorDepth",
this.Q);a.addParameters(this.rb().split("&"));a.setUrlProcessAction(function(a){a+="&mboxURL="+encodeURIComponent(document.location);var b=encodeURIComponent(document.referrer);if(a.length+b.length<2E3)a+="&mboxReferrer="+b;a+="&mboxVersion="+mboxVersion;return a})};
mboxFactory.prototype.rb=function(){window.tb=function(a){if(!a)return false;var b="",c=a.length,a=a.toUpperCase();for(i=0;i<c;i++)b+=a.charCodeAt(i);return b};window.Nc=function(a){if(!a)return false;var b="",c=a.length;for(i=0;i<c;i++){b+=String.fromCharCode(a.charAt(i).toString()+a.charAt(i+1).toString());++i}return b.toLowerCase()};var a=window.Nc(this.J.getCookie("profile"))||"",b="",c;if(location.search.length>0){c=unescape(location.search.substr(1)).split(";")[0].split("&"),_qlDP=c.length;
for(i=0;i<_qlDP;i++)if(c[i].indexOf("mbxp._")>-1&&c[i].indexOf("=")!=-1&&c[i].split("=")[1].length>0)b+="&"+c[i].replace(/mbxp/gi,"profile")}mboxUrlBuilder.prototype.oldURL=mboxUrlBuilder.prototype.buildUrl;mboxUrlBuilder.prototype.buildUrl=function(){var c=this.oldURL();if(c.indexOf("/sc/")!=-1){var e=a.split("&"),g=e.length,f=b.substr(1).split("&"),h=f.length;for(i=0;i<g;i++)if(e[i]!=""&&e[i]!="profile.")c=c.replace(e[i]+"&","").replace(e[i],"");for(i=0;i<h;i++)if(f[i]!="")c=c.replace(f[i]+"&",
"").replace(f[i],"")}return c};if(a!="")a="profile."+a.replace(/\-/g,"=").replace(/\+/g,"&profile.");else b=b.substr(1);return a+b};mboxFactory.prototype.Z=function(){document.write("<style>."+"mboxDefault"+" { visibility:hidden; }</style>")};mboxFactory.prototype.isDomLoaded=function(){return this.E};
mboxFactory.prototype.K=function(){if(this.hb!=null)return;this.hb=new Array;var a=this;(function(){var b=document.addEventListener?"DOMContentLoaded":"onreadystatechange",c=false,d=function(){if(c)return;c=true;for(var b=0;b<a.hb.length;++b)a.hb[b]()};if(document.addEventListener){document.addEventListener(b,function(){document.removeEventListener(b,arguments.callee,false);d()},false);window.addEventListener("load",function(){document.removeEventListener("load",arguments.callee,false);d()},false)}else if(document.attachEvent)if(self!==
self.top)document.attachEvent(b,function(){if(document.readyState==="complete"){document.detachEvent(b,arguments.callee);d()}});else{var e=function(){try{document.documentElement.doScroll("left");d()}catch(a){setTimeout(e,13)}};e()}if(document.readyState==="complete")d()})()};mboxSignaler=function(a,b){this.J=b;for(var c=b.getCookieNames("signal-"),d=0;d<c.length;d++){var e=c[d],g=b.getCookie(e).split("&");a(g[0],g).load();b.deleteCookie(e)}};
mboxSignaler.prototype.signal=function(a){this.J.setCookie("signal-"+a,mboxShiftArray(arguments).join("&"),45*60)};mboxList=function(){this.F=new Array};mboxList.prototype.add=function(a){if(a!=null)this.F[this.F.length]=a};mboxList.prototype.get=function(a){for(var b=new mboxList,c=0;c<this.F.length;c++){var d=this.F[c];if(d.getName()==a)b.add(d)}return b};mboxList.prototype.getById=function(a){return this.F[a]};mboxList.prototype.length=function(){return this.F.length};
mboxList.prototype.each=function(a){if(typeof a!="function")throw"Action must be a function, was: "+typeof a;for(var b=0;b<this.F.length;b++)a(this.F[b])};mboxLocatorDefault=function(a){this.g="mboxMarker-"+a;document.write('<div id="'+this.g+'" style="visibility:hidden;display:none">&nbsp;</div>')};mboxLocatorDefault.prototype.locate=function(){for(var a=document.getElementById(this.g);a!=null;){if(a.nodeType==1)if(a.className=="mboxDefault")return a;a=a.previousSibling}return null};
mboxLocatorDefault.prototype.force=function(){var a=document.createElement("div");a.className="mboxDefault";var b=document.getElementById(this.g);b.parentNode.insertBefore(a,b);return a};mboxLocatorNode=function(a){this.Fb=a};mboxLocatorNode.prototype.locate=function(){return typeof this.Fb=="string"?document.getElementById(this.Fb):this.Fb};mboxLocatorNode.prototype.force=function(){return null};mboxCreate=function(a){var b=mboxFactoryDefault.create(a,mboxShiftArray(arguments));if(b)b.load();return b};
mboxDefine=function(a,b){return mboxFactoryDefault.create(b,mboxShiftArray(mboxShiftArray(arguments)),a)};mboxUpdate=function(a){mboxFactoryDefault.update(a,mboxShiftArray(arguments))};mbox=function(a,b,c,d,e){this.Lb=null;this.Mb=0;this.mb=d;this.nb=e;this.Nb=null;this.Ob=new mboxOfferContent;this.Gb=null;this.w=c;this.message="";this.Pb=new Object;this.Qb=0;this.Jb=b;this.g=a;this.Rb();c.addParameter("mbox",a).addParameter("mboxId",b);this.Sb=function(){};this.Tb=function(){};this.Ub=null};
mbox.prototype.getId=function(){return this.Jb};mbox.prototype.Rb=function(){if(this.g.length>250)throw"Mbox Name "+this.g+" exceeds max length of "+"250 characters.";else if(this.g.match(/^\s+|\s+$/g))throw"Mbox Name "+this.g+" has leading/trailing whitespace(s).";};mbox.prototype.getName=function(){return this.g};mbox.prototype.getParameters=function(){for(var a=this.w.getParameters(),b=new Array,c=0;c<a.length;c++)if(a[c].name.indexOf("mbox")!=0)b[b.length]=a[c].name+"="+a[c].value;return b};
mbox.prototype.setOnLoad=function(a){this.Tb=a;return this};mbox.prototype.setMessage=function(a){this.message=a;return this};mbox.prototype.setOnError=function(a){this.Sb=a;return this};mbox.prototype.setFetcher=function(a){if(this.Nb)this.Nb.cancel();this.Nb=a;return this};mbox.prototype.getFetcher=function(){return this.Nb};
mbox.prototype.load=function(a){if(this.Nb==null)return this;this.setEventTime("load.start");this.cancelTimeout();this.Mb=0;this.Nb.fetch(a&&a.length>0?this.w.clone().addParameters(a):this.w);var b=this;this.Wb=setTimeout(function(){b.Sb("browser timeout",b.Nb.getType())},15E3);this.setEventTime("load.end");return this};mbox.prototype.loaded=function(){this.cancelTimeout();if(!this.activate()){var a=this;setTimeout(function(){a.loaded()},100)}};
mbox.prototype.activate=function(){if(this.Mb)return this.Mb;this.setEventTime("activate"+ ++this.Qb+".start");if(this.show()){this.cancelTimeout();this.Mb=1}this.setEventTime("activate"+this.Qb+".end");return this.Mb};mbox.prototype.isActivated=function(){return this.Mb};mbox.prototype.setOffer=function(a){if(a&&a.show&&a.setOnLoad)this.Ob=a;else throw"Invalid offer";return this};mbox.prototype.getOffer=function(){return this.Ob};
mbox.prototype.show=function(){this.setEventTime("show.start");var a=this.Ob.show(this);this.setEventTime(a==1?"show.end.ok":"show.end");return a};mbox.prototype.showContent=function(a){if(a==null)return 0;if(this.Gb==null||!this.Gb.parentNode){this.Gb=this.getDefaultDiv();if(this.Gb==null)return 0}if(this.Gb!=a){this.Yb(this.Gb);this.Gb.parentNode.replaceChild(a,this.Gb);this.Gb=a}this.Zb(a);this.Tb();return 1};
mbox.prototype.hide=function(){this.setEventTime("hide.start");var a=this.showContent(this.getDefaultDiv());this.setEventTime(a==1?"hide.end.ok":"hide.end.fail");return a};mbox.prototype.finalize=function(){this.setEventTime("finalize.start");this.cancelTimeout();if(this.getDefaultDiv()==null)if(this.mb.force()!=null)this.setMessage("No default content, an empty one has been added");else this.setMessage("Unable to locate mbox");if(!this.activate()){this.hide();this.setEventTime("finalize.end.hide")}this.setEventTime("finalize.end.ok")};
mbox.prototype.cancelTimeout=function(){if(this.Wb)clearTimeout(this.Wb);if(this.Nb!=null)this.Nb.cancel()};mbox.prototype.getDiv=function(){return this.Gb};mbox.prototype.getDefaultDiv=function(){if(this.Ub==null)this.Ub=this.mb.locate();return this.Ub};mbox.prototype.setEventTime=function(a){this.Pb[a]=(new Date).getTime()};mbox.prototype.getEventTimes=function(){return this.Pb};mbox.prototype.getImportName=function(){return this.nb};mbox.prototype.getURL=function(){return this.w.buildUrl()};
mbox.prototype.getUrlBuilder=function(){return this.w};mbox.prototype.ac=function(a){return a.style.display!="none"};mbox.prototype.Zb=function(a){this.bc(a,true)};mbox.prototype.Yb=function(a){this.bc(a,false)};mbox.prototype.bc=function(a,b){a.style.visibility=b?"visible":"hidden";a.style.display=b?"block":"none"};mboxOfferContent=function(){this.Tb=function(){}};mboxOfferContent.prototype.show=function(a){a=a.showContent(document.getElementById(a.getImportName()));if(a==1)this.Tb();return a};
mboxOfferContent.prototype.setOnLoad=function(a){this.Tb=a};mboxOfferAjax=function(a){this.Xb=a;this.Tb=function(){}};mboxOfferAjax.prototype.setOnLoad=function(a){this.Tb=a};mboxOfferAjax.prototype.show=function(a){var b=document.createElement("div");b.id=a.getImportName();b.innerHTML=this.Xb;a=a.showContent(b);if(a==1)this.Tb();return a};mboxOfferDefault=function(){this.Tb=function(){}};mboxOfferDefault.prototype.setOnLoad=function(a){this.Tb=a};
mboxOfferDefault.prototype.show=function(a){a=a.hide();if(a==1)this.Tb();return a};mboxCookieManager=function(a,b){this.g=a;this.ec=b==""||b.indexOf(".")==-1?"":"; domain="+b;this.fc=new mboxMap;this.loadCookies()};mboxCookieManager.prototype.isEnabled=function(){this.setCookie("check","true",60);this.loadCookies();return this.getCookie("check")=="true"};
mboxCookieManager.prototype.setCookie=function(a,b,c){if(typeof a!="undefined"&&typeof b!="undefined"&&typeof c!="undefined"){var d=new Object;d.name=a;d.value=escape(b);d.expireOn=Math.ceil(c+(new Date).getTime()/1E3);this.fc.put(a,d);this.saveCookies()}};mboxCookieManager.prototype.getCookie=function(a){return(a=this.fc.get(a))?unescape(a.value):null};mboxCookieManager.prototype.deleteCookie=function(a){this.fc.remove(a);this.saveCookies()};
mboxCookieManager.prototype.getCookieNames=function(a){var b=new Array;this.fc.each(function(c){if(c.indexOf(a)==0)b[b.length]=c});return b};mboxCookieManager.prototype.saveCookies=function(){var a=new Array,b=0;this.fc.each(function(c,e){if(!false||c==="disable"){a[a.length]=c+"#"+e.value+"#"+e.expireOn;if(b<e.expireOn)b=e.expireOn}});var c=new Date(b*1E3);document.cookie=this.g+"="+a.join("|")+"; expires="+c.toGMTString()+"; path=/"+this.ec};
mboxCookieManager.prototype.loadCookies=function(){this.fc=new mboxMap;var a=document.cookie.indexOf(this.g+"=");if(a!=-1){var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.indexOf(",",a);if(b==-1)b=document.cookie.length}for(var a=document.cookie.substring(a+this.g.length+1,b).split("|"),b=Math.ceil((new Date).getTime()/1E3),c=0;c<a.length;c++){var d=a[c].split("#");if(b<=d[2]){var e=new Object;e.name=d[0];e.value=d[1];e.expireOn=d[2];this.fc.put(e.name,e)}}}};
mboxSession=function(a,b,c,d,e){this.uc=b;this.Bb=c;this.vc=d;this.J=e;this.wc=false;this.Jb=typeof mboxForceSessionId!="undefined"?mboxForceSessionId:mboxGetPageParameter(this.uc);if(this.Jb==null||this.Jb.length==0){this.Jb=e.getCookie(c);if(this.Jb==null||this.Jb.length==0){this.Jb=a;this.wc=true}}e.setCookie(c,this.Jb,d)};mboxSession.prototype.getId=function(){return this.Jb};mboxSession.prototype.forceId=function(a){this.Jb=a;this.J.setCookie(this.Bb,this.Jb,this.vc)};
mboxPC=function(a,b,c){this.Bb=a;this.vc=b;this.J=c;this.Jb=typeof mboxForcePCId!="undefined"?mboxForcePCId:c.getCookie(a);if(this.Jb!=null)c.setCookie(a,this.Jb,b)};mboxPC.prototype.getId=function(){return this.Jb};mboxPC.prototype.forceId=function(a){if(this.Jb!=a){this.Jb=a;this.J.setCookie(this.Bb,this.Jb,this.vc);return true}return false};mboxGetPageParameter=function(a){var b=null,a=(new RegExp(a+"=([^&]*)")).exec(document.location);if(a!=null&&a.length>=2)b=a[1];return b};
mboxSetCookie=function(a,b,c){return mboxFactoryDefault.getCookieManager().setCookie(a,b,c)};mboxGetCookie=function(a){return mboxFactoryDefault.getCookieManager().getCookie(a)};mboxCookiePageDomain=function(){var a=/([^:]*)(:[0-9]{0,5})?/.exec(document.location.host)[1];if(!/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/.exec(a)){var b=/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/.exec(a);if(b)a=b[0]}return a?a:""};
mboxShiftArray=function(a){for(var b=new Array,c=1;c<a.length;c++)b[b.length]=a[c];return b};mboxGenerateId=function(){return(new Date).getTime()+"-"+Math.floor(Math.random()*999999)};mboxScreenHeight=function(){return screen.height};mboxScreenWidth=function(){return screen.width};mboxBrowserWidth=function(){return window.innerWidth?window.innerWidth:document.documentElement?document.documentElement.clientWidth:document.body.clientWidth};
mboxBrowserHeight=function(){return window.innerHeight?window.innerHeight:document.documentElement?document.documentElement.clientHeight:document.body.clientHeight};mboxBrowserTimeOffset=function(){return-(new Date).getTimezoneOffset()};mboxScreenColorDepth=function(){return screen.pixelDepth};if(typeof mboxVersion=="undefined")var mboxVersion=41,mboxFactories=new mboxMap,mboxFactoryDefault=new mboxFactory("mtvnetworks.tt.omtrdc.net","mtvnetworks","default");
if(mboxGetPageParameter("mboxDebug")!=null||mboxFactoryDefault.getCookieManager().getCookie("debug")!=null){setTimeout(function(){if(typeof mboxDebugLoaded=="undefined")alert("Could not load the remote debug.\nPlease check your connection"+" to Test&amp;Target servers")},60*60);document.write("<"+"scr"+'ipt language="Javascript1.2" src='+'"http://admin5.testandtarget.omniture.com/admin/mbox/mbox_debug.jsp?mboxServerHost=mtvnetworks.tt.omtrdc.net'+'&clientCode=mtvnetworks"><'+"/scr"+"ipt>")}
mboxScPluginFetcher=function(a,b){this.b=a;this.Dc=b};mboxScPluginFetcher.prototype.Ec=function(a){a.setBasePath("/m2/"+this.b+"/sc/standard");this.Fc(a);a=a.buildUrl();a+="&scPluginVersion=1";return a};
mboxScPluginFetcher.prototype.Fc=function(a){for(var b=["dynamicVariablePrefix","visitorID","vmk","ppu","charSet","visitorNamespace","cookieDomainPeriods","cookieLifetime","pageName","currencyCode","variableProvider","channel","server","pageType","transactionID","purchaseID","campaign","state","zip","events","products","linkName","linkType","resolution","colorDepth","javascriptVersion","javaEnabled","cookiesEnabled","browserWidth","browserHeight","connectionType","homepage","pe","pev1","pev2","pev3",
"visitorSampling","visitorSamplingGroup","dynamicAccountSelection","dynamicAccountList","dynamicAccountMatch","trackDownloadLinks","trackExternalLinks","trackInlineStats","linkLeaveQueryString","linkDownloadFileTypes","linkExternalFilters","linkInternalFilters","linkTrackVars","linkTrackEvents","linkNames","lnk","eo"],c=0;c<b.length;c++)this.Hc(b[c],a);for(c=1;c<=75;c++){this.Hc("prop"+c,a);this.Hc("eVar"+c,a);this.Hc("hier"+c,a)}};
mboxScPluginFetcher.prototype.Hc=function(a,b){var c=this.Dc[a];if(typeof c==="undefined"||c===null||c==="")return;b.addParameter(a,c)};mboxScPluginFetcher.prototype.cancel=function(){};mboxScPluginFetcher.prototype.fetch=function(a){a.setServerType(this.getType());a=this.Ec(a);this.x=document.createElement("script");this.x.src=a;document.body.appendChild(this.x)};mboxScPluginFetcher.prototype.getType=function(){return"ajax"};
function mboxLoadSCPlugin(a){if(!a)return null;a.m_tt=function(a){a=a.m_i("tt");a.H=true;a.b="mtvnetworks";a._t=function(){if(!this.isEnabled())return;var a=this.Kc();if(a){var b=new mboxScPluginFetcher(this.b,this.s);a.setFetcher(b);a.load()}};a.isEnabled=function(){return this.H&&mboxFactoryDefault.isEnabled()};a.Kc=function(){var a=this.Lc(),b=document.createElement("DIV");return mboxFactoryDefault.create(a,new Array,b)};a.Lc=function(){return"SiteCatalyst: "+(this.s.events&&this.s.events.indexOf("purchase")!=
-1?"purchase":"event")}};return a.loadModule("tt")}
var mboxTrack=function(a,b){var c,d;d=mboxFactoryDefault;if(d.isEnabled())if(d.getMboxes().length()>0){c=d.getMboxes().getById(0);c=c.getURL().replace("mbox="+escape(c.getName()),"mbox="+a).replace("/undefined","/ajax").replace("mboxPage="+d.getPageId(),"mboxPage="+mboxGenerateId())+"&"+b,d=new Image;d.style.display="none";d.src=c;document.body.appendChild(d)}else mboxTrackDefer(a,b)},mboxTrackDefer=function(a,b){if(mboxFactoryDefault.isEnabled())mboxFactoryDefault.getSignaler().signal(a,a+"&"+b)},
mboxTrackLink=function(a,b,c){mboxTrack(a,b);setTimeout("location='"+c+"'",500)},monthsPersistent=12;
updateProfile=function(a){if(typeof mboxFactoryDefault=="undefined")return false;var a=a.toString().replace(/\||\#|\-|\+/g,"").split(","),b=a.length,c=false,d=Nc(mboxFactoryDefault.getCookieManager().getCookie("profile"))||"",e=d.split("+");for(i=0;i<b;i++)if(a[i].indexOf("profile._")>-1&&a[i].indexOf("=")>-1&&a[i].split("=")[1].length>0){var c=true,g=a[i].split("profile.")[1].split("=")[0],f=a[i].split("=")[1];if(d.indexOf(g)>-1){d=e.join("+");d=d.replace(g+"-"+d.split(g+"-")[1].split("+")[0],g+
"-"+f);e=d.split("+")}else e.push(g+"-"+f);if(f.toLowerCase()=="remove!")for(n=0;n<e.length;n++)if(e[n].indexOf(g+"-")>-1)e.splice(n--,1)}if(d!=""||c)mboxFactoryDefault.getCookieManager().setCookie("profile",tb(e.join("+")),_persistDate)},xCr=mboxCreate,mboxCreate=function(){var a=Array.prototype.slice.call(arguments,0);updateProfile(a.join(","));xCr.apply({},a)},xUp=mboxUpdate,mboxUpdate=function(){var a=Array.prototype.slice.call(arguments,0);updateProfile(a.join(","));xUp.apply({},a)};
var _persistDate=monthsPersistent*30*24*60*60;if(location.search.length>0)updateProfile(unescape(location.search.substr(1)).split(";")[0].split("&").join(",").replace(/mbxp/gi,"profile"));if(typeof demdex_seg!="undefined"&&demdex_seg!="")for(var i=0;i<demdex_seg.length;i++)if(demdex_seg[i].cn=="aam_tnt")if(demdex_seg[0].cv.split(",")){var demdex_raw=demdex_seg[i].cv.split(","),tapMboxBuilder=mboxFactoryDefault.getUrlBuilder();tapMboxBuilder.addParameters(demdex_raw)};(function(f,g){var e=btg.String.isDefined,h=btg.Object.isDefined,c=btg.config.TestAndTarget,d=btg.Cookie;btg.TestAndTarget={fireMbox:function(){var a={};a.channelValue=function(){var a=location.pathname.split("/");return e(a[1])?a[1]:"home"}();a.pageTypeValue=c.pageType?c.pageType:"";a.loggedInValue=h(f.Widgets4Context)&&h(f.Widgets4Context.user)?"Yes":"No";var b=d.read("vmn_fwblocked");if(!e(b))d.set("vmn_fwblocked",btg.globalvars.FW_BLOCKED===true?"on":"off");else if(b=="on"&&btg.globalvars.FW_BLOCKED===
false)d.set("vmn_fwblocked","removed");else if(b=="removed"&&btg.globalvars.FW_BLOCKED===false)d.set("vmn_fwblocked","off");else if((b=="removed"||b=="off")&&btg.globalvars.FW_BLOCKED===true)d.set("vmn_fwblocked","on");a.videoAdBlocking=d.read("vmn_fwblocked");if(/(on|removed)/.test(a.videoAdBlocking)&&a.pageTypeValue=="video"){mboxDefine("globalMbox",c.globalMboxID,"channel="+a.channelValue,"pageType="+a.pageTypeValue,"loggedIn="+a.loggedInValue,"videoAdBlocking="+a.videoAdBlocking);mboxUpdate(c.globalMboxID,
"channel="+a.channelValue,"pageType="+a.pageTypeValue,"loggedIn="+a.loggedInValue,"videoAdBlocking="+a.videoAdBlocking)}else{mboxDefine("globalMbox",c.globalMboxID,"channel="+a.channelValue,"pageType="+a.pageTypeValue,"loggedIn="+a.loggedInValue);mboxUpdate(c.globalMboxID,"channel="+a.channelValue,"pageType="+a.pageTypeValue,"loggedIn="+a.loggedInValue)}},init:function(){if(e(c.globalMboxID)){var a=g.getElementsByTagName("body")[0],b=g.createElement("div");b.className="mboxDefault";b.id="globalMbox";
if(a)if(a.firstChild)a.insertBefore(b,a.firstChild);else a.appendChild(b);if(c.videoAdBlockerTargetingEnabled&&btg.config.Freewheel.adBlockerDetection){a=new btg.DependencyManager(4E3);a.add("fwAdBlockerDependency",function(){return btg.globalvars.FW_BLOCKED!=""&&c.pageType=="video"?true:false},100,true);if(a.hasDependency())a.addToCallQueue(this,this.fireMbox);else this.fireMbox()}else this.fireMbox()}btg.TestAndTarget.init=function(){return false}}}})(window,document);if(typeof btg.Hcode==="object")btg.Hcode.trackTNT=function(a,e,b){var a=a?a:"s_tnt",c="",d=false,b=b?b:true;if(this.getQueryParam)d=this.getQueryParam(e?e:"s_tnt");if(d)c+=d+",";if(this.wd[a]!=undefined)c+=this.wd[a];if(b)this.wd[a]="";return c};

//Attempting to include CODA/builds/3/Photos.js
btg.Photos=function(a){return{init:function(){a.Events.flipBookView.subscribe(function(){a.Photos.onFlipBookView()});return true},run:function(a){return a},onFlipBookView:function(){if(a.String.isDefined(a.config.ComScore.pvcURL))new a.Ajax({url:a.config.ComScore.pvcURL,autoSend:true})},isFlipBookView:function(b){a.Events.flipBookView.fire(b)}}}(btg);

//Attempting to include CODA/builds/3/Recommendations.js
btg.Recommendations=new function(){this.init={};this.run=function(a){if(btg.String.isDefined(btg.Cookie.read("vmn_recsConversion"))){btg.UserSegment.set("Recommendations_Clickthrough");if(btg.String.isDefined(a.events))a.events+=",";a.events+="event40";btg.Cookie.remove("vmn_recsConversion")}return a};this.setConversion=function(){btg.Cookie.set("vmn_recsConversion",1)}};

//Attempting to include CODA/builds/3/Meteor.js
btg.Meteor=new function(){var c=btg.config,a=null,d=null,g="";this.getWOM=function(){for(var a=document.cookie.split(";"),b=null,b=0,c=a.length;b<c;b++){var d=a[b].split("=");if(d[0].match(/[a-zA-Z0-9]{8}\-[a-zA-Z0-9]{4}\-[a-zA-Z0-9]{4}\-[a-zA-Z0-9]{4}\-[a-zA-Z0-9]{12}/)){b=unescape(d[1]);eval("var _meteor_settings = "+b);if(typeof _meteor_settings.wom=="undefined")return null;return typeof _meteor_settings.wom=="boolean"?_meteor_settings.wom:null}}return null};this.isWOMReported=false;this.init=
function(f){a=f;if(btg.Object.isDefined(c.Meteor))g=btg.String.isDefined(c.Meteor.applicationId)?c.Meteor.applicationId:"";if(typeof a.womVarMap=="undefined")a.womVarMap=["prop32","eVar55"];if(typeof a.womVarMap=="string")a.womVarMap=a.womVarMap.split(",");if(!(btg.Object.isConfigDefined(c.Meteor)&&g!=""))return false;btg.Meteor.multiTrackTimer.on("count",btg.Meteor.multiTrackScript);btg.Meteor.multiTrackTimer.start();d=btg.Meteor.getWOM();return true};this.run=function(f){if(!(btg.Object.isConfigDefined(c.Meteor)&&
g!=""))return f;var b=null;if(typeof d=="undefined"||d===null){b="Unknown";new btg.Alert('Failed to find Meteor Word-of-Mouth ("wom") value.')}else if(d===true){this.isWOMReported=true;b="Word of mouth"}else if(d===false){this.isWOMReported=true;b="Not word of mouth"}for(var h=0,i=a.womVarMap.length;h<i;h++)f[a.womVarMap[h]]=b;return f};this.sendLinkEventCall=function(){var a=c.Meteor,b={linkName:"Meteor reporting",linkType:"o"};d=btg.Meteor.getWOM();if(typeof a.enabled=="boolean"&&a.enabled&&a.applicationId!=
"")btg.Controller.sendLinkEvent(b)};this.multiTrackScript=function(){var a=btg.Object.isDefined(c)?c.Meteor:null;if(typeof meteor!="undefined"){if(btg.Object.isConfigDefined(a)&&a.applicationId!="")btg.DOM.loadScript("http"+("https:"==document.location.protocol?"s":"")+"://cdnt.meteorsolutions.com/api/multi_track?application_id="+a.applicationId+"&url_storage_source=hash&hash_join=true");btg.Meteor.multiTrackTimer.stop()}};this.multiTrackTimer=new btg.Timer("btg.Meteor.multiTrackTimer",500);this.womScript=
function(){var a=btg.Meteor.getWOM(),b=btg.Meteor;if(a!=null){b.sendLinkEventCall();b.isWOMReported=true;b.womTimer.stop()}};this.womTimer=new btg.Timer("btg.Meteor.womTimer",500);this.multiDomainScript=function(){if(btg.Meteor.isWOMReported&&typeof meteor!="undefined"&&typeof meteor.orion!="undefined"&&meteor.orion.init!="undefined"){meteor.orion.init();btg.Meteor.multiDomainTimer.stop()}};this.multiDomainTimer=new btg.Timer("btg.Meteor.multiDomainTimer",500)};
try{btg.DOM.loadScript("http"+("https:"==document.location.protocol?"s":"")+"://btg.mtvnservices.com/aria/metsol-mtv.js");btg.Meteor.multiTrackTimer.on("count",btg.Meteor.multiTrackScript);btg.Meteor.multiTrackTimer.start()}catch(e){}
try{btg.DOM.Events.addListener(window,"load",function(){var c=btg.config,a=btg.Meteor;if(!a.isWOMReported){a.womTimer.on("count",a.womScript);a.womTimer.start()}if(btg.Object.isConfigDefined(a)&&a.applicationId!="")if(typeof c.Meteor.multiDomain=="boolean"&&c.Meteor.multiDomain){a.multiDomainTimer.on("count",a.multiDomainScript);a.multiDomainTimer.start()}})}catch(e$$1){};

//Attempting to include CODA/builds/3/Bridge.js
if(typeof mtvn=="undefined")var mtvn={};
mtvn.btg={Controller:btg.Controller,managers:{DependencyManager:btg.DependencyManager,PluginManager:btg.PluginManager,QueueManager:btg.QueueManager},ads:{AdManager:btg.AdManager,games:{GameAdLoader:btg.GameAdLoader,GameAdManager:btg.GameAdManager,GameDc:btg.GameDc},freewheel:{FreeWheelAd:btg.FreeWheelAd,FreeWheelAdInterface:btg.FreeWheelAdInterface}},reporting:{ABTest:btg.ABTest,ChoiceStream:btg.ChoiceStream,ComScore:btg.ComScore,FluxHosted:btg.FluxHosted,FluxState:btg.Flux,Nielsen:btg.Nielsen,Omniture:btg.Omniture,
Photos:btg.Photos,QuantCast:btg.QuantCast,RecsABTesting:btg.Recommendations,ReportingManager:btg.ReportingManager,Search:btg.Search,SEO:btg.SEO,TestAndTarget:btg.TestAndTarget,UserSegment:btg.UserSegment,Demdex:btg.Demdex,omniture:{Hcode:btg.Hcode},player:{Loadtime:btg.Loadtime,MediaPlayer:btg.MediaPlayer,Preload:btg.Preload},games:{GameEventMediator:btg.GameEventMediator,GameEventVO:btg.GameEventVO,GameReporter:btg.GameReporter,GameReportingManager:btg.GameReportingManager}},util:{Alert:btg.Alert,
Beacon:btg.Beacon,Class:btg.Class,Cookie:btg.Cookie,DOM:btg.DOM,Events:btg.Events,JSON:btg.JSON,Math:btg.Math,Object:btg.Object,String:btg.String,Timer:btg.Timer,TimeTracker:btg.TimeTracker,Window:btg.Window,Sections:btg.Sections},plugins:{GUID:btg.GUID,Meteor:btg.Meteor}};if(typeof mtvn.btg.config=="undefined")mtvn.btg.config={};
if(typeof mtvn.btg.config.ReportSettings=="undefined")mtvn.btg.config.ReportSettings={defaultPageName:btg.globalvars.PAGE_URL,Omniture:{},Nielsen:{},QuantCast:{},ComScore:{},Meteor:{},ChoiceStream:{},Demdex:{}};if(typeof mtvn.btg.config.AdSettings=="undefined")mtvn.btg.config.AdSettings={DoubleClick:{},International:{},QuantCast:{}};if(typeof com=="undefined")com={};if(typeof com.mtvi=="undefined")com.mtvi={};if(typeof com.mtvi.reporting=="undefined")com.mtvi.reporting={};if(typeof com.mtvi.ads=="undefined")com.mtvi.ads={};if(typeof com.mtvi.config=="undefined")com.mtvi.config={};if(typeof com.mtvi.util=="undefined")com.mtvi.util={};if(typeof com.mtvi.util.IFrameReloader=="undefined")com.mtvi.util.IFrameReloader={};if(typeof com.mtvi.metadata=="undefined")com.mtvi.metadata={};
com.mtvi.util={toObject:btg.String.toObject,queryStringToHash:btg.String.queryStringToObject,isDefined:btg.String.isDefined,readCookie:btg.Cookie.read,deleteCookie:btg.Cookie.remove,crawlNodes:btg.Window.getNodeLinkName,addOnloadEvent:function(a){return btg.DOM.Events.addListener(window,"load",a)}};
com.mtvi.metadata={getDefaultPageName:function(){var a="",b=btg.globalvars;try{a=b&&typeof b.PAGE_URL=="string"&&b.PAGE_URL!=""?b.PAGE_URL:location.pathname;if(a.lastIndexOf("/")==a.length-1)if(mtvn.btg.util.String.isDefined(mtvn.btg.config.ReportSettings.indexFileName))a+=mtvn.btg.config.ReportSettings.indexFileName;else a=a!="/"?mtvn.btg.util.String.charRtrim(a,"/"):a;if(a!="/")a=mtvn.btg.util.String.charRtrim(a,"/");if(a!="/"&&a.indexOf("/")==0)a=a.substring(1);if(a.indexOf("/")==-1&&a.indexOf(mtvn.btg.config.ReportSettings.indexFileName)!=
-1)a="home/"+a}catch(e){}return a},getDefaultHierarchy:function(){var a=this.getDefaultPageName();return a=="/"?"":a},getDefaultChannel:function(){var a=this.getDefaultPageName();return a!="/"?a.split("/")[0]:a}};
if(btg.config.hasReporting&&typeof btg.ReportingManager!="undefined"){com.mtvi.reporting.Controller=new function(){this.initalized=false;this.initialize=function(){btg.Controller.init()};this.sendCall=function(a){btg.Controller.sendPageCall(a)};this.sendLinkEvent=function(a){btg.Controller.sendLinkEvent(a)};this.registerLinks=function(){return true};this.setConfig=function(a){for(var b in a)btg.config.Omniture[b]=a[b];return true};this.addRegisterLinks=function(){return true};this.setDefaultData=
function(a,b){if(btg.String.isDefined(a)){btg.config.Omniture[a]=btg.String.isDefined(b)?b:"";return true}return false}};com.mtvi.reporting.ComScore=new function(){this.sendComScoreCall=function(){}};com.mtvi.reporting.Dispatcher=function(){this.getValOnce=function(){return true};this.sendCall=function(a){btg.Controller.sendPageCall(a)};this.sendLinkEvent=function(a){mtvn.btg.Controller.sendLinkEvent(a)};this.registerLinks=function(){return true};this.setAttribute=function(a,b){if(btg.String.isDefined(a)){btg.Hcode[a]=
btg.String.isDefined(b)?b:"";return true}return false};this.getAttribute=function(a){return btg.config.Omniture[a]};this.setValues=function(a){for(var b in a)if(btg.String.isDefined(a[b]))this.setAttribute(b,a[b])};this.send=function(a){btg.Controller.sendPageCall(a)};this.setDefaultData=function(){};this.clearProps=function(){};this.clearAllVars=function(){}};com.mtvi.reporting.FluxWidgeted={setVars:function(){return true}};com.mtvi.reporting.MediaPlayer={addPlayer:btg.MediaPlayer.addPlayer};mtvn.btg.reporting.MediaPlayer=
{setEndSlateClick:mtvn.btg.reporting.player.MediaPlayer.setEndSlateClick,getEndSlateClick:mtvn.btg.reporting.player.MediaPlayer.getEndSlateClick};com.mtvi.reporting.QuantCast=new function(){this.sendQuantCastCall=function(){(new btg.QuantCast(btg.config.QuantCast)).sendPageCall();return true}};com.mtvi.reporting.Search=btg.Search;com.mtvi.reporting.Search.setVars=btg.Search.setData}
if(btg.config.hasAds&&typeof btg.AdManager!="undefined"){com.mtvi.ads.AdManager=new function(){var a=btg.config.DoubleClick,b=btg.config.International,e=btg.String.isDefined,h=btg.Object.isDefined;this.setDartSite=function(c){(a.enabled?a:b).dartSite=c};this.setPositionThreshold=function(c){(a.enabled?a:b).positionThreshold=c};this.setSiteName=function(c){(a.enabled?a:b).siteName=c};this.setDefaultSections=function(c){if(e(c))a.sections=c};this.setKeyValues=function(c){(a.enabled?a:b).keyValues=c};
this.getFormattedSections=function(a){var b=a;try{var b=a=="/"?a:btg.String.charTrim(a,"/"),j=a.length,d="index";if(h(com.mtvi.reporting.Account)&&e(com.mtvi.reporting.Account.defaultIndexFileName))d=com.mtvi.reporting.Account.defaultIndexFileName;if(h(mtvn.btg.config.AdSettings)&&e(mtvn.btg.config.AdSettings.defaultIndexFileName))d=mtvn.btg.config.AdSettings.defaultIndexFileName;if(h(btg.config)&&e(btg.config.defaultIndexFileName))d=btg.config.defaultIndexFileName;for(var d=btg.String.stripFileExtension(d),
g=["/",d,"home/"+d],f=0,k=g.length;f<k;f++)if(a.indexOf(g[f])==0&&j==g[f].length){b=a.replace(g[f],"_hp");break}if(b=="")b="_hp";var i=btg.String.stripFileExtension(b).split("/");if(i.length==2)if(i[1]==d)b=btg.String.stripFileExtension(b).replace(d,"_mn")}catch(l){}return b};this.placeAd=function(a){btg.Controller.placeAd(a)};this.setServer=function(c){(a.enabled?a:b).server=c};this.setSsl=function(){(a.enabled?a:b).ssl=true};this.setDefaultContentType=function(c){(a.enabled?a:b).contentType=c};
this.setZoneOverride=function(c){(a.enabled?a:b).zoneOverride=c};this.IFrameAds=[];this.placeIFrameAd=function(a){a.isReloadable=true;a.contentType="adi";btg.Controller.placeAd(a)};this.setReloadInterval=function(a){btg.config.reloadInterval=a};this.setAdClass=function(){};this.getAdById=function(){return null};this.getDartSite=function(){return(a.enabled?a:b).dartSite};this.getAd=function(a){return btg.AdManager.getAd(a)};this.getReloadInterval=function(){return btg.config.reloadInterval};this.reloadIFrameAds=
function(){btg.Controller.reloadAds()};this.reloadIFrameAd=function(){};this.setZone=function(){};this.getNewAd=function(){};this.populateNamesValuesObj=function(){}};com.mtvi.ads.DoubleClickAd=function(){};com.mtvi.ads.DoubleClickAd.prototype={setZoneOverride:function(){},setDartSite:function(){},setOrd:function(){},placeAd:function(){},getXml:function(){return null},getJson:function(){return null},getUrl:function(){return null},getSections:function(){return null},setSize:function(){},setSections:function(){},
setContentType:function(){},setKeyValues:function(){},setTile:function(){},setPositionThreshold:function(){},setServer:function(){},setSsl:function(){},setMediaType:function(){},setPosition:function(){},setPartner:function(){},setId:function(){}}};(function(){btg.DomesticDc=function(){this.setContentTypeData=function(){};this.setDartData=function(){};this.setSectionsData=function(){};this.setSizeData=function(){};this.setMediaTypeData=function(){};this.setTileData=function(){};this.setKeyValuesData=function(){};this.setOrdData=function(){};this.getUrl=function(){return"DoubleClick ads not supported."};this.init=function(){}}})();

btg.isCoreLoaded=function(){btg.Events.CORE_LOADED.fire();if(btg.config.hasAds&&typeof btg.SurrogateAd!="undefined")btg.SurrogateAd.load("poe");return true}();

MTV.BTG = new function(){
var self = this;
var loc = location.pathname;
this.autoDcopt = true;
/* temp code to support old survey tag */
this.writeSurveyTag = function(dcCallWithPlaceholders){
var keyVals="";
if (MTVN.Ads.sections == ''){
path = loc;
}else{
path = MTVN.Ads.sections;
}
if(location.pathname.substr(-6) == ".jhtml"){
path = path.substr(0,path.length-6);
}
var parts=path.split("/");
parts = parts.splice(1);
for(var i=0; i < parts.length; i++){
keyVals += "sec" + i + "=" + parts[i] +";";
}
keyVals = keyVals.substr(0,keyVals.length-1); //remove trailing semi-colon
var dcCall = dcCallWithPlaceholders.replace(/\{pageValsParam\}/, keyVals );
dcCall = dcCall.replace(/\{ord\}/, Math.random() * 1000000000000000000);
var surveyScript = '<ifr' + 'ame src="' + dcCall + '?" width="1" height="1"><\/ifr'+'ame>';
document.write(surveyScript);
};
this.init = function(){
MTVN.Ads.handleAdditionalValues();
if (MTV.Utils.Cookies.read("xfp") != "preview")
// mtvn.btg.config.AdSettings.DoubleClick.keyValues = MTVN.Ads.additionalValues.replace("Gracenote", "gn");
if(MTVN.Ads.dartSite.length > 0){
mtvn.btg.config.AdSettings.DoubleClick.dartSite = MTVN.Ads.dartSite;
}
if(MTVN.Ads.sections.length > 0){
mtvn.btg.config.AdSettings.DoubleClick.sections = MTVN.Ads.sections;
}
mtvn.btg.config.AdSettings.DoubleClick.positionThreshold="2";
mtvn.btg.config.AdSettings.DoubleClick.autoDcopt=self.autoDcopt;
mtvn.btg.config.ReportSettings.indexFileName = "index.jhtml";
mtvn.btg.config.ReportSettings.Omniture.trackExternalLinks = true; 
mtvn.btg.config.ReportSettings.Omniture.videoViewEventDisable = true;
if(typeof com_mtvi_mtv2flag!="undefined" && com_mtvi_mtv2flag==true){
mtvn.btg.config.ReportSettings.Omniture.account = 'viamtv,viamtv2onmtv';
}
if(typeof com_mtvi_attpostedflag!="undefined" && com_mtvi_attpostedflag==true){
mtvn.btg.config.ReportSettings.Omniture.account = 'viamtv,viaposted';
}
if(typeof com_mtvi_unpluggedflag!="undefined" && com_mtvi_unpluggedflag==true){
mtvn.btg.config.ReportSettings.Omniture.account = 'viamtv,viaunplugged';
mtvn.btg.config.ReportSettings.Meteor.enabled = true;
mtvn.btg.config.ReportSettings.Meteor.applicationId = 'daa24ac1-b446-4e94-8d51-c9f0dac0cd89';
mtvn.btg.config.ReportSettings.Meteor.multiDomain = true;
}
if(typeof com_mtvi_omaflag!="undefined" && com_mtvi_omaflag==true){
mtvn.btg.config.ReportSettings.Omniture.account = 'viaoma';
}
if(typeof com_mtvi_vmaflag!="undefined" && com_mtvi_vmaflag==true){
mtvn.btg.config.ReportSettings.Omniture.account = 'viamtv,viamtvvma2005';
}
mtvn.btg.Controller.init();
MTV.BTG.observeDailyFreshClicks();
}
this.observeDailyFreshClicks = function(){
// make sure the DOM is loaded
$j(function(){
// for each feed-wrap - THERE SHOULD ONLY BE ONE
$j('.feed-wrap').each(function(){
var feed_wrap = $j(this);
// add click events to all links within promo modules
feed_wrap.find('.mdl.mdl-rich').each(function(){
var promo = $j(this);
var id = promo.attr('id');

if(promo.hasClass('v2')){	
promo.find('.title2 a').click(function(){
mtvn.btg.Controller.sendLinkEvent({
linkName : 'HP:FEED:' + id,
linkType : 'o'
});	
return true;
});
promo.find('.simple-list a').click(function(){
mtvn.btg.Controller.sendLinkEvent({
linkName : 'HP:FEED:SOURCE',
linkType : 'o'
});	
return true;
});
} else {
id = id.replace(/:/g, '/') + '.xml';
promo.find('a').click(function(){
// report click to CODA
// http://confluence.mtvi.com/display/BUSTECH/CODA+Link+Events
mtvn.btg.Controller.sendLinkEvent({
linkName : 'HP:FEED:' + id,
linkType : 'o'
});	
return true;
});
}
});
// add click events to pagination
feed_wrap.find('.feedPagination a').click(function(){
var page_index = parseInt($j(this).text());
// report click to CODA
// http://confluence.mtvi.com/display/BUSTECH/CODA+Link+Events
mtvn.btg.Controller.sendLinkEvent({
linkName : 'HP:FEED:PAGINATION:' + page_index,
linkType : 'o'
});
});
});

})
}
this.setPageUrl = function(pageUrl){ 
if (pageUrl.charAt(0) != "/") pageUrl = "/" + pageUrl;
var str = "/news/photos/";
if(pageUrl.substr(0,str.length) == str){
pageUrl = pageUrl.replace(/\/news\/photos\/.\//, str);
}
var adPageUrl = pageUrl
.replace(/movieawards/, 'ma')
.replace(/onair|ontv/i, 'shows')
.replace(/home\/index.jhtml/i, '_hp')
.replace(/main\/index.jhtml/i, '_mn');
if (MTVN.Ads.sections == '') MTVN.Ads.sections = adPageUrl;
MTV.Reporting.setPageName(pageUrl);
}
this.pageOverride = function(){
if (arguments.length > 0){
loc = loc.replace(arguments[0], arguments[1]);
}
var overrides = ["/news/articles/", "/movies/news/articles/"]; 
if(loc.substr(0,overrides[0].length) == overrides[0]){
loc = loc.replace(/\/news\/articles\/\d*\/\d*\//, overrides[0]);
}
if(loc.substr(0,overrides[1].length) == overrides[1]){
loc = loc.replace(/\/movies\/news\/articles\/\d*\//, overrides[1]);
}
self.setPageUrl(loc);
}
}
MTV.Reporting = new function(){
var self = this;
var temp;
var isDefined = function(val){
return !(typeof val == 'undefined');
}
this.dispatcherAttributes = "";
this.qs = mtvn.btg.util.String.queryStringToObject(window.location.search);
this.map ={
artist: "prop1",
fullBlogName: "prop10",
vidOrigin: "prop12",
partner: "prop16",
source: "prop17",
story: "prop18",
storyDate: "prop19",
author: "prop20",
vertical: "prop26",
rollUp: "prop28",
bps: "prop24",
fla: "prop25",
betaUsage: "prop34",
gamename: "prop23",
contentType: "prop37",
event: function(val){
if (self.eventNames.join(",").search(val) > 0)
self.data["prop44"] = val;
},
songTitle: function(val){
if(isDefined(val)){
self.temp = val;
}
},
franchise: function(val){
self.data["prop15"] = val;
}
}
this.eventNames = ['ma08','ma09','maYAH','VMA','woodiesYAH','woodies','ma10','att10','fashionweek','grammys','oscars','MovieAwards','lollapalooza2011','nycc2012','restoretheshore','Best Of','Hangout Festival','CMTMA13','omusicawards', 'SDCC', 'fallpreview', 'EMA', 'Halloween', 'FandomAwards'];
this.data ={
eVar35:(self.qs.cmp?self.qs.cmp:null)	
};
this.setPageName = function(val){
//replace ontv with onair in ontv urls, Evan Rose 3/18/10 
var newPagenameVal = val
.replace(/ontv/i, 'onair');
self.data.pageName = newPagenameVal;
}
//External Campaign Tracking (SHOULD BE REMOVED WHEN THE NEW USVR IS DEPLOYED!!!)
if(typeof self.qs.sem=="string") mtvn.btg.reporting.campaign = self.qs.sem;
else if(typeof self.qs.extcmp=="string") mtvn.btg.reporting.campaign = self.qs.extcmp;
else mtvn.btg.reporting.campaign = "";
self.data["prop42"] = mtvn.btg.reporting.campaign;
self.data["campaign"] = mtvn.btg.reporting.campaign;
//End External Campaign Tracking

this.report = function(){
self.addAttributes(self.dispatcherAttributes);
self.addAttributes(MTVN.Ads.additionalValues, false);

if (typeof(detectSafariTopSites) == "function") {
var isTopSitesReq = detectSafariTopSites();

if (isTopSitesReq != null && !isTopSitesReq)
mtvn.btg.Controller.sendPageCall(self.data);
else if (isTopSitesReq == null)
mtvn.btg.Controller.sendPageCall(self.data);

}

else
mtvn.btg.Controller.sendPageCall(self.data);

}
this.addAttributes = function(aString, aPassThru){
if (aString.length < 1)
return false;

var passThru = ((typeof aPassThru != 'undefined')? aPassThru: true);
var attrs = aString.split(";");
var channel;

if (self.data.pageName != null)
channel = self.data.pageName.split("/")[1];

if (channel == "movies")
channel = "Movie News";
else 
channel = "News";

for (var i=0; i < attrs.length; i++){
if(attrs[i]!=""){
var pair = attrs[i].split("=");	
if(typeof self.map[pair[0]] != 'undefined'){
if (typeof self.map[pair[0]] == 'string'){

if (pair[0] == "story")
self.data[self.map[pair[0]]] = pair[1] + " [" + channel + "]";
else
self.data[self.map[pair[0]]] = pair[1];

} else{
self.map[pair[0]](pair[1]);
}
} else{
if(passThru){
self.data[pair[0]] = pair[1];
}
}
}
}
}
this.reportIMX = function(tagUrl, protocol, params){
var imxTag = new Image();
if ((protocol=="flipbook" && !(document.referrer.indexOf("fid="+params) > -1)) || (protocol != 'flipbook')){
imxTag.src = tagUrl;
}
}

this.configureDFPP = function(){

if (typeof(vmn_page_data) != "object") return;

vmn_page_data.mappings["key-values"] = vmn_page_data.mappings["key-values"] || {};

var addtlvlArry = MTVN.Ads.additionalValues.split(";");

MTVN.Ads.onDemandObj = {};
MTVN.Ads.onDemandObj["keyValues"] = "";

var addtlvlMap = {};

for (var i = 0; i < addtlvlArry.length; i++)
{

if (addtlvlArry[i].indexOf("=") > -1)
addtlvlMap[addtlvlArry[i].split("=")[0]] = addtlvlArry[i].split("=")[1];

}

var evnt = addtlvlMap["event"];
var sers = addtlvlMap["seriesAlias"];
var fran = addtlvlMap["franchise"];
var arts = addtlvlMap["artist"];
var newsId = addtlvlMap["newsId"];
var fid_ = addtlvlMap["fid"];
var sponsor = addtlvlMap["sponsor"];
var eventSections = "";

if (typeof(globalReportingObject) != "undefined" && globalReportingObject.prop15 != null)
sers = globalReportingObject.prop15;

if (arts != null)
arts = arts.replace(/\s/g, "_");

if (sers != null)
sers = sers.replace(/\s/g, "_");

if (arts != null)
vmn_page_data["mappings"]["key-values"]["artist"] = arts;
if (newsId != null)
vmn_page_data["mappings"]["key-values"]["article_id"] = newsId;
if (fid_ != null)
vmn_page_data["mappings"]["key-values"]["fid"] = fid_;

var prePgo;

if (MTV.Reporting.data.pageName != null)
prePgo = MTV.Reporting.data.pageName;
else if (typeof(urlOverride) == "string")
prePgo = urlOverride;
else
prePgo = window.location.pathname;

var pgO = prePgo.replace("onair", "shows");

var sectionsArray = pgO.split("/");

if (pgO == "/music/hiphop/")
vmn_page_data["mappings"]["key-values"]["genre"] = "hiphop";

if (pgO == "/home/index.jhtml") {
vmn_page_data["metadata"]["is_main"] = true;
vmn_page_data.mappings["exclusion-categories"] = "home";
}

else {

if (pgO == "/videos/main/home.jhtml" || pgO.indexOf("category=fullepisodes") > -1)
vmn_page_data["metadata"]["hub"] = "full_episode";
else if (pgO.indexOf("category=aftershows") > -1) {
vmn_page_data["metadata"]["hub"] = "aftershows";
if (pgO.indexOf("metric=numberOfView") > -1)
vmn_page_data["metadata"]["is_main"] = true;
}
else if (pgO.indexOf("category=bonusclips") > -1) {
vmn_page_data["metadata"]["hub"] = "show_clips";
if (pgO.indexOf("metric=numberOfView") > -1)
vmn_page_data["metadata"]["is_main"] = true;
}
else if (pgO.indexOf("/mostpopular/photos/") > -1) {
vmn_page_data["metadata"]["hub"] = "photos";
if (pgO.indexOf("metric=numberOfShares") > -1)
vmn_page_data["metadata"]["is_main"] = true;
}
else if ((addtlvlMap["partner"] != null && addtlvlMap["partner"] == "mv") || (addtlvlMap["rollUp"] != null && addtlvlMap["rollUp"] == "Vevo detail page")) {
vmn_page_data["metadata"]["hub"] = "music";
}
else if (typeof(MTVN.Player) != "undefined" && MTVN.Player.videoType == "movies") {
vmn_page_data["metadata"]["hub"] = "movies";
}
else if (pgO == "/movies/oscars/") {
vmn_page_data["metadata"]["hub"] = "oscars";
}
else
vmn_page_data["metadata"]["hub"] = sectionsArray[1];
vmn_page_data["mappings"]["ad-unit"]["2"] = "@hub";
if (pgO == "/mtv2/main/index.jhtml")
vmn_page_data.mappings["exclusion-categories"] = "home";
else if (new RegExp("^/[a-zA-Z0-9]+/main/index.jhtml").test(pgO))
vmn_page_data.mappings["exclusion-categories"] = "hub_pages";

}

if (pgO == "/shows/schedule/index.jhtml") {

vmn_page_data["metadata"]["franchise"] = "schedule";
vmn_page_data["mappings"]["ad-unit"]["3"] = "@franchise";

}

if ((typeof(com_mtvi_mtv2flag) == "boolean") && (com_mtvi_mtv2flag == true)) {

vmn_page_data["metadata"]["hub"] = "mtv2";
if (pgO != "/mtv2/main/index.jhtml") {
vmn_page_data["metadata"]["franchise"] = "shows";
vmn_page_data["mappings"]["ad-unit"]["3"] = "@franchise";
}

if (pgO.indexOf("/series.jhtml") > -1) {
vmn_page_data["mappings"]["key-values"]["section"] = sers;
}

}

if ((pgO != null && pgO.match("_hp$") == "_hp") || pgO == "/music/hangout-festival/" || pgO == "/movies/oscars/" || pgO.indexOf("/main.") > -1 || pgO.indexOf("/main/") > -1 || pgO == "/ontv/all/currentMtv2.jhtml")
vmn_page_data["metadata"]["is_main"] = true;

if ((sers != null && evnt == null) && (typeof(com_mtvi_mtv2flag) == "undefined")) {

vmn_page_data["metadata"]["hub"] = "shows";
vmn_page_data["metadata"]["franchise"] = sers;
vmn_page_data["mappings"]["ad-unit"]["3"] = "@franchise";

if (new RegExp("^/videos/").test(pgO)) {

vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",video") : "video"; 

}

}

if (pgO == "/music/rapfix_live/main.jhtml") {
vmn_page_data["metadata"]["hub"] = "shows";
vmn_page_data["metadata"]["franchise"] = sectionsArray[2];
vmn_page_data["mappings"]["ad-unit"]["3"] = "@franchise";
vmn_page_data.mappings["exclusion-categories"] = "hub_pages";
vmn_page_data["metadata"]["is_main"] = false;
vmn_page_data["mappings"]["key-values"]["franchise"] = sectionsArray[2];
}

if (sponsor != null && (evnt == null || evnt.toLowerCase() != "vma" || new RegExp("^/photos/[a-zA-Z0-9_-]+/[0-9]+/[0-9]+/photo.jhtml$").test(window.location.pathname)))
vmn_page_data["mappings"]["key-values"]["sponsor"] = sponsor;

if (sers != null) {

vmn_page_data["mappings"]["key-values"]["seriesAlias"] = sers;
if (fran != null)
vmn_page_data["mappings"]["key-values"]["franchise"] = fran;
else
vmn_page_data["mappings"]["key-values"]["franchise"] = sers;

}

if (evnt != null) {
vmn_page_data["metadata"]["hub"] = evnt.toLowerCase();

if (evnt.toLowerCase() == "woodies") {
vmn_page_data["metadata"]["property"] = "mtvu";
vmn_page_data["metadata"]["hub"] = "woodies_awards";
vmn_page_data["mappings"]["key-values"]["section"] = "woodies_awards2014";
}

else if (evnt.toLowerCase() == "movieawards") {
vmn_page_data["metadata"]["hub"] = "movie_awards";
vmn_page_data["mappings"]["key-values"]["section"] = "movie_awards2014";

}
else if (evnt.toLowerCase() == "vma") {
vmn_page_data["metadata"]["hub"] = "vmas";
eventSections = "vmas2014";

}
else if (evnt.toLowerCase() == "oscars") {
vmn_page_data["mappings"]["key-values"]["section"] = "oscars2014";

}
else if (evnt.toLowerCase() == "grammys") {
vmn_page_data["mappings"]["key-values"]["section"] = "grammys2014";

}
else if (evnt.toLowerCase() == "hangout festival") {
vmn_page_data["metadata"]["hub"] = "hangout_fest";
vmn_page_data["mappings"]["key-values"]["section"] = "hangout_fest2014";
if (pgO == "/music/hangout-festival/")
vmn_page_data.mappings["exclusion-categories"] = "home";

}
else if (evnt.toLowerCase() == "mtvu_fandom_awards") {
vmn_page_data["mappings"]["key-values"]["franchise"] = "mtvu_fandom_awards";

}
else if (evnt.toLowerCase() == "ema") {
vmn_page_data["metadata"]["hub"] = "emas";
eventSections = "ema2014";

}

}

if (addtlvlMap["partner"] != null && addtlvlMap["partner"] == "mv") {
vmn_page_data["mappings"]["key-values"]["rev"] = "mv";
}

if (pgO.indexOf("/series.jhtml") > -1) {

vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home") : "home"; 

}

else if (addtlvlMap["event"] != null && pgO.indexOf("/_hp") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home") : "home";

vmn_page_data.mappings["exclusion-categories"] = "home,hub_pages";
}

else if (addtlvlMap["event"] != null && pgO.indexOf("/winners/_mn") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",winners";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",winners") : "winners";

}

else if (addtlvlMap["event"] != null && pgO.indexOf("/about/_mn") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home,about";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,about") : "home,about";
vmn_page_data.mappings["exclusion-categories"] = "hub_pages";
}

else if (addtlvlMap["event"] != null && pgO.indexOf("video/_mn") > -1) {
if (evnt.toLowerCase() == "vma")
eventSections += ",home,video";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,video") : "home,video"; 
vmn_page_data.mappings["exclusion-categories"] = "hub_pages,video_pages";
vmn_page_data["mappings"]["key-values"]["content_type"] = "videos";
}

else if (addtlvlMap["event"] != null && new RegExp("^/videos/").test(pgO)) {

if (evnt.toLowerCase() == "vma")
eventSections += ",video";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",video") : "video"; 

}

else if (addtlvlMap["event"] != null && pgO.indexOf("photos/_mn") > -1) {
if (evnt.toLowerCase() == "vma")
eventSections += ",home,photos";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,photos") : "home,photos"; 
vmn_page_data["mappings"]["key-values"]["content_type"] = "photos";
vmn_page_data.mappings["exclusion-categories"] = "hub_pages";
}

else if (addtlvlMap["event"] != null && pgO.indexOf("photo.jhtml") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",slideshoq";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",slideshoq") : "slideshoq"; 

}

else if (addtlvlMap["event"] != null && pgO.indexOf("/headlines.jhtml") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home,headlines";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,headlines") : "home,headlines";
vmn_page_data.mappings["exclusion-categories"] = "hub_pages";
}

else if (addtlvlMap["event"] != null && pgO.indexOf("/fashion/_mn") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home,fashion";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,fashion") : "home,fashion"; 
vmn_page_data.mappings["exclusion-categories"] = "hub_pages";
}

else if (addtlvlMap["event"] != null && pgO.indexOf("/revealed/_mn") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home,revealed";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,revealed") : "home,revealed"; 

}

else if (addtlvlMap["event"] != null && pgO.indexOf("/mobile/_mn") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home,mobile";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,mobile") : "home,mobile"; 

}

else if (addtlvlMap["event"] != null && pgO.indexOf("gifwall.jhtml") > -1) {

if (evnt.toLowerCase() == "vma")
eventSections += ",home,gif_wall";

else
vmn_page_data["mappings"]["key-values"]["section"] = (vmn_page_data["mappings"]["key-values"]["section"] != null) ? (vmn_page_data["mappings"]["key-values"]["section"] + ",home,gif_wall") : "home,gif_wall"; 

}

if (evnt == "maYAH") {

vmn_page_data["metadata"]["hub"] = "movie_awards";
vmn_page_data["mappings"]["key-values"]["section"] = "movie_awards" + window.location.pathname.split("/")[3]; 
}

else if (evnt == "VMAYAH") {

vmn_page_data["metadata"]["hub"] = "vmas";
vmn_page_data["mappings"]["key-values"]["section"] = "vmas" + window.location.pathname.split("/")[3]; 
}

else if (evnt == "woodiesYAH") {

vmn_page_data["metadata"]["hub"] = "woodies_awards";
vmn_page_data["mappings"]["key-values"]["section"] = "woodies_awards" + window.location.pathname.split("/")[3]; 
}

else if (new RegExp("^/music/hangout-festival/[0-9]+/").test(window.location.pathname)) {

vmn_page_data["metadata"]["hub"] = "hangout_fest";
vmn_page_data["mappings"]["key-values"]["section"] = "hangout_fest" + window.location.pathname.split("/")[3]; 
}

if (new RegExp("^/videos/").test(pgO)) {
vmn_page_data.mappings["exclusion-categories"] = "video_pages";
if (addtlvlMap["video_id"] != null)
vmn_page_data["mappings"]["key-values"]["video_id"] = addtlvlMap["video_id"];

if (window.location.hash.length != 0) {
if (window.location.hash.substring(1).split("=")[0] == "id")
if (window.location.hash.substring(1).split("=")[1] != null)
vmn_page_data["mappings"]["key-values"]["content_id"] = window.location.hash.substring(1).split("=")[1];

}
else if (addtlvlMap["content_id"] != null)
vmn_page_data["mappings"]["key-values"]["content_id"] = addtlvlMap["content_id"];

if (typeof(MTVN.Player) != "undefined") {
if (MTVN.Player.episodeType == "fullEpisode")
vmn_page_data["mappings"]["key-values"]["content_type"] = "full_eps";
else if (MTVN.Player.videoType == "music")
vmn_page_data["mappings"]["key-values"]["content_type"] = "music_videos";
else
vmn_page_data["mappings"]["key-values"]["content_type"] = "clips";
}

}

if (new RegExp("^/photos/[a-zA-Z0-9_-]+/[0-9]+/[0-9]+/photo.jhtml$").test(window.location.pathname)) {
vmn_page_data["settings"] = vmn_page_data["settings"] || {};
vmn_page_data["settings"]["reload"] = true;
vmn_page_data["settings"]["reload_interval"] = 30000;

}

if (MTVN.config.btg.DoubleClick.onDemand && MTVN.Ads.additionalValues != null)
MTVN.Ads.onDemandObj["keyValues"] = MTVN.Ads.additionalValues + ";section=" + eventSections;

}

this.makeSurrogateCall = function(){
var adTileSurr = 0;

$j("div.surr-block").each(function() {

var adId = "advPosSurr" + adTileSurr++;
MTVN.Ads.onDemandObj["size"] = $j(this).attr("data-ad-surr");	
$j(this).attr("id", adId);

if ($j(this).attr("data-ad-surr") == "6x6") {
if (MTVN.Utils.Cookies.read("DFPP6x6") != "true") {
btg.DoubleClick.createAd(MTVN.Ads.onDemandObj,$j(this).attr("id"));
MTVN.Utils.Cookies.create("DFPP6x6", "true");
}
}

else
btg.DoubleClick.createAd(MTVN.Ads.onDemandObj,$j(this).attr("id"));

});

}

this.makeDFPPCall = function(){

if (navigator.userAgent.toLowerCase().indexOf("safari") > 1 && (navigator.userAgent.indexOf("OS 5") > -1 || navigator.userAgent.indexOf("Version/5") > -1)) {

$j("div[id*='adPos']").each(function() {

if ($j(this).attr("data-ad-sizes") == "6x6") {
if (MTV.Utils.Cookies.read("DFPP6x6") != "true") {
btg.DoubleClick.createAd({"size" : $j(this).attr("data-ad-sizes")},$j(this).attr("id"));
MTV.Utils.Cookies.create("DFPP6x6", "true");
}
}

else
btg.DoubleClick.createAd({"size" : $j(this).attr("data-ad-sizes")},$j(this).attr("id"));

});

}
else
btg.DoubleClick.createAdsFromMarkup();

}
}

MTV.Apps = new function(){}
MTV.Apps.Mamabar = new function(){
this.configObj;
this.init = function(){
if(MTV.Apps.Mamabar.configObj != undefined){
var config = MTV.Apps.Mamabar.configObj;
var attributes = "";
if(config.search!=undefined) attributes += " search=\"" + config.search + "\"";
if(config.footer!=undefined) attributes += " footer=\"" + config.footer + "\"";
if(config.theme!=undefined) attributes += " theme=\"" + config.theme + "\"";
if(config.head!=undefined) attributes += MTV.Apps.Mamabar.makeLinksObject(config.head, "head");
if(config.footerMidCol!=undefined) attributes += MTV.Apps.Mamabar.makeLinksObject(config.footerMidCol, "foot_midcol");
if(config.footerRightCol!=undefined) attributes += MTV.Apps.Mamabar.makeLinksObject(config.footerRightCol, "foot_rightcol");

var mamabar = "<scr" + "ipt type=\"text/javascript\" src=\"/widgets/scripts/mamma.jhtml\"" + attributes + "><\/scr"+"ipt>";
document.write(mamabar);
}
}
this.makeLinksObject = function(linksObj, name){
var prop = " " + name + "=\"";
prop += "{";
if(linksObj.link instanceof Array){
for (var i=0; i < linksObj.link.length; i++){
prop += MTV.Apps.Mamabar.makeLink(linksObj.link[i]);
if(i < linksObj.link.length-1) prop += ",";
}
}
else{
prop += MTV.Apps.Mamabar.makeLink(linksObj.link);
}
prop += "}\"";
return prop;
}
this.makeLink = function(linkObj){
var link = "";
link += "'" + linkObj.content + "'";
link += ":";
link += "'" + linkObj.args + "'";
return link;
}
}

if(typeof MTVN == "undefined") { MTVN = new function(){} }

MTVN.Typeahead = new function(){
var default_options ={
minChars: 1,
scrollHeight: 300,
jsonpCallback: 'mtvSearchJSONP',
matchSubset: false,
selectFirst: false,
formatItem: function(item){
return item;
},
parse: function(data){
var parsed = [];
$j.each(data, function(i){
var row = $j.trim(this);
parsed[i] ={ data: row, value: row, result: row }
});
return parsed;
}
};
this.init = function(){
MTVN.Typeahead.autocomplete('form[name="search"] input[type="text"]');
MTVN.Typeahead.autocomplete('form[name="searchF"] input[type="text"]');
MTVN.Typeahead.autocomplete('form[name="search404"] input[type="text"]');
}
this.autocomplete = function(selector, options, callback){
var typehead_options ={};
$j.extend(typehead_options, default_options, options ||{});
callback = callback || function(){
var input = $j(this);

/* this blows- too tied to the "search" structure */
//input.closest('form').find('button.mtv').click();

var e = jQuery.Event("keypress");
e.keyCode = 13;
input.trigger(e);
};
$j(selector).each(function(){
var input = $j(this);
// we subtract the padding of the autocomplete container class here
// this is defined by .ac_results selector
if (!typehead_options['width']){
typehead_options['width'] = parseInt(input.outerWidth()) - 8;
}
var url = "http://search.mtvnservices.com/typeahead/suggest/?siteName=mtv&format=json";

if($j(this).parent().hasClass('searchNutch')) url += "&testgroup=B";

input.autocomplete(url, typehead_options).result(callback);
});
}
}
if(typeof MTVN == "undefined") { MTVN = new function(){} }

MTVN.Search = new function(){
var SEARCH_TERM_REGEX = /q=([^&|\s]+)/;
this.init = function(){
var self = this;
var search_forms = 'form[name="search"], form[name="searchF"], form[name="search404"]';
$j(search_forms).each(function(){
self.addEventListeners(this);
self.setSearchTerm(this);
});
}
this.setSearchTerm = function(selector){
var query_string = document.location.search;
if (query_string.length < 1){ return; }

var search_term = query_string.match(SEARCH_TERM_REGEX);
if (search_term){
search_term = search_term[1].replace("+", " ");
search_term = unescape(search_term);
$j(selector).find('input[type="text"]').val(search_term);
}
}
this.addEventListeners = function(selector){
var self = this;
$j(selector).each(function(){
var form = $j(this);
// deactivate submit
form.submit(function(){
return false;
});
var goButton = form.find('button.mtv');
var webButton = form.find('button.web');
var input = form.find('input[type="text"]');
// clear input on click
input.click(function(){
$j(this).val('');
return false;
});
// watch for user enter
input.keypress(function(event){
if (event.keyCode == 13){
var params = "";

if($j(this).parent().hasClass('searchNutch')){
params = "testgroup=B";
mboxUpdate('viamtv','searchclick=nutch');
}else if($j(this).parent().hasClass('searchFast')){
mboxUpdate('viamtv','searchclick=fast');
}

self.submit(input.val(), 'mtv', params);
return false;
}
});
// web submit
webButton.click(function(){
self.submit(input.val(), 'web');
});
// mtv submit
goButton.click(function(){

var params = "";

if($j(this).parent().hasClass('searchNutch')){
params = "testgroup=B";
mboxUpdate('viamtv','searchclick=nutch');
}else if($j(this).parent().hasClass('searchFast')){
mboxUpdate('viamtv','searchclick=fast');
}

self.submit(input.val(), 'mtv', params);

});
});
}
this.submit = function(value, type, params){
value = value.replace(/^\s*|\s(?=\s)|\s*$/g, "").toLowerCase();
value = value.replace(" ", "+");
value = escape(value);
if (value == "search" || value.length == 0){
return false;
}
if (type == 'web'){
var msUrl ='http://search.live.com/results.aspx?q=' + value + '&amp;mkt=en-us&amp;FORM=VCM004';
var msWindow = window.open(msUrl);
com.mtvi.reporting.Dispatcher.setAttribute("eVar3","web");
com.mtvi.reporting.Dispatcher.sendLinkEvent({linkName:"MSN_Live_Search",linkType:"e",lnk:this});
}
else{

if(typeof params != 'undefined' && params != "") value += "&" + params;

window.location = this.getBaseUrl() + '/search/?q=' + value;
}
return false;
}
this.getBaseUrl = function(){
if( window.location.hostname.match(/(www.mtvx?-j?[dq].mtvi.com)/) ) return '';
else{
if( window.location.hostname.indexOf("mtv-d.mtvi.com") != -1 ) return 'http://www.mtv-d.mtvi.com';
else if (window.location.hostname.indexOf("mtv-q.mtvi.com") != -1 ) return 'http://www.mtv-q.mtvi.com';
else return 'http://www.mtv.com';
}
}
}
MTV.Player = new function(){
var navOverride;
var headerLogoLinkOverride;
var navInclude;
var franchiseLinksUrl;
var tuneInPromo;
this.init = function(){
// handle nav
if(navOverride != undefined && navInclude == undefined){
if($j("#header.franchise").length == 0) {
$j("#navlist-wrap").empty();
$j("#searchmtv, #artistlist,").remove();
// remove elements not required from the global nav and add internical styles to header structure
$j('#mtvSitesNav').remove();
$j('div.memberbarlinks').remove();
$j('#nav #mtvLogo').remove();
$j('#topnavLinks').remove();
$j('#container-inner').addClass('franchise');
$j('#header').addClass('franchise');
$j('#nav').removeClass('globalNav').addClass('franchise-navigation').addClass('franchise');
$j('#header').prepend('<a id="logo-link" href="/">mtv</a>');
$j('#nav').removeClass('hidden');
var scriptUrl = "/videos/scripts/nav.jhtml?nav="+navOverride;
$j.ajax({type: "GET", url: scriptUrl, dataType: "script", cache: true});
}
}else if(navInclude != undefined){
$j('#nav').remove();
$j("#searchmtv, #artistlist,").remove();
// remove elements not required from the global nav and add internical styles to header structure
$j('#mtvSitesNav').remove();
$j('div.memberbarlinks').remove();
$j('#nav #mtvLogo').remove();
$j('#topnavLinks').remove();
if (navInclude != "/sitewide/modules/header/geek/nav/index.jhtml")
$j('#container-inner').addClass('franchise');
if (headerLogoLinkOverride == undefined) {
$j('#header').prepend('<a id="logo-link" href="/">mtv</a>');
}else {
var headerLogoLinkOverrideUrl = headerLogoLinkOverride;
$j.get(headerLogoLinkOverrideUrl, function(data) {
$j('#header').prepend(data);
});
}
var navIncludeUrl = navInclude;
$j.get(navIncludeUrl, function(data){
$j('#header').append(data);
});
}
$j("#searchmtv, #artistlist, #navlist-wrap").css("visibility", "visible");
$j('#nav').removeClass('hidden');
}
this.localFeedHandler = function(){
if(MTVN.Player.feed.document.navOverride!=undefined) navOverride = MTVN.Player.feed.document.navOverride;
if(MTVN.Player.feed.document.navInclude!=undefined) navInclude = MTVN.Player.feed.document.navInclude;
if(MTVN.Player.feed.document.headerLogoLinkOverride!=undefined) headerLogoLinkOverride = MTVN.Player.feed.document.headerLogoLinkOverride;
if(MTVN.Player.feed.document.franchiseLinksUrl!=undefined) franchiseLinksUrl = MTVN.Player.feed.document.franchiseLinksUrl;
if(MTVN.Player.feed.document.tuneInPromo!=undefined) tuneInPromo = MTVN.Player.feed.document.tuneInPromo;
if(MTVN.Player.feed.document.hat!=undefined) MTV.setHat("h-" + MTVN.Player.feed.document.hat);
MTV.setTheme(MTVN.Player.feed.document.theme);
// handle keywords
if(MTVN.Player.feed.document.keywords != undefined){
if(MTVN.Player.feed.document.keywords.toUpperCase().indexOf("MTV2") > -1){
com_mtvi_mtv2flag = true;
mtvn.btg.config.ReportSettings.Omniture["prop26"] = "MTV2";
}
}
if(MTVN.Player.feed.document.mamabar!=undefined) MTV.Apps.Mamabar.configObj = MTVN.Player.feed.document.mamabar;
}
this.localModulesHandler = function(){
if(franchiseLinksUrl != undefined){
var container = $j("#franchiseLinks");
if(container.is("*")){
// get custom franchise link url
$j.get(franchiseLinksUrl, function(data){
container.append(data);
});
}
}
if(tuneInPromo != undefined){
var container = $j(".group-c");
if(container.is("*")){
// get custom franchise link url
$j.get(tuneInPromo, function(data){
container.prepend(data);
});
}
}
}
}
MTV.UI = new function(){
this.iframes = new Array();
this.initIframes = function(){
var parent_doc = parent.document;
for(var i=0; i < MTV.UI.iframes.length; i++){
// update height
var iframe = $j("#"+MTV.UI.iframes[i], parent_doc);
poll_height = $j(".iframe-mdl").height();
iframe.height(poll_height);
}
}
}
MTV.Content = new function(){}
MTV.Content.RSS = new function(){
this.open = function(obj){
var dataUrl = "/rss/xml/detail.jhtml?rssId=" + obj.id;
MTVN.UI.ModalWindow.open(dataUrl, obj.id);
}
}
MTV.Content.Rhapsody = new function(){
/**** ARTIST PAGE TOP SONGS MODULE ****/
this.getRhapTracksRSS = function (xmlstring){
var xmlDoc;
var parser;
try //Internet Explorer
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(xmlstring);
}
catch(e)
{
try //Firefox, Mozilla, Opera, etc.
{
parser=new DOMParser();
xmlDoc=parser.parseFromString(xmlstring,"text/xml");
}
catch(e){}
}
try
{
var trackValTop = "";
var trackValDesc = "";
var trackVal = "";
var songSlat = "";
for (var i=0; i < xmlDoc.getElementsByTagName("guid").length && i < 5; i++){
var nameList = xmlDoc.getElementsByTagName("title")[i + 2].childNodes[0].nodeValue;
var regexp = new RegExp(" - ");
var songTitle = nameList.split(regexp);
trackVal += '<li><div class="title1"><a href="#" onClick="RhapsodyPlayer.playTrack(\'tra.' + xmlDoc.getElementsByTagName("guid")[i].childNodes[0].nodeValue + '\'); return false;"><span class="icon icon-play-lg">Song:</span> Listen to Song \'' + songTitle[0] + '\'</a><!-- /strong></p --></div></li>';
}
if(trackVal){
songSlat += '<div class="mdl"><div class="h-wrap group"><h2 class="h-sub group"><span>Top Songs</span></h2></div><ol id="copyDesc" class="lst">' + trackVal +'<li class="last"><div>Hear 25 full tracks per month free on mtv.com. <a href="#" onClick="MTVN.UI.ModalWindow.open(&quot;/music/html/rhap25/help.jhtml&quot;,null); return false;">Learn more.</a></div></li></ol></div>' ;
}
document.getElementById("rhapsodySlat").innerHTML = songSlat;
}
catch(e){}
}
}
MTV.Voting = new function(){
this.init = function(){
if (MTV.Voting.Button.active){
$j("div.vote-btn").each(function(i){
var flashVars = "";
var targetId = this.id;
var embedId = targetId + "Button";
var vars = targetId.split(":"); //get pollId and value
var pollId = vars[0];
var value = vars[1];
flashVars += "cogix=" + MTV.Voting.Button.cogix + "&amp;";
flashVars += "pollid=" + pollId + "&amp;";
flashVars += "answer" + "=" + value + "&amp;";
flashVars += "validator=" + MTV.Voting.Button.validator + "&amp;";
flashVars += "authClass=" + MTV.Voting.Button.authClass;
var so = new SWFObject(MTV.Voting.Button.src, embedId, MTV.Voting.Button.width, MTV.Voting.Button.height, "9", "#000000");
so.addParam("flashVars", flashVars);
so.addParam("AllowScriptAccess", "sameDomain");
so.addParam("wmode", "transparent");
so.useExpressInstall('/sitewide/components/expressInstall/adobeExpressInstall.swf');
so.write(targetId);
});
}
}
}
MTV.Voting.Button = new function(){
this.active = false;
this.src = "/sitewide/components/buttons/vote/voteButton.swf";
this.width = "75";
this.height = "30";
this.cogix = "polling-onair";
this.validator= "timestamp|votes";
this.authClass = "com.mtvnet.auth.dis.HashDigestInputStrategy1";
}
MTV.Events = new function(){
this.addLinkEvents = function(){
$j("a.rssLink").click(function(){
MTV.Content.RSS.open(this);
return false;
});
$j('.user-send-message').each(function(){
if(Flux.Context._isCommunityMember){
var user_display_name = Flux.Context._currentUserSettings.UserDisplayName;
var community_landing = Flux.Context._communityLandingPage;
var ucid = this.href.match(/\w+$/);
this.href = community_landing + "profile/" + user_display_name + "/Messaging/Mail.aspx?recipient=" + ucid;
}
else{
this.href = Flux.Context._signInUrl + "?returnPath=" + window.location.href;
}
});
}
}
MTV.Community = new function(){
this.host = 'http://community.mtv.com';
}
MTV.Community.Widgets = function(){
this.errorLocation = '';
}

MTV.Flux = new function(){}
MTV.Flux.DAAPI = new function(){
this.initArray = new Array();
this.baseUrl = "http://daapi.flux.com/2.0/00001/JSON/D3FCFFFF0002D51D0002FFFFFCD3";
this.init = function(){
if(communityAccess){
jQuery.each(MTV.Flux.DAAPI.initArray, function (i){
if(jQuery.isFunction(MTV.Flux.DAAPI.initArray[i])) MTV.Flux.DAAPI.initArray[i]();
});

MTV.Flux.DAAPI.Module.init();
}
}
this.sendRequest = function(feed, callback, params){
var requestUrl = MTV.Flux.DAAPI.baseUrl + feed;
Flux.Core.executeGetRequest(requestUrl, function(response){
callback(Sys.Serialization.JavaScriptSerializer.deserialize(response), params);
});
}
}
MTV.Flux.DAAPI.Module = new function(){
var config; // the current config - a regular js object
var container; // the current container - a jquery object
var responses = new Array();// stores DAAPI responses for a module until all tabs are loaded
var responseCounter = 0;
this.configs = new Array(); // queue of module configs
this.init = function(){
if(MTV.Flux.DAAPI.Module.configs.length > 0){
config = MTV.Flux.DAAPI.Module.configs.pop();
MTV.Flux.DAAPI.Module.create();
}
}
this.create = function(){
if($j("#"+config.containerId).is("*")){
container = $j("#"+config.containerId);
if(config.moduleWrapper){
var mdl = $j("<div/>").attr("class","mdl");
container.append(mdl);
container = mdl;
if(config.moduleTitle != undefined){
var title = $j("<div/>").attr("class", "h-wrap group");
title.append($j("<h2/>").attr("class", "h-sub2 group").append($j("<span>" + config.moduleTitle + "</span>")));
container.append(title);
}
}
for(var i=0; i < config.tabs.length; i++){
MTV.Flux.DAAPI.sendRequest(config.tabs[i].url, MTV.Flux.DAAPI.Module.loadData,{position:i});
}
}
else{
MTV.Flux.DAAPI.Module.finish();
}
}
this.finish = function(){
responses = new Array();
responseCounter = 0;
MTV.Flux.DAAPI.Module.init(); // start over for more module configs
}
/* ------------------ */
this.loadData = function(response, paramsObj){
responses[paramsObj.position] = response;
responseCounter++;

if(responseCounter == config.tabs.length){
MTV.Flux.DAAPI.Module.build();
}
}
this.build = function(){
if(config.tabs.length > 1) container.append(MTV.Flux.DAAPI.Module.buildTabNav());
for(var i=0; i<responses.length; i++){
var isFirst = (i==0) ? true : false;
container.append(MTV.Flux.DAAPI.Module.buildTab(responses[i], isFirst));
}
MTV.Flux.DAAPI.Module.finish();
}
this.buildTabNav = function(){
var ul = $j("<ul/>").addClass("mdl-nav group");
for(var x=0; x < config.tabs.length; x++){
var li = $j("<li/>");
if(x==0) li.addClass("active");
var a = $j("<a/>").attr("href", "#").append(config.tabs[x].title);
a.click(function(){
MTVN.UI.MdlTab.open(this);
return false;
});
li.append(a);
ul.append(li);
}
return ul;
}
this.buildTab = function(response, isFirst){
var items = response.Items;
var itemCounter = 0;
if(items.length > 0){
var tab = $j("<div/>").addClass("tab-content");
if(!isFirst) tab.addClass("hide");
for(var r=1; r <= config.rows; r++){
if(itemCounter < items.length){
var olClass = "lst lst-photos";
if(config.columns==2) olClass += " lst-photos-two";
else if(config.columns==3) olClass += " lst-photos-three";
else if(config.columns==4) olClass += " lst-photos-four";
else if(config.columns==6) olClass += " lst-photos-six";
var list = $j("<ol/>").addClass(olClass);
for(var c=1; c <= config.columns; c++){
var isLast = (c==config.columns) ? true : false;
if(itemCounter < items.length){
list.append(MTV.Flux.DAAPI.Module.buildItem(items[itemCounter],isLast));
itemCounter++;
}
}
tab.append(list);
}
}
return tab;
}
}
this.buildItem = function(Entry, isLast){
var title = $j("<div/>").addClass("title2");
var titleLink = $j("<a/>").attr("href", Entry.DetailUrl);
titleLink.append($j("<img/>").attr("src", Entry.Thumbnails.Medium).addClass("thumb"));
var icon = "";
switch(Entry.Alias){
case "Video":
icon = $j("<span/>").addClass("icon icon-play").append("Video: ");
break;
default: break;
}
if(icon!=="") titleLink.append(icon);
titleLink.append(Entry.Title);
title.append(titleLink);
var li = $j("<li/>");
if(isLast) li.addClass("last");
li.append(title);
li.append($j("<p/>").addClass("deck").append(Entry.Creator.Title));
var date = MTV.Flux.DAAPI.Utils.formatDate(Entry.DateCreated);
li.append($j("<p/>").append($j("<span/>").addClass("posted").append("Posted " + date)));
return li;
}
}
MTV.Flux.DAAPI.Utils = new function(){
this.formatDate = function(date){
var m = date.getMonth() + 1;
var d = date.getDate();
var y = date.getFullYear().toString().substr(2,2);
var formattedDate = m + "/" + d + "/" + y;
return formattedDate;
}
}
MTV.Utils = new function(){
this.findMaxZ = function(){
var maxZ = Math.max.apply(null,$j.map($j('body > *'), function(e,n){
if($j(e).css('position')=='absolute'){
return parseInt($j(e).css('z-index'))||1 ;
}else{
return 500;
}
}));
return(maxZ);
}
}
MTV.Utils.Cookies = new function(){
this.create = function(name,value,days){
if (days){
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
this.read = function(name){
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++){
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
this.erase = function(name){
MTV.Utils.Cookies.create(name,"",-1);
}
}
function openAndFocus(url,name,features){
var o = window.open(url.replace("#", "%23"), name, features);
o.focus();
}

function runMiniAdBanner()
{
var opaWidth = $j("#ad-728x90").outerWidth();
var getData = 

{"module":{"items":{"item":{"images":{"img":{"width":"239","height":"90","src":"http://www.mtv.com/shared/promoimages/bands/123/2_chainz/push/mini_banner//239x90.jpg"}},"title":"2 Chainz","link":{"args":"http://buzzworthy.mtv.com/category/push/"}}},"name":"minipromos"}}
;
if(getData.module!=undefined && getData.module.items!=null){
var total = getData.module.items.item.length;
var index = 0;
var imgSrc,imgUrl = "";
if(total==null)
{
if(getData.module.items.item.images!=null) 
if(getData.module.items.item.images.img != undefined) 
imgSrc = getData.module.items.item.images.img.src;
if(getData.module.items.item.link!=null)
imgUrl = getData.module.items.item.link.args;
}
else
{
index = Math.floor(Math.random()*total);
if(getData.module.items.item[index].images!=null)
imgSrc = getData.module.items.item[index].images.img.src;
if(getData.module.items.item[index].link!=null)
imgUrl = getData.module.items.item[index].link.args;
}
//alert(imgSrc+" "+opaWidth+" "+$j("#header.franchise").length);
if((parseInt(opaWidth) <= 728 && $j("#header.franchise").length == 0) && (imgSrc!=null)) 
{
if(parseInt(opaWidth) > 0){
$j(window).load(function(){
$j("<div/>").attr("id", "minipromo").prependTo("#adContainer");
$j("<a/>").attr("href", imgUrl).appendTo("#minipromo");
$j("<img/>").attr({"src":imgSrc, "border": 0}).appendTo("#minipromo a");
$j("#minipromo").show();
}); 
$j("#ad-728x90").css({"padding": "3px 3px 3px 0px","float": "right"});
}
}
}
}

function popFlip(fbKey, obj){

var pWin = false;
if (fbKey.indexOf("fid=")>=0) {
window.location.href = '/photos/?'+fbKey;

}
else {
window.location.href = '/news/photo/';

}
// popCheck(pWin);

}

MTV.Utils.DisplayAdRefreshRate = new function() {

this.bannerRate;
this.billboardRate;

this.setAdRefreshRate = function() {
var getData = {"adRefresh":{"items":{"item":{"ad":{"banner":"300","billboard":"300"}}}}};

this.bannerRate = parseInt(getData.adRefresh.items.item.ad.banner) * 1000;
this.billboardRate = parseInt(getData.adRefresh.items.item.ad.billboard) * 1000;

}

}

$j(document).ready(function(){

if ($j("meta[name='mtvn_ct']").attr("content") != "blog") {

;(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

try{
ga('create', 'UA-41910355-1', 'mtv.com');
ga('send', 'pageview');
}catch(e){}

}
});

MTV.Utils.replaceTitleOpt = function(articleId, updatedHeadline, container)
{

var _imgHolder = $j("#wrap ol li a[href*='" + articleId + "'] img");
var _aHolder = $j("#wrap ol li div a[href*='" + articleId + "']");
var _imgHolderCont, _aHolderCont;

if (container != null) {

_imgHolderCont = $j("#wrap #" + container + " ol li a[href*='" + articleId + "'] img");
_aHolderCont = $j("#wrap #" + container + " ol li div a[href*='" + articleId + "']");

if(_imgHolderCont.is("*")) {

_imgHolderCont.parent().text(updatedHeadline).prepend(_imgHolderCont[0]);

}

else if (_aHolderCont.is("*")) {

_aHolderCont.text(updatedHeadline);

}

else if (_imgHolder.is("*")) {

_imgHolder.parent().text(updatedHeadline).prepend(_imgHolder[0]);

}

else {

_aHolder.text(updatedHeadline);

}

}

else {
if (_imgHolder.is("*")) 
_imgHolder.parent().text(updatedHeadline).prepend(_imgHolder[0]);

else 
_aHolder.text(updatedHeadline);

}

}

$j(function()
{
MTV.Navigation=new MtvNavigation();
});
function MtvNavigation()
{
var self=this;
this.init=function()
{
self.meta ={
}
self.init_triggers();
}
this.init_triggers=function()
{
self.init_coda_link_tracking();
self.init_nav_interaction();
}
this.init_coda_link_tracking=function()
{
// override every link in nav menu
$j('#navlist a').click(function(){
// report click to CODA
// http://confluence.mtvi.com/display/BUSTECH/CODA+Link+Events

if (typeof(com_mtvi_mtv2flag) == "undefined" || !com_mtvi_mtv2flag){ 
mtvn.btg.Controller.sendLinkEvent({
linkName : 'GLOBAL_NAV - ' + $j(this).text(),
linkType : 'o'
});
}
// continue event
return true;
});
}
this.init_nav_interaction=function()
{
$j('#navlist .gridContainer').css({'z-index': MTV.Utils.findMaxZ() + 10});
/* tooltip on logo*/
$j('div#mtvLogo a, .navLogoToolTip').mouseover(function(){
$j('.navLogoToolTip').show();
}).mouseout(function(){
$j('.navLogoToolTip').hide();
});
/* mtvsites nav */
$j('.globalNav ul#mtvSitesNav li.topLevel').hover( function(){
$j(this).addClass('hover').children('ul').addClass('hover');
}, function(){
$j(this).removeClass('hover').children('ul').removeClass('hover');
});
/* global Nav */
$j('#navlist li.toplvl').hover( function(){
$j(this).addClass('hover').children('ul.gridContainer').addClass('hover');
}, function(){
$j(this).removeClass('hover').children('ul.gridContainer').removeClass('hover');
});
/* global Nav grid columns height matching */
$j('ul#navlist li.toplvl').each( function(a){
var maxHeight = 0;
var $columns = $j( $j('ul#navlist li.toplvl')[a] ).find('ul.gridContainer div.grid ul.gridMain, ul.gridContainer div.grid ul.centerCol');
$columns.each( function(e){
if( $j($columns[e]).height() > maxHeight ) maxHeight = $j($columns[e]).height();
});
$columns.height( maxHeight );
});
}
self.init();
}
var Page ={};
Page.onload = function(func){
if(window.attachEvent){
window.attachEvent('onload',eval(func));
}
else if(document.addEventListener){
// safari
if (/WebKit/i.test(navigator.userAgent)){
var safari_timer = setInterval(function(){
if (/loaded|complete/.test(document.readyState)){
clearInterval(safari_timer);
//alert(func);
eval(func+'()');
}
}, 10);
}
else document.addEventListener('DOMContentLoaded',eval(func),null);
}
}
// iPad tweeks to the global nav - should not affect any other browsers...
var isiPad = navigator.userAgent.match(/iPad/i) != null;
var iPadDebug = new function(){
this.touchActivity = [];
this.onclickfunc = 'return iPadDebug.menuclick(this);';
this.init = function(){
document.getElementsByTagName('body')[0].addEventListener('touchend',
function(e){
iPadDebug.touchActivity.push('bodytouch');
},false);
var menuLinks = document.getElementsByClassName('n-link');
for(i = 0; i < menuLinks.length; i++){
menuLinks[i].setAttribute('linkloc',menuLinks[i].getAttribute('href'));
menuLinks[i].setAttribute('clickevent',menuLinks[i].getAttribute('onclick'));
menuLinks[i].setAttribute('href', '#');
menuLinks[i].setAttribute('onclick', iPadDebug.onclickfunc);
}
};
this.menuclick = function(obj){
iPadDebug.touchActivity.push(obj.id);
if(iPadDebug.touchActivity[iPadDebug.touchActivity.length-1]==iPadDebug.touchActivity[iPadDebug.touchActivity.length-3]){
//var reportObj ={ href:obj.getAttribute('linkloc'), name:obj.getAttribute('name')};
//GNav.report(reportObj);
//Page.linkcall(reportObj,'globalnav');
window.location.href = obj.getAttribute('linkloc');
}
return false;
};
};
if(isiPad){
Page.onload('iPadDebug.init');
}

// Moved to /global/music/scripts/includes/nav_responsive.js for Grails
if(typeof MTVN == "undefined") {
MTVN = new function(){}
}

if(typeof MTV == "undefined") {
MTV = new function(){}
}

MTVN.Nav = new function($){

var container = null;
var section = "OTHER";

var sections = {

"music":[
"/music/*",
"/lyrics/",
"/artists/",
"http://www.mtvmusicmeter.com"
],
"shows":[
"/ontv/*",
"/shows/*",
"/onair/*",
"/fivedollarcover/*",
"http://fivedollarcover.mtvmusic.com/*",
"http://remotecontrol.mtv.com/*",
"http://shop.mtv.com/*",
"http://soundtrack.mtv.com/*",
"/videos/home.jhtml"
],
"news":[
"/news/*",
"/most-popular/news-articles/*",
"/content/news/*",
"/specials/comic_con/*",
"/specials/lollapalooza/*",
"/bands/archive/*",
"http://buzzworthy.mtv.com/",
"http://rapfix.mtv.com/",
"http://style.mtv.com/",
"http://guycodeblog.mtv.com/",
"http://act.mtv.com/",
"/geek/*",
"http://multiplayerblog.mtv.com/*",
"http://moviesblog.mtv.com/*",
"http://hollywoodcrush.mtv.com/*",
"http://www.mtvhive.com/*",
"http://newsroom.mtv.com/*",
"http://splashpage.mtv.com/*"
],
"movies":[
"http://www.mtv.com/movies/*",
"http://www.mtv.com/videos/movie-trailers/*",
"http://www.mtv.com/shows/after_hours_josh_horowitz/*"
]
};

var isMTV = window.location.hostname.match("(www|posting).mtv(-d|-jd|-fd)?(-q|-jq)?(.mtvi)?.com");

var docHeight = 0;

this.init = function(){

this.redraw();
this.addListeners();
this.setCurrentItem();

$("#off-screen-nav, #nav-dim").css("height", "auto");

//make sure staging is set
if(window.location.hostname.match(".mtvi.com") && typeof MTVN.conf != 'undefined') MTVN.conf.sm4.staging = true;

this.sm4();

//if mtv.jhtml is not included. init search
if(typeof MTVN.init == "undefined"){	

if(typeof MTVN.Typeahead != "undefined") MTVN.Typeahead.init();
if(typeof MTVN.Search != "undefined") MTVN.Search.init();
}
}

this.sm4 = function(){

var followContainer = $('#nav-side .accordian li.follow-mtv ul li');
var userBarContainer = $('#nav-side .accordian > li.flux-userbar');
var followConfig = {
"name": "Follow#4210",
'mode': 'SiteFollow',
"layout": "vertical",
"opts": {
elements: [{ id: 'facebook', layout:'button_count', showCount: true, width: 200} , { id: 'twitter', size: 'medium' }, { id: 'tumblr'}],
facebookProfile: 'mtv',
tumblrProfile: 'mtv',
twitterProfile: 'mtv'
}
};
var userBarConfig = {
"name": "UserBar#4200",
"opts": {
displayMode: 'inline after',
expandOn: 'onClick',
hideThumbnail: true,
maxFeedActivites: 0,
feedUpdateInterval: 100000	
},
onLoad: MTVN.Nav.initUserBar
};

followContainer.append('<div data-widget="followResponsive"></div>');
userBarContainer.append('<div data-widget="responsiveUserBar"></div>');

if($.fn.sm4 && typeof MTVN.conf != 'undefined'){

MTVN.conf.sm4["widgets"].followResponsive = followConfig;
MTVN.conf.sm4["widgets"].responsiveUserBar = userBarConfig;

followContainer.children('div').sm4();
userBarContainer.children('div').sm4();	

}else if(window.Flux4){

Flux4.createWidget(followConfig.name, {
layout: followConfig.layout,
mode: followConfig.mode,
container: followContainer,
elements: followConfig.opts.elements,
facebookProfile: followConfig.opts.facebookProfile,
tumblrProfile: followConfig.opts.tumblrProfile,
twitterProfile: followConfig.opts.twitterProfile
});

Flux4.createWidget(userBarConfig.name, {
container: userBarContainer.children('div'),
displayMode: userBarConfig.opts.displayMode,
expandOn: userBarConfig.opts.expandOn,
hideThumbnail: userBarConfig.opts.hideThumbnail,
maxFeedActivities: userBarConfig.opts.maxFeedActivities,
feedUpdateInterval: userBarConfig.opts.feedUpdateInterval
}, function (widget) {
MTVN.Nav.initUserBar(widget);
});
}

}

this.initUserBar = function(widget){

$("#nav-side li.flux-userbar").click(function(e){

var userbar = $(this);

//event bubbles, so Flux event should have already fired
if(userbar.find('.authContainer').hasClass('dropDownOpened') && !userbar.hasClass("backlit")){

userbar.addClass("backlit");

$("#nav-side .accordian > li > a").removeClass("backlit");
$("#nav-side .accordian > li > ul").slideUp();
}else{
userbar.removeClass("backlit");
}

});
}

this.toggle = function(){

MTVN.Nav.resize(true); //in case additional ajax elements loaded

//set to window height on close, to prevent it from expanding the page
if($("#off-screen-nav").hasClass("open")){
var height = window.innerHeight - $('#nav-side').offset().top;
$("#off-screen-nav, #nav-dim").height(height);
}

$("#nav-dim").toggle();
$("#nav-close").toggleClass('x');
$("#nav-close, #off-screen-nav").toggleClass("open");
}

this.redraw = function(){

var leftOffset = $('#nav-close').offset().left - 10;
$('#off-screen-nav').css('padding-left', leftOffset);

MTVN.Nav.resize();
}

this.resize = function(forced){

var navHeight = 0;
$("#off-screen-nav, #nav-dim").addClass("hide");
var curDocHeight = $(document).height();
$("#off-screen-nav, #nav-dim").removeClass("hide");

if(forced || curDocHeight != docHeight){

docHeight = curDocHeight;
navHeight = curDocHeight - $('#nav-side').offset().top;

$("#off-screen-nav, #nav-dim").height(navHeight);
}

}

this.addListeners = function(){

var self = this;

$("#nav-side .accordian > li > a:not(:last-child)").click(function(e){
e.preventDefault();
self.toggleSelected($(this));
});
$("#nav-side .accordian.primary > li > a:last-child").click(function(e){
var aText = $(this).text();
var linkName = "GLOBAL_NAV:" + section + " - " + $.trim(aText);
btg.Controller.sendLinkEvent({linkType: 'o', linkName:linkName});
});
$('#nav-side .accordian.primary li ul a').click(function(){
var pText = $(this).parent().parent().parent().children('a').text();
var aText = $(this).text();
var linkName = "GLOBAL_NAV:" + section + " - " + $.trim(pText) + ": " + $.trim(aText);
btg.Controller.sendLinkEvent({linkType: 'o', linkName:linkName});
});
$("#nav-close, #nav-dim").click(self.toggle);

$(window).on("resize orientationchange", function(){
self.debounce(self.redraw, 250, false);
});

$('#nav-side .btn-tve-logout').click(function(){
try{
MTVN.TVE.signOut();
}catch(e){};
});

}

this.toggleSelected = function(selected){

var next = selected.next();

//slide up all the link lists
$("#nav-side .accordian > li > a, #nav-side li.flux-userbar").not(selected).removeClass("backlit");
$("#nav-side .accordian > li > ul").slideUp();
$(".flux4Widget .userBar .dropdownWrapper.opened").removeClass('opened').addClass('closed');

if(next.length){
selected.toggleClass("backlit");
//slide down the link list below the h3 clicked - only if its closed
if(!next.is(":visible")) {
next.slideDown();
}
}
}

this.setCurrentItem = function(){

var self = this;
var selected = null;

if(window.location.pathname == "/search/" && isMTV){
section = "SEARCH";
}else if(window.location.pathname=="/" && isMTV){
section = "HOMEPAGE";
}else{
$('#nav-side .accordian.primary li ul a').each(function(){
var item = $(this);
var loc = item.attr('href');
var aSection = item.parent().parent().parent().children('a');

if(self.matchesCurrentLocation(loc)){
self.toggleSelected(aSection); 
selected = aSection;
}
});
if(!selected){
$('#nav-side .accordian.primary > li > a').each(function(){
var item = $(this);
var loc = item.attr('href');

if(self.matchesCurrentLocation(loc, false) || self.matchesSection(item)){
self.toggleSelected(item); 
selected = item;
}
});
}
if(selected){
var sText = selected.text();
section = $.trim(sText).toUpperCase();
}
}
}

this.matchesSection = function(item){

var i = 0;
var t = item.text();
var sec = $.trim(t).toLowerCase();
var urls = sections[sec];

if(urls != null){
for(i==0;i<urls.length;i++){
if(this.matchesCurrentLocation(urls[i], true)){
return true;
}
}
}

return false;

}

this.matchesCurrentLocation = function(loc, regx){

var relHref = window.location.pathname + window.location.hash;

if((loc.indexOf("/") == 0 && window.location.pathname == loc) || window.location.href == loc){
return true;
}

if(regx && window.location.href.match(loc)){
return true;
}else if(!regx && (loc.match(/[?#]/) && (window.location.href.indexOf(loc) == 0 || relHref.indexOf(loc) == 0))){
return true;
}

return false;
}

this.debounce = function(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
clearTimeout(timeout);
timeout = setTimeout(function() {
timeout = null;
if (!immediate) func.apply(context, args);
}, wait);
if (immediate && !timeout) func.apply(context, args);
};
};

}(jQuery);

jQuery(document).ready(function(){
if(jQuery('#nav-side').length){
MTVN.Nav.init();
}
});

// mtv-tve-auth

var TVEAuthOptions={},TVEAuth={ver:"2.0",baseUrl:"http://tve.mtvnservices-q.mtvi.com/tveauth/html5/",aeUrl:"https://entitlement.auth-staging.adobe.com/entitlement/AccessEnabler.js",rID:"requestor_ID",chID:"channel_ID",envUrl:null,wrapObj:null,hiddenObj:null,providersList:null,AE:function(){return null},MVPD:null,MVPD_ID:localStorage.getItem("TVEAuth_MVPD_ID"),Helper:null,initialize:function(a,c,b){var d=window.location.hostname.search(".mtvi.com");-1!=d?(TVEAuth.baseUrl="http://mtve.scenic-q.mtvi.com/tve/tveauth/html5/",TVEAuth.aeUrl=
"https://entitlement.auth-staging.adobe.com/entitlement/AccessEnabler.js"):(TVEAuth.baseUrl="http://tve.mtvnservices.com/tveauth/html5/",TVEAuth.aeUrl="https://entitlement.auth.adobe.com/entitlement/AccessEnabler.js");var e=this.baseUrl+this.ver+"/";jQuery("body");var f=document.getElementsByTagName("head")[0],g=document.createElement("script"),h=document.createElement("script");TVEAuth.rID=a||null;TVEAuth.chID=c||null;if(!TVEAuth.rID||!TVEAuth.chID)return TVEAuth.Error.showMess("Wrong RquestorID/ChannedlID"),
TVEAuth.Callback.errorHappened("PARAMETER_IS_UNDEFINED"),!1;TVEAuth.storage.set("TVEAuth_RequestorID",TVEAuth.rID);TVEAuth.storage.set("TVEAuth_ChannelID",TVEAuth.chID);g.id="accessEnablerScriptID";g.type="text/javascript";g.src=this.aeUrl;h.id="tveapp_options";h.type="text/javascript";h.src=this.baseUrl+"2.0/"+TVEAuth.rID+"/js/options.js";"undefined"==typeof b||b||(a=document.createElement("link"),a.rel="stylesheet",a.href=e+TVEAuth.rID+"/css/tveauth.overlays.css",f.appendChild(a));f.appendChild(g);
f.appendChild(h);jQuery(document).ready(function(){TVEAuth.wrapObj=jQuery('<div id="tveapp_wrap" class="tveapp_wrap" style="display:none;"><div id="AccessEnablerDiv"></div><input id="selectedProvider" type="hidden"/></div><div class="tveapp_back" style="display:none;"></div>').appendTo("body");TVEAuth.hiddenObj=jQuery("#tveAuthObj");TVEAuth.Overlay.init();TVEAuth.Providers.init();TVEAuth.Error.init(d);TVEAuth.Auth.init();/Android/i.test(navigator.userAgent)&&jQuery(window).resize(function(){var a=jQuery("#tveapp_wrap .tveapp_container").css("opacity",
0.9);setTimeout(function(){a.css("opacity",1)},5)})})},cookie:{set:function(a,c,b){var d=new Date,e=864E5*b+d.getTime();d.setTime(e);document.cookie=a+"="+escape(c)+(null==b?"":";expires="+d.toGMTString())},get:function(a){var c=document.cookie,b=c.length;if(b){var d=c.indexOf(a+"=");if(-1!=d){var e=c.indexOf(";",d);-1==e&&(e=b);d+=a.length+1;return unescape(c.substring(d,e))}}return null},erase:function(a){this.set(a,"",-1)}},storage:{set:function(a,c){localStorage.setItem(a,c)},get:function(a){return localStorage.getItem(a)},
erase:function(a){localStorage.removeItem(a)}}};TVEAuth.Auth={init:function(){TVEAuth.AE=function(){return ae}},set:function(){"undefined"!=typeof ae?ae.setRequestor(TVEAuth.rID,null):TVEAuth.Error.showMess("Auth.set")},checkAN:function(){null!=TVEAuth.AE()&&TVEAuth.AE().checkAuthentication()},getAN:function(){TVEAuth.storage.set("TVEAuth_onLoad","checkAN");null!=TVEAuth.AE()?TVEAuth.AE().getAuthentication():TVEAuth.Error.showMess("getAuthN")},setANStatus:function(a,c){1==a?(localStorage.setItem("TVEAuth_mvpdParam","authNEnd"),TVEAuth.Callback.authenticationCompleted(!0,
TVEAuth.MVPD_ID)):(TVEAuth.MVPD=TVEAuth.MVPD_ID=null,TVEAuth.storage.erase("TVEAuth_MVPD_ID"),TVEAuth.Callback.authenticationCompleted(!1,null))},checkAZ:function(){null!=TVEAuth.AE()?TVEAuth.AE().checkAuthorization(TVEAuth.rID):TVEAuth.Error.showMess("checkAuthZ")},setToken:function(a,c){TVEAuth.token=c;var b=TVEAuth.storage.get("TVEAuth_checkAZ"),d=TVEAuth.storage.get("TVEAuth_getAZ"),e=TVEAuth.storage.get("TVEAuth_MVPD_Selected");TVEAuth.storage.get("TVEAuth_checkANnAZ");var f=TVEAuth.MVPD_ID;
if(b||d)TVEAuth.Callback.authorizationCompleted(!0,f,c),"true"==e&&(TVEAuthOptions.successScreen&&(b=TVEAuth.MVPD,TVEAuth.Overlay.show("successMessage"),jQuery("<img>",{src:b.logoutProviderLogoURL,alt:b.id,title:b.displayName}).appendTo("#tveapp_mvpdLogo"),jQuery("#tveapp_mvpdName").text(b.displayName)),TVEAuth.Callback.loginCompleted(!0,f),TVEAuth.storage.erase("TVEAuth_MVPD_Selected")),TVEAuth.storage.erase("TVEAuth_checkAZ"),TVEAuth.storage.erase("TVEAuth_getAZ"),TVEAuth.storage.erase("TVEAuth_onLoad")},
tokenRequestFailed:function(a,c,b){a=TVEAuth.storage.get("TVEAuth_checkAZ");b=TVEAuth.storage.get("TVEAuth_getAZ");TVEAuth.token="";if("true"==b)return TVEAuth.storage.erase("TVEAuth_getAZ"),TVEAuth.storage.erase("TVEAuth_checkAZ"),TVEAuth.storage.set("TVEAuth_onLoad",c),TVEAuth.AE().logout(),!1;a&&(TVEAuth.storage.erase("TVEAuth_getAZ"),TVEAuth.storage.erase("TVEAuth_checkAZ"),TVEAuth.storage.erase("TVEAuth_onLoad"),TVEAuth.Callback.errorHappened(c))},getAZ:function(){TVEAuth.storage.set("TVEAuth_checkAZ",
"true");TVEAuth.storage.set("TVEAuth_getAZ","true");TVEAuth.storage.set("TVEAuth_onLoad","checkAZ");TVEAuth.AE().getAuthorization(TVEAuth.chID)},dataTracker:function(a,c){var b=TVEAuth.storage.get("TVEAuth_checkANnAZ"),d=c[0],e=c[1]||null;TVEAuth.MVPD_ID=e;switch(a){case "mvpdSelection":e=c[0]||null;TVEAuth.Callback.providerSelected(e);TVEAuth.storage.set("TVEAuth_MVPD_ID",e);TVEAuth.storage.set("TVEAuth_MVPD_Selected","true");break;case "authorizationDetection":b&&(d?TVEAuth.Callback.authNAndAuthZCompleted(!0,
d,e):e?TVEAuth.Callback.authNAndAuthZCompleted(!0,d,e):TVEAuth.Callback.authNAndAuthZCompleted(!1,d,null),TVEAuth.storage.erase("TVEAuth_checkANnAZ"))}TVEAuth.Helper=null},signOut:function(){TVEAuth.storage.set("TVEAuth_onLoad","checkLogout");null!=TVEAuth.AE()?TVEAuth.AE().logout():TVEAuth.Error.showMess("signOut")},checkSignOut:function(){"true"==TVEAuth.storage.get("TVEAuth_Logout_Completed")&&TVEAuth.Callback.signOutCompleted()},onLoad:function(){var a=TVEAuth.storage.get("TVEAuth_onLoad")||"none";
switch(a){case "User not Authorized Error":TVEAuth.Callback.errorHappened(a);TVEAuth.storage.erase("TVEAuth_onLoad");break;case "checkAN":TVEAuth.storage.erase("TVEAuth_onLoad");TVEAuth.API.checkAuthentication();break;case "checkAZ":TVEAuth.API.checkAuthorization();break;case "checkLogout":TVEAuth.Callback.signOutCompleted();TVEAuth.storage.erase("TVEAuth_onLoad");break;default:TVEAuth.storage.erase("TVEAuth_onLoad")}}};TVEAuth.Providers={list:null,whiteList:[],altWhiteList:localStorage.getItem("TVEAuth_PROVIDERS_LIST")||null,current:{},_set:function(a){TVEAuth.storage.set("TVEAuth_CURRENT_PROVIDER_ID",a);TVEAuth.AE().setSelectedProvider(a)},saveList:function(a){for(var c=0,b=a.length,d="";c<b;c++)d+=';{"displayName":"'+a[c].displayName+'", "ID":"'+a[c].ID+'", "altName":"'+a[c].altName+'", "isPrimary":"'+a[c].isPrimary+'", "logoURL":"'+a[c].logoURL+'", "logoutProviderLogoURL":"'+a[c].logoutProviderLogoURL+'", "pickerProviderLogoURL":"'+
a[c].pickerProviderLogoURL+'"}';d=d.substring(1);TVEAuth.storage.set("TVEAuth_PROVIDERS_LIST",d)},loadList:function(){var a=TVEAuth.storage.get("TVEAuth_PROVIDERS_LIST");if(!a)return TVEAuth.Error.showMess("loadList");for(var a=a.split(";"),c=0,b=a.length;c<b;c++)a[c]=jQuery.parseJSON(a[c]);return a},getMvpd:function(a){var c={},b=0,d=[];TVEAuth.MVPD_ID=c.id=a;if(null==a)c=null;else for(d=TVEAuth.Providers.loadList(),a=d.length;b<a;b++)if(d[b].ID==c.id){c.logoURL=d[b].logoURL;c.logoutProviderLogoURL=
d[b].logoutProviderLogoURL;c.pickerProviderLogoURL=d[b].pickerProviderLogoURL;c.displayName=d[b].displayName;break}return c},getList:function(a,c){var b=0,d;d=a.length;var e,f,g=0;if(0!=d){switch(c){case "defaultView":case "onlyLogo":e=[];f=[];for(var h=g=b=0,k=0;b<d;b++)e[b]="<li class='tveapp_pL-item tveapp_index_"+b+"'><a id='"+a[b].ID+"' class='tveapp_pL-link' onclick='TVEAuth.Providers._set(\""+a[b].ID+"\");' tveapp_alt='"+a[b].displayName+", "+a[b].altName+"'><span>"+a[b].displayName+"</span><i/></a></li>",
"true"===a[b].isPrimary&&12>h&&(f[h]="<li class='tveapp_ePL tveapp_i_"+b+"'><a id='"+a[b].ID+"' class='tveapp_ePL-link' onclick='TVEAuth.Providers._set(\""+a[b].ID+"\");'><img src='"+a[b].pickerProviderLogoURL+"' alt='"+a[b].displayName+"' /><i/></a></li>",h+=1);g=f.length;k=12>d?d:12;if(g<k)for(;g<k;g++)f[h]="<li class='tveapp_ePL tveapp_i_"+g+"'><a id='"+a[g].ID+"' class='tveapp_ePL-link' onclick='TVEAuth.Providers._set(\""+a[g].ID+"\");'><img src='"+a[g].pickerProviderLogoURL+"' alt='"+a[g].displayName+
"' /><i/></a></li>",h+=1;f="<ul class='tveapp_extraMvpdList'>"+f.join("")+"</ul>";e="<ul class='tveapp_providersList'>"+e.join("")+"<li class='tveapp_pL-item-extra'><a id='tveapp_providerNotListed' class='tveapp_pL-link' class='tveapp_pL-link'>Don&#8217;t see Your Provider?</a></li></ul>";break;case "onlyLogoOld":for(f=e="";b<d;b++)e+="<li class='tveapp_pL-item tveapp_index_"+b+"'><a id='"+a[b].ID+"' class='tveapp_pL-link' onclick='TVEAuth.Providers._set(\""+a[b].ID+"\");' tveapp_alt='"+a[b].displayName+
", "+a[b].altName+"'><span>"+a[b].displayName+"</span><i/></a></li>","true"===a[b].isPrimary&&12>g&&(f+="<li class='tveapp_ePL tveapp_i_"+b+"'><a id='"+a[b].ID+"' class='tveapp_ePL-link' onclick='TVEAuth.Providers._set(\""+a[b].ID+"\");'><img src='"+a[b].pickerProviderLogoURL+"' alt='"+a[b].displayName+"' /><i/></a></li>",g+=1);f="<ul class='tveapp_extraMvpdList'>"+f+"</ul>";e="<ul class='tveapp_providersList'>"+e+"<li class='tveapp_pL-item-extra'><a id='tveapp_providerNotListed' class='tveapp_pL-link' class='tveapp_pL-link'>Don&#8217;t see Your Provider?</a></li></ul>";
break;case "xboxStyle":e="";for(g=Math.floor(d/2);b<g;b++)e+="<li class='tveapp_pL-item tveapp_index_"+b+"'><a id='"+a[b].ID+"' class='tveapp_pL-link' onclick='TVEAuth.Providers._set(\""+a[b].ID+"\");' tveapp_alt='"+a[b].displayName+"'><span>"+a[b].displayName+"</span><img src='"+a[b].pickerProviderLogoURL+"' alt='"+a[b].displayName+"' /><i/></a></li>";for(0==d%2&&(e+="<li class='tveapp_pL-item-empty'><a class='tveapp_pL-link'><span>&nbsp;</span><i></i></a></li>");b<d;b++)e+="<li class='tveapp_pL-item tveapp_index_"+
b+"'><a id='"+a[b].ID+"' class='tveapp_pL-link' onclick='TVEAuth.Providers._set(\""+a[b].ID+"\");' tveapp_alt='"+a[b].displayName+"'><span>"+a[b].displayName+"</span><img src='"+a[b].pickerProviderLogoURL+"' alt='"+a[b].displayName+"' /><i/></a></li>";f="";d=153*Math.ceil(d/2+0.5);e="<ul class='tveapp_providersList' style='width:"+d+"px;'>"+e+"<li class='tveapp_pL-item-extra'><a id='tveapp_providerNotListed' class='tveapp_pL-link' class='tveapp_pL-link'><span>Don&#8217;t see Your Provider?</span><i></i></a></li></ul>";
break;case "fullList":e=a;f="";break;default:TVEAuth.Error.showMess("TVEAuth.Providers.getList")}return[e,f]}},loadWhiteList:function(){var a=TVEAuth.baseUrl+TVEAuth.rID.toLowerCase()+"/mergedProvidersList?callback=TVEAuth.Providers.updProvidersList",c=document.createElement("script");c.src=a;document.getElementsByTagName("head")[0].appendChild(c);setTimeout(function(){TVEAuth.isWLLoaded||(TVEAuth.Providers.reloadWL(),TVEAuth.tryLoadWL+=1)},5E3)},reloadWL:function(){if(1>TVEAuth.tryLoadWL)TVEAuth.Providers.loadWhiteList();
else if(TVEAuth.Providers.altWhiteList){var a=TVEAuth.Providers.loadList(TVEAuth.Providers.altWhiteList);TVEAuth.Providers.updProvidersList(a)}else TVEAuth.Callback.errorHappened("Can Not Load The White List")},updProvidersList:function(a){TVEAuth.isWLLoaded||(this.whiteList=a.mvpdList,TVEAuth.Callback.componentLoaded(),TVEAuth.Auth.onLoad(),TVEAuth.isWLLoaded=!0)},verifyWhiteList:function(a){var c=this.whiteList,b=[];if("undefined"!=typeof c&&0!=c.length){for(var d=c.length,e=a.length,f=0,g=0,h=
[];f<e;f++){b[f]=a[f].ID.toLowerCase();for(var k=0;k<d;k++)if(c[k].ID.toLowerCase()==b[f]){c[k].logoURL=c[k].logoURL||a[f].logoURL;h[g]={ID:a[f].ID,displayName:c[k].displayName||a[f].displayName,logoURL:c[k].logoURL,logoutProviderLogoURL:c[k].logoutProviderLogoURL||c[k].logoURL,pickerProviderLogoURL:c[k].pickerProviderLogoURL||c[k].logoURL,isPrimary:c[k].isPrimary,altName:c[k].altName||""};g++;break}}this.list=h;this.saveList(h)}else TVEAuth.Error.showMess("verifyWhiteList"),this.saveList(h),TVEAuth.storage.erase("TVEAuth_PROVIDERS_LIST");
this.list=h;this.saveList(h);return this.list},checkCurrent:function(){},init:function(){this.list=TVEAuth.storage.get("TVEAuth_PROVIDERS_LIST")||null}};TVEAuth.Overlay={isClosedByUser:!0,qsText:"Type in provider name",list:{successMessage:null,selectProvider:null,iframeWrap:null,providerNotListed:null,error:null},get:function(a){var c,b;switch(a){case "successMessage":c=jQuery("<div id='tveapp_success' class='tveapp_container tveapp_mSize'><div class='tveapp_header'><a class='tveapp_button tveapp_close'>Close</a></div><div class='tveapp_content'><div class='tveapp_successMessage'><h5>Success!</h5><p>You are now logged in with</p><p id='tveapp_mvpdLogo'></p><p>You now have access <br >to watch your favorite shows.</p><p><a class='tveapp_button tveapp_close tveapp_watchNow'>Watch Now!</a></p></div></div></div>");
c=TVEAuthOptions.successOverlay||c;break;case "dontSeeUrMvpd":c=jQuery("<div id='tveapp_dontSeeUrMvpd' class='tveapp_container tveapp_mSize'><div class='tveapp_header'><a class='ios-6-arrow left light' data-title='Light arrow'></a><a class='tveapp_button tveapp_goBack'>Back</a><a class='tveapp_button tveapp_close'>Cancel</a></div><div class='tveapp_content'><div class='tveapp_dontSeeUrMvpdMessage'><h5>Provider Not Listed</h5><p>If your tv provider is not listed, <br>don&#8217;t panic.</p><p>We're working hard to get all tv providers to participate</p></div></div></div>");
c=TVEAuthOptions.unlistedMvpdOverlay||c;break;case "selectProvider":c=jQuery("<div id='tveapp_selectProvider' class='tveapp_container tveapp_fsSize'><div class='tveapp_header'><a class='tveapp_button tveapp_learnMore' onclick='TVEAuth.Callback.learnMoreButtonClicked();'>How this works</a><a class='tveapp_button tveapp_close'>Cancel</a></div><div class='tveapp_content'><div class='tveapp_infoImg'><img src='images/steps.jpg' /></div><div class='tveapp_brandLogo'></div><h4>Sign In</h4><div id='tveapp_searchBox' class='tveapp_searchBox'><span class='tveapp_wrapSearch'><input name='search' type='text' id='tveapp_search' class='tveapp_search' autocomplete='off' onfocus='if(this.value == \"Type in provider name\") { this.value = \"\"; };jQuery(\"#tveapp_selectProvider\").addClass(\"tveapp_searchActivated\");' onblur='this.value=!this.value?\"Type in provider name\":this.value;' value='Type in provider name' /></span><a class='tveapp_searchButton'>Browse</a></div></div><div class='tveapp_footer'><div id='providersWrapper'></div><div id='extraMvpdWrapper'></div></div></div>");
c=TVEAuthOptions.selectMvpdOverlay||c;b=TVEAuth.Providers.getList(TVEAuth.Providers.list,"defaultView");c.find("#providersWrapper").append(b[0]);c.find("#extraMvpdWrapper").append(b[1]);break;case "error":c=jQuery("<div id='tveapp_error' class='tveapp_container tveapp_sSize'><div class='tveapp_header'><h4>Sorry</h4><a class='tveapp_button tveapp_close'>Close</a><</div><div class='tveapp_content'><div class='tveapp_mainCol'><div class='tveapp_brandLogo'></div><p id='tveapp_error_mess'>We can't show you this content at this time.<br />Try later or contact your TV service provider.</p></div></div><div class='tveapp_footer'><ul class='tveapp_buttons'><li><a class='tveapp_b-browse tveapp_close'>Close</a></li></ul></div></div>");
break;case "providerNotListed":c=jQuery("<div id='tveapp_providerNotListed' class='tveapp_container tveapp_mSize'><div class='tveapp_header'><h4>Provider Not Listed</h4><a class='tveapp_close'>Cancel</a></div><div class='tveapp_content'><div class='tveapp_mainCol'><div class='tveapp_brandLogo'></div><p id='provNotListedText'>We are working to add providers.<br />If your provider is not listed, check back<br />frequently to see if your provider has been added.</p></div></div><div class='tveapp_footer'><ul class='tveapp_buttons'><li><a class='tveapp_b-browse tveapp_close'>Close</a></li></ul></div></div>")}TVEAuth.Overlay.list[a]=
c.appendTo(jQuery("#tveapp_wrap")).show();TVEAuth.wrapObj.show()},init:function(){var a=TVEAuth.Overlay;qsTxt=TVEAuth.Overlay.qsText;TVEAuth.Overlay.iframeWrap=TVEAuthOptions.iframeWrapper||jQuery("<div id='tveapp_iframeWrap' class='tveapp_container tveapp_mSize mvpdWrapBox' style='display:none;'><div class='tveapp_header'><a class='tveapp_button tveapp_goBack'>Back</a><a class='tveapp_button tveapp_close'>Cancel</a></div><div id='mvpddivWrap' class='tveapp_content'></div></div>");TVEAuthOptions.fullScreenActivated&&
jQuery("html").addClass("tveapp_fullScreenActivated");jQuery("#tveapp_wrap").live("click.tveevent touchend.tveevent",function(a){jQuery(a.target).closest("#tveapp_search, #providersWrapper").length||(jQuery("#tveapp_selectProvider").removeClass("tveapp_searchActivated"),jQuery("#tveapp_search").blur())});jQuery("#tveapp_search").live("keyup.tveevent",function(){var a=jQuery(this).val().toLowerCase(),b="",d=[],e=0;jQuery("#providersWrapper .tveapp_pL-item").each(function(){e=0;b=jQuery(this).find(".tveapp_pL-link").attr("tveapp_alt").toLowerCase();
d=b.replace(/ /g,", ").split(", ");for(var f=0;f<d.length;f++)0==d[f].indexOf(a)&&(e+=1);0<e?jQuery(this).show():jQuery(this).hide()})});jQuery("#tveapp_selectProvider .tveapp_close").live("click.tveevent",function(){a.hide("selectProvider");a.list.selectProvider.removeClass("tveapp_quickSearch").find("#tveapp_search").val("").trigger("keyup").val(TVEAuth.Overlay.qsText);a.list.selectProvider.find(".tveapp_pL-item").attr("style","");TVEAuth.MVPD=null;TVEAuth.storage.erase("TVEAuth_MVPD_Selected");TVEAuth.storage.erase("TVEAuth_onLoad");
TVEAuth.storage.erase("TVEAuth_getAZ")});jQuery("#tveapp_error .tveapp_close").live("click.tveevent",function(){a.hide("error")});jQuery("#tveapp_success .tveapp_close").live("click.tveevent",function(){a.hide("successMessage")});jQuery("#tveapp_iframeWrap .tveapp_close").live("click.tveevent",function(){a.list.selectProvider.removeClass("tveapp_quickSearch").find("#tveapp_search").val("").trigger("keyup").val(TVEAuth.Overlay.qsText);a.list.selectProvider.find(".tveapp_pL-item").attr("style","");a.closeIFrame();
a.hide("iframeWrap");TVEAuth.storage.erase("TVEAuth_MVPD_Selected");TVEAuth.storage.erase("TVEAuth_onLoad");TVEAuth.storage.set("TVEAuth_isSetANStatusSkip","true")});jQuery("#tveapp_iframeWrap .tveapp_goBack").live("click.tveevent",function(){a.list.selectProvider.removeClass("tveapp_quickSearch").find("#tveapp_search").val("").trigger("keyup").val(TVEAuth.Overlay.qsText);a.list.selectProvider.find(".tveapp_pL-item").attr("style","");jQuery("#tveapp_iframeWrap").hide();jQuery("#tveapp_selectProvider").show()});
jQuery("#tveapp_providerNotListed").live("click.tveevent",function(){a.show("dontSeeUrMvpd");jQuery("#tveapp_selectProvider").hide();TVEAuth.Callback.providerNotListedButtonSelected()});jQuery("#tveapp_dontSeeUrMvpd .tveapp_goBack").live("click.tveevent",function(){jQuery("#tveapp_dontSeeUrMvpd").hide();jQuery("#tveapp_selectProvider").show()});jQuery("#tveapp_dontSeeUrMvpd .tveapp_close").live("click.tveevent",function(){a.hide("dontSeeUrMvpd")})},show:function(a){TVEAuth.wrapObj.show();jQuery("body").addClass("tveapp_modalOpened");
this.list[a]?this.list[a].show():this.get(a)},hide:function(a){jQuery("body").removeClass("tveapp_modalOpened");a=this.list[a];null!=a&&a.hide();TVEAuth.wrapObj.hide()},closeIFrame:function(){TVEAuth.Overlay.isClosedByUser=!0;jQuery("#mvpdframe").remove();TVEAuth.Overlay.hide("iframeWrap");TVEAuth.Providers._set(null)},createIFrame:function(a,c){var b=TVEAuth.Overlay,d=jQuery(window).width();b.hide("selectProvider");d<a&&(a=d);b.list.iframeWrap=b.list.iframeWrap||TVEAuthOptions.iframeWrapper;b.list.iframeWrap.appendTo(TVEAuth.wrapObj[0]).css({"margin-left":-a/
2,width:320});jQuery("#mvpddivWrap").empty();jQuery('<iframe id="mvpdframe" name="mvpdframe"></iframe>').css({width:a,height:c,background:"#ffffff",frameborder:0,border:0,display:"block"}).appendTo("#mvpddivWrap");b.show("iframeWrap");b.isClosedByUser=!1}};TVEAuth.Error={isDebugOn:1,init:function(a){this.isDebugOn=a;window.console||(console={log:function(a){}})},showMess:function(a){-1!=this.isDebugOn&&("undefined"!=typeof a?(console.log("Error: "+a),console.log("Error: "+this.list[a])):console.log("Error: N/A"));TVEAuth.Callback.errorHappened(this.list[a])},list:{Ready:"DebugMode is runnig","Wrong RquestorID/ChannelID":"RequestorID and/or channelID is not define",verifyWhiteList:"Initialization error",loadList:"Can Not Load The White List"}};function entitlementLoaded(){TVEAuth.Providers.loadWhiteList();TVEAuth.Auth.set();TVEAuth.AE().getSelectedProvider();TVEAuth.storage.erase("TVEAuth_Logout_Completed");TVEAuth.storage.erase("TVEAuth_login_Started")}function setToken(a,c){TVEAuth.Auth.setToken(a,c)}function tokenRequestFailed(a,c){TVEAuth.Auth.tokenRequestFailed(a,c)}
function setAuthenticationStatus(a,c){TVEAuth.storage.get("TVEAuth_isSetANStatusSkip")?TVEAuth.storage.erase("TVEAuth_isSetANStatusSkip"):TVEAuth.Auth.setANStatus(a,c)}function createIFrame(a,c){TVEAuth.Overlay.createIFrame(a,c)}function sendTrackingData(a,c){TVEAuth.Auth.dataTracker(a,c)}
function displayProviderDialog(a){if(null!=a){var c=TVEAuth.Providers;c.list=a;c.verifyWhiteList(a);switch(TVEAuth.Helper){case "getAN":case "getAZ":TVEAuth.Overlay.show("selectProvider");break;case "getPL":TVEAuth.Callback.providersListReceived(c.list)}}else TVEAuth.Error.showMess("displayProviders")}
function selectedProvider(a){TVEAuth.storage.set("TVEAPP_MVPD_Object","{MVPD: "+a.MVPD+", State: "+a.AE_State+"}");TVEAuth.MVPD_ID=a.MVPD;TVEAuth.MVPD=a=TVEAuth.Providers.getMvpd(TVEAuth.MVPD_ID);TVEAuth.storage.get("TVEAuth_getMvpd")&&(TVEAuth.Callback.currentProviderReceived(a),TVEAuth.storage.erase("TVEAuth_getMvpd"));switch(TVEAuth.storage.get("TVEAuth_mvpdParam")){case "getMvpdNow":TVEAuth.Callback.currentProviderReceived(a);TVEAuth.storage.erase("TVEAuth_mvpdParam");break;case "authNEnd":TVEAuth.storage.erase("TVEAuth_mvpdParam")}}
;TVEAuth.API={init:function(a,c,b){TVEAuth.initialize(a,c,b)},checkAuthentication:function(){TVEAuth.Helper="checkAN";TVEAuth.Auth.checkAN()},checkAuthorization:function(){localStorage.setItem("TVEAuth_checkAZ","true");TVEAuth.Helper="checkAZ";TVEAuth.Auth.checkAZ()},checkAuthNAndAuthZ:function(){TVEAuth.Helper="checkANnAZ";localStorage.setItem("TVEAuth_checkANnAZ","true");TVEAuth.Auth.checkAZ()},getAuthentication:function(){TVEAuth.Helper="getAN";TVEAuth.Auth.getAN()},getAuthorization:function(){TVEAuth.Helper=
"getAZ";TVEAuth.Auth.getAZ()},signOut:function(){localStorage.setItem("TVEAuth_Logout_Completed","true");TVEAuth.Auth.signOut()},getProvidersList:function(){var a;a=TVEAuth.Providers;TVEAuth.Helper="getPL";TVEAuth.MVPD?(a=a.loadList(),displayProviderDialog(a)):(localStorage.setItem("TVEAuth_isSetANStatusSkip","true"),TVEAuth.Auth.getAN(),a._set(null))},getCurrentProvider:function(){localStorage.setItem("TVEAuth_getMvpd","true");TVEAuth.AE().getSelectedProvider()},closeMvpdPicker:function(){jQuery("#tveapp_selectProvider .tveapp_close").click();
TVEAuth.Callback.mvpdPickerClosed()}};

// default search text
// event handler
function addEventToObject(obj,evt,func){
var oldhandler = obj[evt];
obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();};
}
// lyrics box stuff
var Searchbox ={
init : function()
{
var sBox = document.getElementById('search-lyrics');
if(sBox)
{
addEventToObject(sBox,'onclick',Searchbox.click);
addEventToObject(sBox,'onblur',Searchbox.blur);
}
},
click : function()
{
var sBox = document.getElementById('search-lyrics');
if (sBox.value == 'Enter lyric, artist name or song title')
{
sBox.value = '';
sBox.style.color = 'black';
}
},
blur : function()
{
var sBox = document.getElementById('search-lyrics');
if (sBox.value == '' || sBox.value == ' '){sBox.value = 'Enter lyric, artist name or song title'; sBox.style.color = '#999999';}
}
};
// search box stuff
var Searchbar ={
init : function()
{
var sBar = document.getElementById('searchmtv-text');
if (sBar)
{
addEventToObject(sBar,'onclick',Searchbar.click);
addEventToObject(sBar,'onblur',Searchbar.blur);
}
},
click : function()
{
var sBar = document.getElementById('searchmtv-text');
if (sBar.value == 'Search' || sBar.value == 'SEARCH')
{
sBar.value = '';
}
},
blur : function()
{
var sBar = document.getElementById('searchmtv-text');
if (sBar.value == '' || sBar.value == ' '){sBar.value = 'SEARCH';}
}
};
// add event onload
addEventToObject(window,'onload',Searchbox.init);
addEventToObject(window,'onload',Searchbar.init);

var Utils = {
show : function(element){
if (element!=null && element.className.indexOf('hide') >= 0){
element.className = element.className.substring(0, element.className.indexOf('hide'));
}
},
hide : function(element){
if (element!=null && element.className.indexOf('hide') < 0){
element.className = element.className + " hide";
}
},
// returns the first parent of a node with a given class
findParent : function(obj, parentClass){
var parent = obj.parentNode;
if (parent.className && parent.className.indexOf(parentClass) != -1)
return parent;
else return this.findParent(parent, parentClass);
},
// returns the first child of a node with a given class
findChild : function(obj, childClass){
var match;
for(var i=0; i<obj.childNodes.length; i++){
var child = obj.childNodes[i];
if (child.className && child.className==childClass)
match = child;
else if(child.childNodes && child.childNodes.length>0){
match = this.findChild(child, childClass);
}
if(match) return match;
}
}
}
var Paginate = {
getPrev : function(obj){
this.page(obj, 'prev');
},
getNext : function(obj){
this.page(obj, 'next');
},
page : function(obj, direction){
var mdl = Utils.findParent(obj, 'mdl');
var pagination = Utils.findChild(mdl, 'pagination');
var pageCount = Utils.findChild(pagination, 'sm');
var count = new Array();
count = pageCount.innerHTML.split(' ');
var current = count[0]*1;
var total = count[2]*1;
var requestPage;
if(direction=='prev'){
if(current==1) requestPage = total;
else requestPage = current - 1;
}
else{
if(current==total) requestPage = 1;
else requestPage = current + 1;
}
var listCount = 0;
for(var i=0; i<mdl.childNodes.length; i++){
var child = mdl.childNodes[i];
if (child.nodeName=='OL' || (child.nodeName=='DIV' && child.className.indexOf('paginationGroup')>-1)){
listCount++;
if (listCount!=requestPage) Utils.hide(child);
else Utils.show(child);
}
}
var newPageCounter = requestPage + " of " + total;
pageCount.replaceChild(document.createTextNode(newPageCounter), pageCount.childNodes[0]);
}
}

$j(document).ready(function(){
MTVN.init();
});

if(typeof MTVN=="undefined")MTVN={};

MTVN.pageTitle = document.title;
MTVN.initArray = new Array();
MTVN.version = 'charlie';
MTVN.init = function(){
document.body.onmousedown = function(e){
if (MTVN.UI.ModalWindow.isOpen) MTVN.UI.ModalWindow.mouseDownBody(e);
return true;
};
if (typeof MTVN.Flux != 'undefined' && ((typeof(MTV) == "undefined" || typeof(MTV.Flux) == "undefined") || typeof(MTV.Flux.ucid) == "undefined")) MTVN.Flux.Widgets.loadAll();
MTVN.UI.initScrollingModules();
for(var i=0; i<MTVN.initArray.length; i++){
MTVN.initArray[i]();
}
return true;
};
MTVN.resetPageTitle = function(){
document.title = MTVN.pageTitle;
};

MTVN.Apps = new function(){}

MTVN.Constants = new function(){
this.playerChannelDomain = "mtv";
this.playerMediaHost = "http://media.mtvnservices.com";
this.playerBaseUrl = "";	
};
MTVN.Ads = new function(){
this.additionalValues = "";
this.moreAdditionalValues = "";

this.dartSite = "";
this.sections = ""; // right now this is only ever set to vidzone from the player
this.adPageVals = "";
this.autoDcopt = "";

// this is mostly for the video player, ajaxed in values
this.handleAdditionalValues = function(){

if (MTVN.Ads.additionalValues.indexOf("content_id") == -1 
&& MTVN.Player && MTVN.Player.id != undefined)	{	
MTVN.Ads.additionalValues += "content_id=" + MTVN.Player.id + ";";
}

MTVN.Ads.additionalValues += MTVN.Ads.moreAdditionalValues;
}	

}

MTVN.Reporting = new function(){
this.dispatcherAttributes = "";

this.handleDispatcherAttributes = function(){
var attrs = MTVN.Reporting.dispatcherAttributes.split(";");
for (var i=0; i < attrs.length; i++) {

if(attrs[i]!=""){
var pair = attrs[i].split("=");	
dispatcher.setAttribute(pair[0],pair[1]);
}
}
}

this.reportIMX = function(tagUrl, protocol, params){
var imxTag = new Image();
if ((protocol=="flipbook" && !(document.referrer.indexOf("fid="+params) > -1)) || (protocol != 'flipbook')){
imxTag.src = tagUrl;
}
}

this.reportFluxView = function(tagUrl, protocol, params){
var fluxTag = new Image();
fluxTag.src = tagUrl;
}
}

MTVN.UI = new function(){
this.initScrollingModules = function(){
/* handle no max-height in IE 6 */

if(navigator.userAgent.toLowerCase().indexOf("msie 6") != -1){
$j(".scroll-wrap").each(function(){
var sw = $j(this);
var olHeight = sw.children("ol:first").height();
if(olHeight < 370) sw.height("100%");
});
}

}
}

MTVN.UI.Overlay = new function(){
this.active = false;

this.init = function(){
$j("#container-outer").append('<div id="overlay"></div>');
$j("#modalWindow").remove().appendTo("#container-outer");
MTVN.UI.Overlay.active = true;
}

this.open = function(){
$j("#overlay").addClass("open");
$j("#overlay").height(document.body.offsetHeight + "px");
}

this.close = function(){
$j("#overlay").removeClass("open");
$j("#overlay").height("0px");
}
}

MTVN.UI.ModalWindow = new function(){
var modalWindowId = "modalWindow";
var currentLocationId = "";
this.ignoreMouseDownBody = false;
this.isOpen = false;

this.open = function(requestUrl, locationId){
currentLocationId = locationId;

$j.get(requestUrl, function(data){
MTVN.UI.Overlay.open();
$j("#dialogContainer").empty().append(data);
MTVN.UI.ModalWindow.updateLocation();
});
}

this.updateLocation = function(){
var mwElement = document.getElementById(modalWindowId);
var mwLeft = 0;
var mwTop = 0;
var mwWidth = $j(mwElement).width();
var bodyWidth = document.body.offsetWidth;

$j("#" + modalWindowId).removeClass("hide");

var wrap = document.getElementById("wrap");
var wrapX = $j("#wrap").offset().left;	
var wrapWidth = wrap.offsetWidth;
var wrapThird = Math.round(wrapWidth/3);
var warpHeight = wrap.offsetHeight;	

if(!currentLocationId){
// defaults to centered position
if(MTVN.UI.Overlay.active){
mwLeft = Math.round(bodyWidth/2 - mwWidth/2);
}
else{
mwLeft = Math.round(bodyWidth/2 - mwWidth/2); // centered for 446px-wide modal window
}	
mwTop = Math.round(((document.documentElement.clientHeight - mwElement.offsetHeight)/2) + ($j('html').scrollTop() || $j('body').scrollTop())) - 30; // 30 pixel cheat	
}
else{
//positioning relative to an element

var locElement = document.getElementById(currentLocationId);

var locLeft = $j("#" + currentLocationId).offset().left - wrapX;	//left position relative to wrap instead of the window left
var locTop = $j("#" + currentLocationId).offset().top;

if(locLeft < wrapThird){ mwLeft = wrapX -20; }
else if(locLeft > wrapThird && locLeft < (wrapThird * 2)){ Math.round(bodyWidth/2 - mwWidth/2); }
else{ 
//mwLeft = (wrapX + wrapWidth - mwWidth + 20) ; 
mwLeft = Math.round(bodyWidth/2 - mwWidth/2 - 200) ;
}

if(locTop < 350) {
//mwTop = locTop - (mwElement.offsetHeight + 1);
mwTop = locTop + 20;
}
else {
mwTop = locTop - 350;

}

}

mwElement.style.left = mwLeft + "px";
mwElement.style.top = mwTop + "px";

MTVN.UI.ModalWindow.isOpen = true;
}

this.close = function(){
var mwElement = document.getElementById(modalWindowId);
mwElement.style.left = "-9999px";
MTVN.UI.Overlay.close();
currentLocationId="";
this.isOpen = false;
}

this.mouseDown = function(e){
this.ignoreMouseDownBody = true;
return true;
}

this.mouseDownBody = function(e){
if (!this.ignoreMouseDownBody){
this.close();
}
this.ignoreMouseDownBody = false;
return true;
}
}

MTVN.UI.Tab = new function(){
this.open = function(obj){
var newActiveTabId = obj.parentNode.id;
var newActivePageId = newActiveTabId.substring(0, newActiveTabId.indexOf("Tab"));

var tab = document.getElementById(newActiveTabId);
var tabList = tab.parentNode;
var tabs = tabList.getElementsByTagName("li");

// set new active tab
for(var i=0; i < tabs.length; i++){
var t = tabs[i];

if(t.id == newActiveTabId){
$j(t).addClass("active");
}
else{
$j(t).removeClass("active");
}
}

// set new active page
var page = document.getElementById(newActivePageId);
if(page==null){
// Go to page given in anchor tag if page is null
window.location.href=obj.href;
}
else{
var pageList = page.parentNode;
var pages = pageList.childNodes;

for(var i=0; i < pages.length; i++){
var p = pages[i];

if(p.nodeName=="DIV" && p.className.indexOf('tab-content') >= 0){
if(p.id == newActivePageId){
$j(p).removeClass("hide");

if(p.className.indexOf('mobileWidget') >= 0){
var tabEvent = $j.Event("showtab");
$j(p).triggerHandler(tabEvent);
}
}
else{
$j(p).addClass("hide");
}
}
}
}
}

this.openAjax = function(obj, ajaxData, configParams){
var newActiveTabId = obj.parentNode.id;
var newActivePageId = newActiveTabId.substring(0, newActiveTabId.indexOf("Tab"));

var tab = document.getElementById(newActiveTabId);
var tabList = tab.parentNode;
var tabs = tabList.getElementsByTagName("li");
var containerHeight = 10;
var containerHeight2 = 0;

// set new active tab
for(var i=0; i < tabs.length; i++){
var t = tabs[i];
if(t.id == newActiveTabId) $j(t).addClass("active");
else $j(t).removeClass("active");
}

// set new active page
var page = document.getElementById(newActivePageId);
var pageList = page.parentNode;
var pages = pageList.childNodes;

for(var i=0; i < pages.length; i++){
var p = pages[i];
if(p.nodeName=="DIV" && p.className.indexOf('tab-content') >= 0 && p.className.indexOf('hide')== -1) { containerHeight2=$j(p).children("div").height(); containerHeight = $j(p).height();}
}

for(var i=0; i < pages.length; i++){
var p = pages[i];

if(p.nodeName=="DIV" && p.className.indexOf('tab-content') >= 0){
if(p.id == newActivePageId){
var container = $j(p);
if (container.is('.loaded')) {
container.removeClass("hide");
}else
{
container.css({'min-height': containerHeight});
//container.empty();
//container.children(".more-link.group").addClass("hide");

var tempStore = container.children(".more-link.group").remove();
container.prepend('<div class="ajax-loader"><img src="/sitewide/images/charlie/ajax-loader.gif" alt="Loading..."/></div>');
container.removeClass("hide");
$j.get(ajaxData, configParams, function(data){
container.empty();
container.children(".ajax-loader").remove();
container.prepend(data);
container.css({'min-height': '0px'});
//container.children(".more-link.group").removeClass("hide");
container.children(".more-link.group").css({'display': 'block'});
tempStore.appendTo(container);
container.addClass("loaded");
});
}
}
else{
$j(p).addClass("hide");
}
}
}

}
}

MTVN.UI.MdlTab = new function(){
this.open = function(obj){
var currentTabNavItem = $j(obj).parent();
var position = currentTabNavItem.prevAll().length;

currentTabNavItem.addClass("active");
currentTabNavItem.siblings().removeClass("active");

var mdl = currentTabNavItem.parents(".mdl:first");

var pages = (mdl.children("ol.lst").length >0) ? mdl.children("ol.lst") : mdl.children("div.tab-content");
pages.addClass("hide");
pages.eq(position).removeClass("hide");
}
}

MTVN.UI.RefreshPaginate = new function(){
this.submit = function(form){
var str = $j(form).text();
var maxPages = parseInt(str.substring(str.indexOf("of")+3, str.length));
var val = parseInt(form.page.value);
var baseUrl = form.baseUrl.value;

if(val > 0 && val <= maxPages){
var connector = (baseUrl.indexOf("?") >=0) ? "&" : "?";
var url = (val==1) ? baseUrl : baseUrl + connector + "page=" + val;
window.location.href = url;
}

return false;
}
}

MTVN.UI.AjaxPaginate = new function(){
this.page = function(obj, requestUrl, pageNum){
var paginationDiv = $j(obj).parent();
var container = paginationDiv.parent();
var params = {};
if(pageNum > 1) params.page = pageNum;

$j.get(requestUrl, params, function(data){
container.empty();
container.append(data);
});

}
}

MTVN.UI.Accordion = new function(){
var howMany = "";

this.init = function(){
// remove text nodes
$j("#accordion a.accord-link").each(function(){
for(var i=0; i<this.childNodes.length; i++){
if(this.childNodes[i].nodeType==3) this.removeChild(this.childNodes[i]);
}
});

$j("#accordion > div.accord-slat").bind("mouseenter", function(){ MTVN.UI.Accordion.activate(this); });
howMany = $j("#accordion > div.accord-slat").length;
MTVN.UI.Accordion.positionContent($j("#accordion > div.accord-over"));
}

this.activate = function(obj){
var active = $j(obj);
$j("#accordion > div.accord-slat").removeClass("accord-over");
active.addClass("accord-over");
MTVN.UI.Accordion.positionContent(active);
}

this.positionContent = function(active){
var position = active.prevAll().length + 1;
var gap = howMany - position;

var content = active.children(".accord-content"); // the active content box
var offsetLeft = MTVN.UI.Accordion.getOffsetLeft(active.get(0), active.get(0).offsetLeft); // left side of active item
var contentWidth = content.width() + 30;

var newLeft = (offsetLeft+133) - contentWidth/2;
var newRight = newLeft + contentWidth;

if(newRight > 950){
newLeft = 950 - contentWidth - (10*gap); // 10px for every item
}
else if(newLeft < 0){
newLeft = 10*position;
}

content.css("left", newLeft);
}

this.getOffsetLeft = function(element, offsetLeft){
if(element.offsetParent.className=="mdl mdl-main mdl-accordion"){
return offsetLeft;
}
else{
var parent = element.offsetParent;
var val = element.offsetLeft + parent.offsetLeft;
return MTVN.UI.Accordion.getOffsetLeft(parent, val);
}
}
}

MTVN.UI.InView = new function() {

var elements = [];
var positions = [];
var offsets = [];

var jwin = $j(window);

var init = function() {
jwin.bind("scroll resize", function() {
jwin.unbind("scroll resize");
setTimeout(function() {
checkElements();
}, 500);
});	
}

this.register = function(element, callback) {
var offsetLeft = 0;
var offsetTop = 0;
var elementOffset = element.offset();
if (elementOffset != null) {
offsetLeft = elementOffset.left;
offsetTop = elementOffset.top;
}

var coords = offsetLeft + "x" + offsetTop;
var offset = $j.grep(positions, function(n, i){
return (n == coords);
});
offsets.push(offset.length * 100);
positions.push(coords);

if(isInView(element, offset.length * 100)) {
callback();
} else {
elements.push(element);
element.one("inView", callback);
init();
}
}

var checkElements = function () {
var tempElements = [];
$j.each(elements, function(i) {
tempElements.push(this);
if (isInView(this, offsets[i])) {
this.trigger("inView");
tempElements.pop();
}
});
elements = tempElements;
if (elements.length > 0) {
init();
} 
}

var isInView = function(element, offset) {
var viewportHeight = jwin.height();
var docPos = jwin.scrollTop();
var elementOffsetTop = 0;
var elementOffset = element.offset();
if (elementOffset!=null) elementOffsetTop = element.offset().top;

var elPos = parseInt(elementOffsetTop) + offset;
return (elPos < viewportHeight + docPos);
}
}

// Taken from MTV's sitewide paginate.
MTVN.UI.Paginate = new function() {	
this.numVisiblePages;
this.firstVisiblePageNum = 1;
this.currentPositionIndex = 1;
this.currentPageNum = 1;
this.totalNumPages;
this.getPrev = function(obj,animate){
this.page(obj, 'prev', animate);
}

this.getNext = function(obj,animate){
this.page(obj, 'next', animate);
}

this.animatePagination = function(obj){
var pagenum = this.firstVisiblePageNum+this.currentPositionIndex-1;
//this.page2(obj, null, this.currentPageNum);

var mdl = $j(obj).parents('.mdl');

var paginationListoffsetParse = mdl.find(".paginationList").css("left");
if (paginationListoffsetParse == "auto") {paginationListoffsetParse = 0;}
var paginationListoffset = parseInt(paginationListoffsetParse);
var numberOffset = parseInt(mdl.find(".paginationList").children("#p" + this.currentPageNum).position().left);
//alert(mdl.find(".paginationList").children("#p" + this.currentPageNum).position().left);
if (-numberOffset > paginationListoffset) {
var moveOffset = paginationListoffset + numberOffset;
$j(mdl).find('.paginationList').animate({"left":'-='+moveOffset},{easing:"swing",duration:"slow",queue:true});
}

paginationListoffsetParse = mdl.find(".paginationList").css("left");
if (paginationListoffsetParse == "auto") {paginationListoffsetParse = 0;}
paginationListoffset = parseInt(paginationListoffsetParse);

numberOffset = parseInt(mdl.find(".paginationList").children("#p" + this.currentPageNum).position().left);
var containerWidth = parseInt(mdl.find(".paginationOverflowWidth").css("width"));
var numberWidth = parseInt(mdl.find(".paginationList").children("#p" + this.currentPageNum).width())+6;

if ( ((numberOffset + numberWidth) + paginationListoffset) > containerWidth){
var moveOffset = containerWidth - (numberOffset + numberWidth + paginationListoffset);
$j(mdl).find('.paginationList').animate({"left":'+='+moveOffset},{easing:"swing",duration:"slow",queue:true});
}

}

this.leftAction = function(obj){
if (this.currentPageNum>1){ this.currentPositionIndex--; this.currentPageNum--; this.page2(obj,null,this.currentPageNum); }
}

this.rightAction = function(obj){
if(this.currentPageNum < this.totalNumPages) {this.currentPageNum++; this.currentPositionIndex++; this.page2(obj, null,this.currentPageNum);}
}

this.get = function(mdl, requestPage){
var pagination = MTVN.UI.Paginate.Utils.findChild(mdl, 'pagination');
var pageCount = MTVN.UI.Paginate.Utils.findChild(pagination, 'sm');

var count = new Array();
count = pageCount.innerHTML.split(' ');

var total = count[2]*1;

var listCount = 0;
for(var i=0; i<mdl.childNodes.length; i++){
var child = mdl.childNodes[i];
if (child.nodeName=='OL' || (child.nodeName=='DIV' && child.className.indexOf('paginationGroup')>-1)){
listCount++;
if (listCount!=requestPage) MTVN.UI.Paginate.Utils.hide(child);
else MTVN.UI.Paginate.Utils.show(child);
}
}

var newPageCounter = requestPage + " of " + total;
pageCount.replaceChild(document.createTextNode(newPageCounter), pageCount.childNodes[0]);
}

this.page = function(obj, direction, animate){
var paginationDiv = $j(obj).parents('.pagination');
var mdl = $j(obj).parents('.mdl');
var pageCount = paginationDiv.find('.sm');

var count = new Array();
count = pageCount.html().split(' '); 
current = count[0]*1;
var total = count[2]*1;
var requestPage;

if(direction=='prev'){
if(current==1) requestPage = total;
else requestPage = current - 1;
}
else{
if(current==total) requestPage = 1;
else requestPage = current + 1;
}

if (animate) this.animateTransition($j(paginationDiv).parent().parent(),current,requestPage);
else this.staticTransition(mdl,current,requestPage);

var newPageCounter = requestPage + " of " + total;
pageCount.empty().append(newPageCounter);

if(requestPage == total) {
pageCount.parent().parent().removeClass("first").addClass("last");
} else if(requestPage == 1){
pageCount.parent().parent().removeClass("last").addClass("first");
} else {
pageCount.parent().parent().removeClass("last").removeClass("first");
}
}

// pagination in list format ( < 1 2 3 4 5 > )
this.page2 = function(obj, direction, newpage){

this.currentPageNum = newpage;
//this.currentPositionIndex = this.currentPageNum - this.firstVisiblePageNum + 1;	

var paginationDiv = $j(obj).parents('.pagination');
var mdl = $j(obj).parents('.mdl');
var current = parseInt(paginationDiv.find('.active').find('a').html());
var total = paginationDiv.find('p').length;

var requestPage;
if(direction=='prev'){
if(current==1) requestPage = total;
else requestPage = current - 1;
}
else if (direction=='next'){
if(current==total) requestPage = 1;
else requestPage = current + 1;

}
else requestPage=newpage;
requestPage=requestPage-1;
current=current-1;

paginationDiv.find('.active').removeClass('active');
$j(paginationDiv.find('p')[requestPage]).addClass('active');

this.animateTransition(mdl,current,requestPage);
if($j(".paginationList").children("p").length > 0) this.animatePagination(obj);
}

this.animateTransition = function(mdl,current,requestPage) {

var animation = function(){
var pagewidth = $j(mdl).find('.pages').find('ol').width()+10; 

var jumpto = (current-requestPage)*pagewidth; 

var thisJumpto = parseInt($j(mdl).find('.pages').css('left')) + jumpto;

$j(mdl).find('.pages').animate({"left": thisJumpto},{easing:"swing",duration:'slow'});

$j(this).dequeue();

}

$j(mdl).find('.pages').queue(animation);	

//$j(mdl).find('.pages').animate({"left":'+=' + jumpto},{easing:"swing",duration:"slow"});

//var pagewidth2 = $j(mdl).find('.paginationList').find('p').width()+6;
//var jumpto2 = (current-requestPage)*pagewidth2;
//alert(jumpto2);
//$j(mdl).find('.paginationList').animate({"left":'+='+jumpto2},{easing:"swing",duration:"slow"});
}

this.staticTransition = function(mdl,current,requestPage) { 
if (mdl.find('.paginationGroup').length>0) {
hideChild = $j(mdl.find('.paginationGroup')[current-1]);
showChild = $j(mdl.find('.paginationGroup')[requestPage-1]);
}
else {
hideChild = $j(mdl.find('ol')[current-1]); 
showChild = $j(mdl.find('ol')[requestPage-1]);
}
hideChild.addClass('hide');
showChild.removeClass('hide'); 
} 

}

MTVN.UI.Paginate.Utils = new function() {
this.show = function(element){
if (element!=null && element.className.indexOf('hide') >= 0){
element.className = element.className.substring(0, element.className.indexOf('hide'));
}
}

this.hide = function(element){
if (element!=null && element.className.indexOf('hide') < 0){
element.className = element.className + " hide";
}
}

// returns the first parent of a node with a given class
this.findParent = function(obj, parentClass){
var parent = obj.parentNode;
if (parent.className && parent.className.indexOf(parentClass) != -1)
return parent;
else return this.findParent(parent, parentClass);
}

// returns the first child of a node with a given class
this.findChild = function(obj, childClass){
var match;
for(var i=0; i<obj.childNodes.length; i++){
var child = obj.childNodes[i];
if (child.className && child.className==childClass)
match = child;
else if(child.childNodes && child.childNodes.length>0){
match = this.findChild(child, childClass);
}
if(match) return match;
}
}
}

MTVN.UI.GetCurrentServerTime = new function() {

this.date = function() {

return new InitCurrentTime().now;

}

this.raw = function() {

return new InitCurrentTime().rawTime;

}

}

$j(function() {
$j("a.dynLink").click(function (e) {
e.preventDefault();
});
});

/* This is used to solve the problem of widgets that are shown/hidden on click */

MTVN.Twitter = new function(){

this.init = function(id, options){

var hidden = jQuery(options.element + ' a.twitter-timeline-hidden');

if(hidden.length){
hidden.attr('class', 'twitter-timeline');
MTVN.Twitter.removeScript(id);
MTVN.Twitter.loadScript(document,'script',id);
}
}

this.loadScript = function(d,s,id){

var js,fjs=d.getElementsByTagName(s)[0];

if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}

this.removeScript = function(id){
jQuery('script[id='+id+']').remove(); // Remove the included js file 
}

this.removeTimeline = function(options){
jQuery(options.element + ' iframe.twitter-timeline').remove(); // Remove the timeline iframe
}

this.add = function(options){

var linkStr = '<a class="twitter-timeline"';

linkStr += (options.width)?' width="'+options.width+'"':'';
linkStr += (options.height)?' height="'+options.height+'"':'';
linkStr += (options.color)?' data-link-color="'+options.color+'"':'';
linkStr += (options.theme)?' data-theme="'+options.theme+'"':'';
linkStr += (options.chrome)?' data-chrome="'+options.chrome+'"':'';
linkStr += ' href="' + options.url + '" data-widget-id="' + options.id + '">Tweets</a>';

jQuery(linkStr).appendTo(options.element);
}

this.show = function(id,options,refresh) {

if(refresh){
MTVN.Twitter.removeScript(id);
MTVN.Twitter.removeTimeline(options);
MTVN.Twitter.add(options);
MTVN.Twitter.loadScript(document,'script',id);
}else{
MTVN.Twitter.init(id, options);
}
}
}
$j(function() {
if($j("div.player-placeholder").length > 0) {
MTVN.LitePlayer.init();
MTVN.LitePlayer.applyClick();
}	
});

MTVN.LitePlayer = new function(){
this.imageServer = "mtv.mtvnimages.com";
this.videoUriPrefix = "mgid:uma:video:mtv.com:";
this.playlistUriPrefix = "mgid:uma:videolist:mtv.com:";
this.imageServerUri = "";
this.affilatedHost = "";

this.active = false;
this.playerUrl = "PLAYER_URL_NOT_SET";
this.configUrl = "CONFIG_URL_NOT_SET";
this.width = "240";
this.height = "211";
this.playerArgs = "";

var _this = this;
var initPlayer = function(){
$j("div.player-placeholder").each(function(i){
$this = $j(this);
var isrc = $this.attr("isrc");
var playerArgs = _this.playerArgs;
var flashVars;
var configParams = "";

if (this.id) {
configParams = this.id.replace(/\./g, "&").replace(/:/g,"=");
if( $this.attr("flashVars") ) {
configParams += '&' + $this.attr("flashVars");
}
} else {
if ($this.attr("flashVars").length > 0) {
configParams = $this.attr("flashVars");
}
}
if (playerArgs.length > 0) {
playerArgs += "&";
}	

playerArgs += configParams;	
var paramsFromId = {};
var params = configParams.split("&");
var uri;
var imageUri = "";
$j.each(params, function() {
var pair = this.split("=");
paramsFromId[pair[0]] = pair[1];
});

if(typeof paramsFromId.vid != "undefined") {
uri = _this.videoUriPrefix + paramsFromId.vid;
if(_this.imageServerUri != "") {
imageUri = _this.imageServerUri + paramsFromId.vid;
}
} else {
if (typeof paramsFromId.id != "undefined") {
uri = _this.playlistUriPrefix + paramsFromId.id;	
if(_this.imageServerUri != "") {
imageUri = _this.imageServerUri + paramsFromId.id;
}
}
}

if(imageUri == "") { imageUri = uri; }

if(typeof paramsFromId.freewheelId != "undefined") flashVars = "sid=" + paramsFromId.freewheelId + "&configParams=" + escape(playerArgs);
else flashVars = "configParams=" + escape(playerArgs);

var width = (typeof $this.attr("width") == 'undefined') ? _this.width: $this.attr("width");
var height = (typeof $this.attr("height") == 'undefined') ? _this.height: $this.attr("height");

this.innerHTML = _this.generatePreloadHTML("playerPlaceholder", width, height, uri, flashVars, imageUri.replace("videolist", "content"), paramsFromId.freewheelId,isrc);

// Fix for IE breaking when leaving a page where a player has been loaded with litePlayer
(function(){var s=function(){__flash__removeCallback=function(i,n){if(i)i[n]=null;};window.setTimeout(s,10);};s();})();
});
this.init = function(){};
}

this.init = initPlayer;

this.generatePreloadHTML = function(className, width, height, playerUri, flashVars, imageServerUri, freewheelId,isrc){

var playButtonCenterX = Math.floor(width / 2) - 46;
var playButtonCenterY = Math.floor(height / 2) - 36;

var controlBarTop = height - 31;

var html = '<div style="position: relative; width: ' + width + 'px; height: ' + height + 'px; cursor: pointer;" class="' + className + '" width="' + width + '" height="' + height + '"' + ((freewheelId != null) ? (' fwId="' + freewheelId + '"') : '') + ((isrc != null) ? (' isrc="' + isrc + '"') : '') + ' id="' + playerUri + '" flashVars="' + flashVars + '">';

html += '<img style="position: absolute; top: ' + playButtonCenterY + 'px; left: ' + playButtonCenterX + 'px;" sr' +'c="'+ MTVN.LitePlayer.affilatedHost +'/global/music/player/images/bttn_play-big.png" />';

html += '<img src="http://' + _this.imageServer + '/uri/' + imageServerUri + '?height=' + controlBarTop + '&width=' + width + '" />';

html += '<img style="position: absolute; left: 0px; bottom:0px;" sr' + 'c="'+ MTVN.LitePlayer.affilatedHost + '/global/music/player/images/bttn_play.gif" />';

html += '<div style="position: absolute; left: 31px; bottom: 0px; width: ' + (width - 31) + 'px; height: 31px; background: url(' + MTVN.LitePlayer.affilatedHost + '/global/music/player/images/control-bar.gif) repeat-x top left"> </div>';

html += '</div>';

return html;
}

this.applyClick = function() {
var h = 0;
var w = 0;
var bgcolor = "#000000";
var hostname = window.location.href;

if (hostname.indexOf(".mtvi.com") > -1)
hostname = "http://media.mtvnservices-q.mtvi.com";
else 
hostname = "http://media.mtvnservices.com";

$j(".playerPlaceholder").one("click", function() {
var $this = $j(this);
var id = this.id;
var isrc = $this.attr("isrc");
var flashVars = $this.attr("flashVars");
var fwId = $this.attr("fwId");

if (h == 0){
h = $this.attr("height");
w = $this.attr("width");
}

if (fwId == null || fwId == "") {

if (typeof(freeWheelSSID) != 'undefined')
fwId = freeWheelSSID;
else 
fwId = "MTV_Videos";

}

var embed = "";

if (isrc != null) {

embed += '<embed src="' + 'http://videoplayer.vevo.com/embed/embedded?videoId=';
embed += isrc;
embed += '&playlist=false';
embed += '&autoplay=1';
embed += '&enableDomScan=true';
if (freeWheelSSID == "MTV_Woodies")
embed += '&siteSection=mtvu_2014woodie_mtv.com';
else
embed += '&siteSection=MTV_2013VMAs_mtv.com';
embed += '&endScreen=play';
embed += '&cc=US';
embed += '&cultureName=en-US';
embed += '&cultureIsRTL=False';
embed += '&sbId=14A00605-7DB5-4492-B67B-CB2093BD89DD';
embed += '&playerId=62FF0A5C-0D9E-4AC1-AF04-1D9E97EE3961';
embed += '&playerType=embedded"';
embed += 'type="application/x-shockwave-flash"';
embed += 'wmode="opaque"';
embed += 'name="'+id+'"';
embed += 'id="'+id+'"';
embed += 'width="'+w+'"';
embed += 'height="'+h+'"';
embed += 'bgcolor="'+bgcolor+'"';
embed += 'allowFullscreen="true"';
embed += 'allowScriptAccess="always">';
embed += '</embed>';
}

else {
embed += '<embed src="' + hostname + '/'+id + '/cp~' + flashVars.replace("configParams=", "") +'"';
embed += 'type="application/x-shockwave-flash"';
embed += 'wmode="opaque"';
embed += 'name="'+id+'"';
embed += 'id="'+id+'"';
embed += 'width="'+w+'"';
embed += 'height="'+h+'"';
embed += 'bgcolor="'+bgcolor+'"';
embed += 'allowFullscreen="true"';
embed += 'flashVars="autoPlay=true' + '&sid=' + fwId + '"';
embed += 'allowScriptAccess="always">';
embed += '</embed>';
}
$this.html(embed);

});	
}
}

MTVN.LitePlayer.Article = new function(){

this.init = function(){

var pphDivIdVal = $j(".player-placeholder").attr("id");
if (pphDivIdVal.match("^"+"id") == "id")
MTVN.LitePlayer.playerArgs = "instance=fullepisode";

else MTVN.LitePlayer.playerArgs = "instance=news";
var height = 223;
var width = 256;
var styling = {
'background-color': '#000000',
'height': height + 'px',
'width': width + 'px',
'float':'left',
'margin': '0px 10px 10px 0px',
'position' : 'relative',
'cursor' : 'pointer'
}
$j(".player-placeholder").
css(styling).
attr("height",height).
attr("width",width);

MTVN.LitePlayer.init();
}
}

MTVN.Community = new function(){
this.host = 'http://community.mtv.com';
}

MTVN.Community.Widgets = function(){
this.errorLocation = '';
}

MTVN.Flux = new function(){}

MTVN.Flux.DAAPI = new function(){
this.initArray = new Array();
this.baseUrl = "http://daapi.flux.com/2.0/00001/JSON/D3FCFFFF0002D51D0002FFFFFCD3";

this.init = function(){
if(communityAccess){
jQuery.each(MTVN.Flux.DAAPI.initArray, function (i) {
if(jQuery.isFunction(MTVN.Flux.DAAPI.initArray[i])) MTVN.Flux.DAAPI.initArray[i]();
});

MTVN.Flux.DAAPI.Module.init();

//if(typeof FN!='undefined' && typeof FN.init=="function") FN.init();
}
}

this.sendRequest = function(feed, callback, params) {
var requestUrl = MTVN.Flux.DAAPI.baseUrl + feed;
Flux.Core.executeGetRequest(requestUrl, function(response){
callback(Sys.Serialization.JavaScriptSerializer.deserialize(response), params);
});
}
}

MTVN.Flux.DAAPI.Module = new function(){
var config; // the current config - a regular js object
var container; // the current container - a jquery object
var responses = new Array();	// stores DAAPI responses for a module until all tabs are loaded
var responseCounter = 0;

this.configs = new Array(); // queue of module configs

this.init = function(){
if(MTVN.Flux.DAAPI.Module.configs.length > 0){
config = MTVN.Flux.DAAPI.Module.configs.pop();
MTVN.Flux.DAAPI.Module.create();
}
}

this.create = function(){
if($j("#"+config.containerId).is("*")){
container = $j("#"+config.containerId);
for(var i=0; i < config.tabs.length; i++){
MTVN.Flux.DAAPI.sendRequest(config.tabs[i].url, MTVN.Flux.DAAPI.Module.loadData, {position:i});
}
}
else{
MTVN.Flux.DAAPI.Module.finish();
}
}

this.finish = function(){
responses = new Array();
responseCounter = 0;
MTVN.Flux.DAAPI.Module.init(); // start over for more module configs
}

/* ------------------ */

this.loadData = function(response, paramsObj){
responses[paramsObj.position] = response;
responseCounter++;

if(responseCounter == config.tabs.length){
MTVN.Flux.DAAPI.Module.build();
}
}

this.build = function(){
if(config.tabs.length > 1) container.append(MTVN.Flux.DAAPI.Module.buildTabNav());

for(var i=0; i<responses.length; i++){
var isFirst = (i==0) ? true : false;
container.append(MTVN.Flux.DAAPI.Module.buildTab(responses[i], isFirst));
}

MTVN.Flux.DAAPI.Module.finish();
}

this.buildTabNav = function(){
var ul = $j("<ul/>").addClass("mdl-nav group");

for(var x=0; x < config.tabs.length; x++){
var li = $j("<li/>");
if(x==0) li.addClass("active");

var a = $j("<a/>").attr("href", "#").append(config.tabs[x].title);
a.click(function(){
MTVN.UI.MdlTab.open(this);
return false;
});

li.append(a);
ul.append(li);
}
return ul;
}

this.buildTab = function(response, isFirst){
var items = response.Items;
var itemCounter = 0;

if(items.length > 0){
var tab = $j("<div/>").addClass("tab-content");
if(!isFirst) tab.addClass("hide");

for(var r=1; r <= config.rows; r++){
if(itemCounter < items.length){	
var olClass = "lst lst-photos";
if(config.columns==2) olClass += " lst-photos-two";
else if(config.columns==3) olClass += " lst-photos-three";
else if(config.columns==4) olClass += " lst-photos-four";
else if(config.columns==6) olClass += " lst-photos-six";

var list = $j("<ol/>").addClass(olClass);

for(var c=1; c <= config.columns; c++){
var isLast = (c==config.columns) ? true : false;
if(itemCounter < items.length){
list.append(MTVN.Flux.DAAPI.Module.buildItem(items[itemCounter],isLast));
itemCounter++;
}
}

tab.append(list);
}
}
return tab;
}
}

this.buildItem = function(Entry, isLast){	
var title = $j("<div/>").addClass("title2");
var titleLink = $j("<a/>").attr("href", Entry.DetailUrl);
titleLink.append($j("<img/>").attr("src", Entry.Thumbnails.Medium).addClass("thumb"));

var icon = "";
switch(Entry.Alias){
case "Video":
icon = $j("<span/>").addClass("icon icon-play").append("Video: ");
break;
default: break;
}

if(icon!=="") titleLink.append(icon);
titleLink.append(Entry.Title);
title.append(titleLink);

var li = $j("<li/>");	
if(isLast) li.addClass("last");
li.append(title);
li.append($j("<p/>").addClass("deck").append(Entry.Creator.Title));

var date = MTVN.Flux.DAAPI.Utils.formatDate(Entry.DateCreated);
li.append($j("<p/>").append($j("<span/>").addClass("posted").append("Posted " + date)));

return li;
}
}

MTVN.Flux.DAAPI.Utils = new function(){
this.formatDate = function(date){
var m = date.getMonth() + 1;
var d = date.getDate();
var y = date.getFullYear().toString().substr(2,2);

var formattedDate = m + "/" + d + "/" + y;

return formattedDate;
}
}

// included in ../mtvn.jhtml
// depends on community_flux.jhtml

// Flux Widget Proxy for MTVN
// 

MTVN.Flux.Widgets = new function(){

// you can turn off widgets globally by setting this to false or
// on locally by calling MTVN.Flux.Widgets.enabled = false;
this.enabled = true;

this.create=function(name, options){

if (!(Flux && typeof Flux.createWidget == "function") || !this.enabled) {
return;
}

options = this.getOptionsByName(name, options);
var widgetName = this.getWidgetNameByName(name);
Flux.createWidget(widgetName, options);
}

this.loadAllAttempted = false;
this.loadAll=function() {
if (!MTVN.Flux.Widgets.loadAllAttempted) {
$j(".fluxWidget:not(.delay-load)").each( function() {
MTVN.Flux.Widgets.loadEach(this);
});
MTVN.Flux.Widgets.loadAllAttempted = true;
}
}

this.loadEach = function(el) {
try{
var jsonText = "";
var code = $j(el).find("code");
if (code.get(0).firstChild && code.get(0).firstChild.nodeType == 8) {
jsonText = code.get(0).firstChild.nodeValue;
}

if (jsonText.length > 0 && ($j(el).parent().attr("id").indexOf("scriptPopupWidget_") == -1 || $j("#playerContainer").is("*") || el.toString().indexOf("#ModuleVideoList_") > -1)) {
var obj = eval("(" + jsonText + ")");
$j(el).empty().removeClass("hide");
if (typeof(MTV) != "undefined" && typeof(MTV.Flux) != "undefined" && typeof(MTV.Flux.ucid) != "undefined") {
if (!(MTV.Flux.ucid == "0ABEFFFF01F364840002FFFFBE0A" && obj.args.containerId == "wQuickMenu"))
if (!(MTV.Flux.ucid == "D3FCFFFF0002D51D0002FFFFFCD3" && obj.args.containerId == "wQuickMenu2"))
MTVN.Flux.Widgets.create(obj.widget, obj.args);
}
else
MTVN.Flux.Widgets.create(obj.widget, obj.args);
}
}catch(e){}
}

// set default options based on the name parameter
// passed to the create method
this.getOptionsByName=function(name, options)
{
switch(name) {
case 'Share2' :
var opts = {};
opts.elements = [
{ id: 'Facebook', placeholder: 'service1Element'},
{ id: 'Twitter', placeholder: 'service2Element'},
{ id: 'StumbleUpon', placeholder: 'service3Element'},
{ id: 'More', placeholder: 'moreElement'}
];
opts.overlayElements = [
{ id: 'FeedTab', visible: false },
{ id: 'GroupsTab', visible: false},
{ id: 'OtherTab', visible: true, elements: [
{ id: 'Facebook', visible: true },
{ id: 'Twitter', visible: true },
{ id: 'StumbleUpon', visible: true },
{ id: 'Digg', visible: true },
{ id: 'MySpace', visible: true },
{ id: 'Blogger', visible: true },
{ id: 'GoogleBuzz', visible: true },
{ id: 'Yahoo', visible: true },
{ id: 'Orkut', visible: true },	
{ id: 'Hyves', visible: true }
]
}	
];

return $j.extend(opts, options);
break;
case 'Share' :
var opts = {}
opts.size = 'small';
opts.items = [
{ id: 'share', title: 'Share' },
{ id: 'addToFavorites', title: 'Favorite' }
];
return $j.extend(opts, options);
break;
case 'Rate' : 
var opts = {};
opts.size = 'small';

var ratings_title = 'Rate this';

if (options['ratings_title'] != null){
ratings_title = ratings_title + ' ' + options['ratings_title'];
}

opts.items = [
{ id: 'rate', title: ratings_title }
]; 

return $j.extend(opts, options);
break; 

case 'Statistics' :

var opts = {}
opts.size = 'small';

if ( options.hide_titles ) {
opts.items = [
{ id: 'viewCount', title: '' },
{ id: 'commentCount', title: ''},
{ id: 'contentRating', title: { thumbsUpTitle: '', thumbsDownTitle: '' }} 
];
} else {
opts.items = [
{ id: 'viewCount', title: 'Views' },
{ id: 'commentCount', title: 'Comments'},
{ id: 'contentRating', title: { thumbsUpTitle: 'Rating', thumbsDownTitle: 'Rating' }} 
];
}

if (!options.hide_ratings) {
var ratings_title = options.hide_titles ? '' : 'Rate ' + options['ratings_title'];
options['ratings_title'] = null;
options['hide_ratings'] = null;
opts.items.push({ id: 'rate', title: ratings_title });
}

return $j.extend(opts, options);
break;
case 'Usage' :
var opts = {};
opts.layout = 'horizontal';
opts.size = 'small';
opts.items = [
{ id: 'commentCount', title: 'comments' },
{ id: 'contentRating', title: { thumbsUpTitle: 'Rating', thumbsDownTitle: 'Rating' }} 
];
return $j.extend(opts, options);
break;
case 'Rating' :
var opts = {};
opts.layout = 'horizontal';
opts.size = 'small';
opts.items = [
{ id: 'commentCount', title: 'Comments' },
{ id: 'contentRating', title: { thumbsUpTitle: 'Rating', thumbsDownTitle: 'Rating' }},
{ id: 'rate' },
{ id: 'share', title: 'Share' },
{ id: 'addToFavorites', title: 'Favorite' }
];
return $j.extend(opts, options);
break;
case 'QuickMenu' :
var opts = {};
opts.showFBConnectButton = true;
return $j.extend(opts, options);
break;
default :
return options;
break;
}
}

this.getWidgetNameByName=function(name)
{
switch(name) {
case 'Rating' :
case 'Rate' :
case 'Usage' :
case 'Statistics' :
case 'Share' :
return 'ContentAction';
break;
case 'Share2' :
return 'Share';
break;
default :
return name;
break;
}
}
};

MTVN.Flux.widgetDelayLoad = function(arg) {
if ((typeof(MTV) == "undefined" || typeof(MTV.Flux) == "undefined") || typeof(MTV.Flux.ucid) == "undefined" || arg == "load") {
$j('.fluxWidget.delay-load').each(function(){
var widget = $j(this);

MTVN.UI.InView.register(widget, function() {
MTVN.Flux.Widgets.loadEach(widget);
});	
});
}
}

if (typeof(excludefluxWidgetLoadCall) == "undefined") $j(MTVN.Flux.widgetDelayLoad);

MTVN.Utils = {}

MTVN.Utils.Cookies = new function(){
this.create = function(name,value,days){
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
} else {
var expires = "";
}
document.cookie = name+"="+value+expires+"; path=/";
}

this.read = function(name){
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

this.erase = function(name){
MTVN.Utils.Cookies.create(name,"",-1);
}
}

MTVN.Utils.addSponsoredOverlay = function(imgPath, imgId, width, height, divSelector, trackingCode, leaveH1) {
var imgSrc = imgPath;
if (leaveH1 != true)
$j("#page-header h1").attr("style", "height: 30px;").empty();
$j("<img/>").attr({"id":imgId, "src":imgSrc, "border": 0, "width":width, "height":height}).prependTo(divSelector);
if (trackingCode != null)
$j("<img/>").attr({"src":trackingCode, "border": 0, "width": 1, "height": 1}).appendTo("#page-header");
}

function ThemeScheduler(){ 
this.scheduledTheme = null;
this.makeSchedule = function(){
var xmlString = "<themes> <theme> <start>11 24 2010 00 00</start> <end>11 29 2010 00 00</end> <pageurl>/</pageurl> <url>/sitewide/css/charlie/themes/hp-takeover/thanksgiving/0/theme.jhtml</url> <oparamName>thanksgiving</oparamName> </theme> <theme> <start>01 13 2011 14 57</start> <end>01 13 2011 15 11</end> <pageurl>1654756</pageurl> <url>/sitewide/css/charlie/themes/hp-takeover/thanksgiving/0/theme.jhtml</url> <oparamName>C3Event</oparamName> </theme> <theme> <start>01 14 2011 22 00</start> <end>01 14 2011 22 10</end> <pageurl>/music/unplugglaye/</pageurl> <url>/sitewide/css/charlie/themes/hp-takeover/thanksgiving/0/theme.jhtml</url> <oparamName>unplugged</oparamName> </theme> <!-- SITE BUCKETS --> <!-- MOVIES THEME ONE OFF --> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/shows/after_hours_josh_horowitz/*</pageurl> <url>/sitewide/css/charlie/themes/movies/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!-- MOVIES THEME ONE OFF END --> <!--HUBS--> <theme> <start>12 23 2011 00 00</start> <end>01 01 2012 00 00</end> <pageurl>/</pageurl> <url>/sitewide/css/charlie/themes/buckets/hubs/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>08 07 2013 00 00</end> <pageurl>/music/</pageurl> <url>/sitewide/css/charlie/themes/buckets/hubs/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>08 07 2013 00 00</start> <end>08 08 2013 00 00</end> <pageurl>/music/</pageurl> <url>/sitewide/css/charlie/themes/music/kickass2/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>08 08 2013 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/</pageurl> <url>/sitewide/css/charlie/themes/buckets/hubs/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/ontv/</pageurl> <url>/sitewide/css/charlie/themes/buckets/hubs/default/theme.jhtml</url> <oparamName>default</oparamName> </theme--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/sites/</pageurl> <url>/sitewide/css/charlie/themes/buckets/hubs/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--HUBS END--> <!--UTILITY--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/sitewide/legal/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/utility/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--UTILITY END--> <!--NEWS--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/news/photo/index.jhtml</pageurl> <url>/sitewide/css/charlie/themes/buckets/news/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/news/correspondents/kash/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/news/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/news/correspondents/sway/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/news/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--NEWS END--> <!--MUSIC--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/artists/browse.jhtml*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/artist/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/playlibs/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/live_performances/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/artists/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/artists/most_popular.jhtml*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/photos/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/videos/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/videos/premieres/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/playlists/index.jhtml?contentId=1654462</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/most-popular/music-videos/?category=pop*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/rock/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!-- <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/hiphop/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> --> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/indie/</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/radio/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/music/lyrics/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/music/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--MUSIC END--> <!--SHOWS--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/videos/home.jhtml</pageurl> <url>/sitewide/css/charlie/themes/buckets/shows/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/ontv/schedule/</pageurl> <url>/sitewide/css/charlie/themes/buckets/shows/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/ontv/all/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/shows/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/most-popular/tv-show-videos/?category=full*</pageurl> <url>/sitewide/css/charlie/themes/buckets/shows/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/ontv/castingcall/</pageurl> <url>/sitewide/css/charlie/themes/buckets/shows/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--SHOWS END--> <!--MISC--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/games/arcade/</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/mobile/</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/most-popular/photos/*</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2010 00 01</end> <pageurl>/partners/mtv_tribe/index.jhtml</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/sweepstakes/</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/rss/</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/partners/newsletters/index.jhtml</pageurl> <url>/sitewide/css/charlie/themes/buckets/misc/default/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!--MISC END--> <theme> <start>01 01 2010 00 00</start> <end>01 01 2020 00 00</end> <pageurl>/shows/after_hours_josh_horowitz/series.jhtml</pageurl> <url>/sitewide/css/charlie/themes/movies/theme.jhtml</url> <oparamName>default</oparamName> </theme> <!-- SITE BUCKETS END--> </themes>";
var loc = window.location.pathname+window.location.search; 
var sn = new Object();
window.location.search.replace( new RegExp( "([^?=&]+)(=([^&]*))?", "g" ), function( $0, $1, $2, $3 ){ sn[ $1 ] = $3; } );
var tm = sn['_testTheme'];
var xmlDoc;
try{ //Internet Explorer
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(xmlString);
}
catch(e){
try{ //Firefox, Mozilla, Opera, etc.
var parser=new DOMParser();
xmlDoc=parser.parseFromString(xmlString,"text/xml");
}
catch(e){}
}
var now = new InitCurrentTime().now;
var n = new Date(now);
var cd = new Date();//client date
for(var i=0; i < xmlDoc.getElementsByTagName("theme").length; i++){
var pageurl = xmlDoc.getElementsByTagName("pageurl")[i].childNodes[0].nodeValue;
var localLoc = loc+'';
if(pageurl.indexOf("*") > -1) localLoc = localLoc.substring(0,pageurl.indexOf("*"))+'*'; 
if(localLoc == pageurl){
var cn ={};
var node = xmlDoc.getElementsByTagName("theme")[i];
for(j = 0; j < node.childNodes.length ;j++){
var child = node.childNodes[j];
if(child.nodeType==1){
if(child.childNodes.length)
cn[child.nodeName] = child.childNodes[0].nodeValue;
}
}
if(cn['start'].indexOf(":") < 0){ // mtv format
var sa = cn['start'].split(" "); var ea = cn['end'].split(" ");
cn['start'] = sa[2]+'/'+sa[0]+'/'+sa[1]+' '+ sa[3]+':'+sa[4];
cn['end'] = ea[2]+'/'+ea[0]+'/'+ea[1]+' '+ ea[3]+':'+ea[4];
}
var s = new Date(cn['start']);
var e = new Date(cn['end']);
if(tm==cn['oparamName']||parseInt(tm)==i){ // display datetime for this theme
var h = '<span id="testinfo" style="position:absolute; left:3px; top:3px;padding:3px; background:#ff6600; font-family:helvetica; font-size:11px; z-index:9999999">';
h += cn['start']+'<br>';
h += cn['end']+'<br>';
h += cn['url'];
h += '</span>'
document.write(h);
}
if((n < e && n >= s)||tm==cn['oparamName']||parseInt(tm)==i){
this.scheduledTheme = cn['url'];
if(cn['track']!=null && cn['track']!='' && cn['track']!='undefined'){
var ts = cd.getTime();
var tfp = cn['track'].replace(/\[timestamp\]/, ts);
document.write('<div id="track" style="position:absolute; left:-10; width:1px; height:1px; overflow:hidden;"><img s'+'rc="'+tfp+'" width="1" height="1" border="0"/></div>');
}

break;
}
}
}
}
}
MTVN.DartThemeOverride = function(path){
if (path != 'no_dart_skin')
MTV.setTheme(path);
}
MTVN.writeDartScriptTag = function(testmodeArg){
var testmode1 = "";
var testmode2 = "";
var testmode3 = testmodeArg;
var pageLoc = window.location.pathname;
var doubleclickPath = "";
var category = "";
var tile = "";
if (pageLoc == "/movies/"){
doubleclickPath = 'http://ad.doubleclick.net/adj/mtv.mtvi/atf_j_s/movies/_mn;sec0=movies;sec1=_mn;!category=float;!category=pop;!category=video;!category=expand;!category=pointroll;';
tile = "6";
}
else if (pageLoc == "/music/"){
doubleclickPath = 'http://ad.doubleclick.net/adj/mtv.mtvi/atf_j_s/music/_mn;sec0=music;sec1=_mn;!category=float;!category=pop;!category=video;!category=expand;!category=pointroll;';
tile = "6";
}
else if (pageLoc == "/ontv/"){
doubleclickPath = 'http://ad.doubleclick.net/adj/mtv.mtvi/atf_j_s/shows/_mn;sec0=shows;sec1=_mn;!category=float;!category=pop;!category=video;!category=expand;!category=pointroll;';
tile = "6";
}
else if (pageLoc == "/news/"){
doubleclickPath = 'http://ad.doubleclick.net/adj/mtv.mtvi/atf_j_s/news/_mn;sec0=news;sec1=_mn;!category=float;!category=pop;!category=video;!category=expand;!category=pointroll;';
tile = "6";
}
else{
doubleclickPath = 'http://ad.doubleclick.net/adj/mtv.mtvi/atf_j_s/_hp;sec0=_hp;!category=_hp;!category=float;!category=pop;!category=video;!category=expand;!category=pointroll;';
category = '!category-_hp%7C';
tile = "8";
}
if (testmode3 != null){
testmode1 = "testmode=" + testmode3 + ";";
testmode2 = "%7Ctestmode-" + testmode3 + "%7C";
}
document.write('<script type="' + 'text/javascript');
document.write('"');
document.write(' src="');
//Removed dcopt=ist;, 3/19/12, Evan Rose
//document.write(doubleclickPath + testmode1 + 'pos=atf;tag=adj;mtype=standard;sz=3x3;tile=' + tile + ';demo=D;demo=T;demo=1189;demo=852;demo=845;demo=791;demo=776;dcopt=ist;ord=' + mtvn.btg.util.Math.random(100000000000000000,999999999999999999) + '?');
document.write(doubleclickPath + testmode1 + 'pos=atf;tag=adj;mtype=standard;sz=3x3;tile=' + tile + ';demo=D;demo=T;demo=1189;demo=852;demo=845;demo=791;demo=776;ord=' + parseInt((Math.random()*100000000000000000)+1) + '?');
document.write('">');
document.write('</script>');
}

MTV.loadMemberbarHTML = function(){
MTVN.conf.flux4["ucid"] = "0ABEFFFF01F364840002FFFFBE0A";

// Remove duplicate #wUserBar div on Geek Comics' pages
if($j("#memberbar #wUserBar").size() > 1) {
$j("#memberbar #wUserBar.flux4Widget").remove();
}

$j("#wUserBar").attr("class", "geekFlux4Widget");
$j("#wUserBar").attr("data-widget", "userBar");
$j("#wUserProfile").attr("class", "geekFlux4Widget");
$j("#wUserProfile").attr("data-widget", "userProfile");

//Add selected class
$j('#navlist .toplvl').children('a').each(function(){
var link = this.href;
var loc = window.location.href;
if(link.charAt(link.length-1)=='/'){
link += 'index.jhtml';
}
if(loc.indexOf(link) != -1){
$j(this).parent().addClass('selected');
}
});

if (typeof($j(".geekFlux4Widget").sm4) == "function") $j(".geekFlux4Widget").sm4();
else if (typeof($j(".geekFlux4Widget").flux4) == "function") $j(".geekFlux4Widget").flux4();
}

MTV.loadFluxLibs = function(){
/*
document.getElementsByTagName('script')[document.getElementsByTagName('script').length - 1].setAttribute('id', MTV.Flux.ucid);
$j.ajax({
url: "/sitewide/scripts/FluxLoader.jhtml",
dataType: "script",
async: false
});
$j.ajax({
url: "http://widgets3.flux.com/context/short/" + MTV.Flux.ucid,
dataType: "script",
async: false,
complete: function(){
if (!$j("#playerContainer").is("*")){
MTVN.Flux.Widgets.loadAll();
MTVN.Flux.widgetDelayLoad("load");
}
}
});

*/

$j(function() {
/* Only video pages are using flux4 plugin. The rest of mtv is using sm4 plugin. */

if (typeof($j(".flux4Widget").sm4) == "function") $j(".flux4Widget").sm4();
else if (typeof($j(".flux4Widget").flux4) == "function") $j(".flux4Widget").flux4();

});

}

MTV.load6x6POE = function() {
mtvn.btg.Controller.placeAd({size:'6x6'});
mtvn.btg.Controller.placeAd({size:'3x3'});
}

MTV.loadSurvey = function() {
var pgO = (MTV.Reporting.data.pageName != null) ? MTV.Reporting.data.pageName.replace("onair", "shows") : window.location.pathname;
if (pgO != "/onair/vma/_hp" && !(new RegExp("^/videos/").test(pgO) && pgO != "/videos/main/home.jhtml")) {
mtvn.btg.Controller.placeAd({size:'1x2'});
}
}

MTV.writeMarketingScriptTag = function(t) {
document.write('<scr' + 'ipt type="text/javascript" src="http://conversions.adap.tv/conversion/' + t + '"><\/scr'+'ipt>');
}

MTV.loadMarketingPixel = function(u1, u2, u3, u4) {

var axel = Math.random() + "";
var a = axel * 10000000000000;

if (window.location.pathname.match("/video.jhtml$") == "/video.jhtml")
u1 = "videos";

document.write('<iframe src="http://3658395.fls.doubleclick.net/activityi;src=3658395;type=pages875;cat=mtvmu207;u3=' + u3 + ';u2=' + u2 + ';u1=' + u1 + ';ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');

if (u4 == 'mathtag') {

var mtv_id = 0;

if (u2 == 'nick_cannon_wildnout') {
mtv_id = 242964;
MTV.writeMarketingScriptTag('7NU30D3Gu456FgFocmTOcHYgvsvWMPjO6wTdRUhmiG+s_hG16L_q5w==');
MTV.writeMarketingScriptTag('XZfVNe6fG6Y6PbMk1Sn1cg+CXUz6IFeb');
MTV.writeMarketingScriptTag('j_TDua0xy6lduFLwXp+0XryNqHLHliW5');
MTV.writeMarketingScriptTag('U3_kLO0U+T95wWlJRR9aomDzJLlgY1Ao9ehi8OOvCt0=');
MTV.writeMarketingScriptTag('W9vZvUs3O7Z+mGCKy7SWhLhTTPf9LNuw');
MTV.writeMarketingScriptTag('rm9lsTTpww1Hz2ziFJynASgOdT4vXDZt');
}
else if (u2 == 'snooki_jwoww')
mtv_id = 340795;
else if (u2 == 'awkward')
mtv_id = 340796;
else if (u2 == 'generation_cryo')
mtv_id = 367182;

document.write('<scr' + 'ipt type="text/javascript" src="http://pixel.mathtag.com/event/js?mt_id=' + mtv_id + '&mt_adid=106641&v1=&v2=&v3=&s1=&s2=&s3="><\/scr'+'ipt>');

}

}

function postedDateTime(postedDateTime) {
var utc = new Date(postedDateTime);
var offset = -utc.getTimezoneOffset()*60;
var unixtime = Math.round(utc.getTime()/1000.0)-offset;
var posted = new Date(unixtime*1000);

var postedHour = posted.getHours();

if (postedHour == 12) var postedTime = "12:" + posted.getMinutes() + "pm";
else if (postedHour > 12) var postedTime = (postedHour - 12) + ":" + posted.getMinutes() + "pm";
else if (postedHour == 0) var postedTime = "12:" + posted.getMinutes() + "am";
else var postedTime = postedHour + ":" + posted.getMinutes() + "am";

document.write("Posted " + (posted.getMonth()+1) + "/" + posted.getDate() + "/" + posted.getFullYear() + " " + postedTime + "EST");
}

//This function takes a UTC time without offset and returns the Posted date/time in EST
//usage: postedDateTime("2011-07-19T15:58:17Z") - returns: Posted 7/19/2011 3:58pm EST

/* FLUX4 Core */
MTVN = MTVN || {};
MTVN.conf = MTVN.conf || {};
MTVN.conf.flux4 = MTVN.conf.flux4 || {};
MTVN.conf.sm4 = MTVN.conf.sm4 || {};
MTVN.conf.sm4["ucid"] = "D3FCFFFF0002D51D0002FFFFFCD3";
MTVN.conf.flux4["ucid"] = MTVN.conf.sm4["ucid"];

MTVN.conf.watch = function (obj, prop, handler) { // make this a framework/global function
var currval = obj[prop];
function callback() {
if (obj[prop] != currval) {
var temp = currval;
currval = obj[prop];
handler(temp, currval);
}
}
return callback;
}

MTVN.conf.ucidOnChange = function (oldval, newval) {
//do something
MTVN.conf.sm4["ucid"] = MTVN.conf.flux4["ucid"];
};

var intervalH = setInterval(MTVN.conf.watch(MTVN.conf.flux4, 'ucid', MTVN.conf.ucidOnChange), 100);

MTVN.conf.sm4["widgets"] = {
"userBar": {
"name": "UserBar",
"opts": {
displayMode: 'EmbeddedTop',
elements: [
{
id: 'MyStuff',
showThumbnail:false,
fbPublishing:false
}
/*	,	
{
id: 'ActivityFeed',
settings: { 
updateRequestInterval: 30,
injectSeconds: 10,
maxResults: 8 
}
}*/

]
},
"onLoad": function(widget) {	
//$j("div.publishToTimeline").remove();
setTimeout(function() {
$j("<div/>").attr("id", "activityFeedLink").attr("style", "height:30px;background:#efefef;text-align:right;").appendTo('#memberbar .flux4Widget .userBar .dropdownAnimation .moduleContent');
$j('#activityFeedLink').append('<a style="color:#39BFA8;line-height:30px;padding-right:10px;font-weight:bold;" href="/social/activity.jhtml">view all updates</a>');	
},1000);
}
},

"movieAwardsUserBar": {
"name": "UserBar",
"opts": {
displayMode: 'EmbeddedTop',
elements: [
/*{
id: 'Share'
},*/
{
id: 'MyStuff',
showThumbnail:false,
fbPublishing:false
}

]
}
},

"maShare": {
"name": "Share",
"opts": {
title: "Share this page ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', layout:'button_count', type: 'fblike', colorScheme: 'dark', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews',via: "MTV", count: 'none'} },
{ id: 'GooglePlusOne', count:false}
]
}
},

"userProfile": {
"name": "UserProfile",
"opts": {
ownerHeader: { showChangePhotoButton: true },
guestHeader: { },
tabs: [
{ id: 'Activity', title: 'My Activity', visibility: 'all' },
{ id: 'Following', title: 'My MTV', visibility: 'all' },
{ id: 'Followers', title: 'Followers', visibility: 'owner' },
{ id: 'Account', title: 'Account', visibility: 'owner' }
]
}
},

"followBar": {
"name": "Follow",
"opts": {
title: '',
contentUri: MTVN.conf.sm4.ucid,
layout: 'horizontal',
elements: [{ id: 'facebook', layout:'button_count'}, { id: 'twitter', width:'130px'}, { id: 'flux', title: 'My MTV', showCounter: false}]
},
"onLoad": function(widget) {
$j("<div/>").attr("id", "wFollow").attr("class", "mL10p").prependTo('.group-a');
$j('#wFollowContent .serviceList').append('<div class="followService copy">add show updates to your feed</div>');
$j('#wFollowContent').appendTo('#wFollow');

}
},

"followVideoContent": {
"name": "Follow",
"opts": {
title: '',
followParent: true,
contentUri: MTVN.conf.sm4.ucid,
layout: 'horizontal',
elements: [{ id: 'facebook', layout:'button_count'}, { id: 'twitter', width:'130px'}, { id: 'flux', title: 'My MTV', showCounter: false}]
},
"onLoad": function(widget) {
if($j('#seriesLinks div').length > 0) {
$j('#wFollow .serviceList').append('<div class="followService copy">add updates from this show to your feed</div>')

if(!($j('#seriesLinks .simple-list li').size() > 1)) {
$j('#wFollow').appendTo('#seriesLinks .simple-list li');
} else {$j('#wFollow').remove();}
}
}
},

"followContent": {
"name": "Follow",
"opts": {
elements: [{ id: 'facebook', layout:'button_count'} , { id: 'twitter', width: '130px' }, { id: 'flux', title: 'My MTV'}]
}
},

"followShowOverlay": {
"name": "Follow",
"opts": {
title:"", layout: 'horizontal', elements: [{ id: 'flux', title: 'My MTV' }] 
}
},

"activity": {
"name": "ActivityFeed",
"opts": {
title: "",
updateRequestInterval: 30,
injectItems: 2,
injectSeconds: 10,
maxResults: 15,
showPager: true,
paginationType: 'pages',
filterVisible: false,
sortingVisible:false,
defaultFilter: 'Comments',
enableComments: true,
topOrder: true,
showPostToFacebook: false,
commentMessage: 'Join the conversation ...', 
showPopularActivities: true,
popularActivitiesFilter: 'CommentContent',
popularActivitiesCount: 3,
popularHeaderText: 'Top Comments'
},
"onLoad": function(widget) {
setTimeout(function() {
$j('ol.popularActivitiesList .repliesContainer .replyLink').each(function(index) {
$j(this).html('Reply');
}),	
$j('ol.activityList .repliesContainer .replyLink').each(function(index) {
$j(this).html('Reply');
})	
},1000);
}
},

"videoDetailActivity": {
"name": "ActivityFeed",
"opts": {
title: "",
injectItems: 2,
injectSeconds: 10,
maxResults: 15,
showPager: true,
paginationType: "loadMore",
filterVisible: false,
sortingVisible:false,
defaultFilter: 'Comments',
enableComments: true,
topOrder: true,
showPostToFacebook: false,
commentMessage: 'Join the conversation ...', 
showPopularActivities: false
},
"onLoad": function(widget) {
setTimeout(function() {
$j('ol.popularActivitiesList .repliesContainer .replyLink').each(function(index) {
$j(this).html('Reply');
}),	
$j('ol.activityList .repliesContainer .replyLink').each(function(index) {
$j(this).html('Reply');
})
$j('.activityFeed .pagerMore').html('Load More');
},500);
}
},

"comments": {
"name": "Comments",
"opts": {
title: "",
maxResults: 15,
includeChildren: true,
enableComments: true,
commentMessage: 'Add comment',
includeGuestActivities: true,
popularActivitiesCount: 3,
showPopularActivities: false,
popularHeaderText: 'Top Activities'
}
},

"activityFeed": {
"name": "ActivityFeed",
"opts": {
title: "",
updateRequestInterval: 30,
injectItems: 2,
injectSeconds: 10,
maxResults: 15,
showPager: true,
paginationType: 'pages',
topOrder: true,
showParentAddedChild: true, 
contentTitleLength: 140,
showPostToFacebook: false,
commentMessage: 'Join the conversation ...'
},
"onLoad": function(widget) {
setTimeout(function() {
$j('ol.activityList .repliesContainer .replyLink').each(function(index) {
$j(this).html('Reply');
})	
},1000);
}
},

"eventShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', layout:'button_count', type: 'fblike', colorScheme: 'light', send: true },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews',via: "MTV" } },
]
}
},

"photoShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', layout:'button_count', type: 'fblike', colorScheme: 'dark', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews',via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
//{ id: 'Tumblr' },
{ id: 'More', title: 'More&raquo;' }
]
}
},

"gifShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Tumblr' },
{ id: 'Facebook', layout:'button_count', type: 'fblike', colorScheme: 'dark', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews',via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
]
}
},

"photoShareNEW": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', layout:'button_count', type: 'fblike', colorScheme: 'dark', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews',via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
]
}
},

"videoShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', type: 'fblike', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
],
overlayElements: {
copyLinkEnabled: true,
tabs: [
{ id: 'SocialTab', visible: true,
elements: [
{ id: 'Facebook', type: "fblike", send: true },
{ id: 'Twitter', originalButton: true },
{ id: 'GooglePlusOne' },
{ id: 'StumbleUpon', originalButton: true },
{ id: 'Digg' },
{ id: 'Tumblr', originalButton: true },
{ id: 'Reddit' },
{ id: 'Blogger' },
{ id: 'MySpace' },
{ id: 'StudiVZ' },
{ id: 'Orkut' },
{ id: 'Hyves' },
{ id: 'Tuenti' },
{ id: 'Windowslive' },
{ id: 'Pinterest' }
]
},
{ id: 'EmailTab', visible: true },
{ id: 'EmbedTab', visible: false },
{ id: 'FollowersTab', visible: true }
]
}
},
"onLoad": function(widget) {
/*if(MTVN.rand_mbox_Num<=20){
widget.onShared = function (method, contentUri) {
mboxUpdate('GDM_SocialTest_Empty','click=true');
} 
}*/
}
},

"twitterVideoShare": {
"name": "Share",
"opts": {
title: " ",
"cacheDuration": 60000,
layout: 'horizontal',
elements: [
{ id: 'Facebook', type: 'fblike', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
],
overlayElements: {
copyLinkEnabled: true,
tabs: [
{ id: 'SocialTab', visible: true,
elements: [
{ id: 'Facebook', type: "fblike", send: true },
{ id: 'Twitter', originalButton: true },
{ id: 'GooglePlusOne' },
{ id: 'StumbleUpon', originalButton: true },
{ id: 'Digg' },
{ id: 'Tumblr', originalButton: true },
{ id: 'Reddit' },
{ id: 'Blogger' },
{ id: 'MySpace' },
{ id: 'StudiVZ' },
{ id: 'Orkut' },
{ id: 'Hyves' },
{ id: 'Tuenti' },
{ id: 'Windowslive' },
{ id: 'Pinterest' }
]
},
{ id: 'EmailTab', visible: true },
{ id: 'EmbedTab', visible: false },
{ id: 'FollowersTab', visible: true }
]
}
},
"onLoad": function(widget) {
/*if(MTVN.rand_mbox_Num<=20){
widget.onShared = function (method, contentUri) {
mboxUpdate('GDM_SocialTest_Empty','click=true');
} 
}*/
}
},

"videoGSPShareVert": {
"name": "Share",
"opts": {
title: " ",
layout: 'vertical',
elements: [
{ id: 'Facebook', type: 'fblike', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
]
}
},

"videoShareVert": {
"name": "Share",
"opts": {
title: " ",
layout: 'vertical',
elements: [
{ id: 'Facebook', type: 'fblike', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
]
},
"onLoad": function(widget) {

var fixedScroll = function() {

var window_top = jQuery(window).scrollTop();
var player_top = jQuery('#playerContainer').offset().top;
var widget_left = jQuery('#playerContainer').offset().left - 100;
var socialWidget = jQuery('#social_widget_3');

if (window_top > player_top) {
socialWidget.css({position:"fixed",top:'20px',left: widget_left+'px' })
} else {
socialWidget.css({position:'fixed',top:'',left: widget_left+'px' })
}
};
window.onscroll = fixedScroll;
fixedScroll();

/*if(MTVN.rand_mbox_Num<=20){
widget.onShared = function (method, contentUri) {
mboxUpdate('GDM_SocialTest_Empty','click=true');
} 
}*/
}
},

"vevoVideoShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', type: 'fblike', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTV" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'More', title: 'More&raquo;' }
],
overlayElements: {
copyLinkEnabled: true,
tabs: [
{ id: 'SocialTab', visible: true,
elements: [
{ id: 'Facebook', type: "fblike", send: true },
{ id: 'Twitter', originalButton: true },
{ id: 'GooglePlusOne' },
{ id: 'StumbleUpon', originalButton: true },
{ id: 'Digg' },
{ id: 'Tumblr', originalButton: true },
{ id: 'Reddit' },
{ id: 'Blogger' },
{ id: 'MySpace' },
{ id: 'StudiVZ' },
{ id: 'Orkut' },
{ id: 'Hyves' },
{ id: 'Tuenti' },
{ id: 'Windowslive' },
{ id: 'Pinterest' }
]
},
{ id: 'EmailTab', visible: true },
{ id: 'EmbedTab', visible: false },
{ id: 'FollowersTab', visible: true }
]
}
}
},

"flag": {
"name": "Flag",
"onLoad": function(widget) {
//alert("Flag widget created");
}
},

"articleShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
elements: [
{ id: 'Facebook', layout:'button_count', type: 'fblike', action: 'recommend', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTVNews" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'MyEmail' },
{ id: 'More', title: 'More&raquo;' }
]
}
},

"articleFooterShare": {
"name": "Share",
"opts": {
title: " ",
layout: 'horizontal',
containerId: 'articleShareFooter',
elements: [
{ id: 'Facebook', layout:'button_count', type: 'fblike', action: 'recommend', colorScheme: 'light', send: false },
{ id: 'Twitter', originalButton: true, urlSettings: { related: 'mtvnews', via: "MTVNews" } },
{ id: 'GooglePlusOne', count:false},	
{ id: 'MyEmail' },
{ id: 'More', title: 'More&raquo;' }
]
}
},

"facebookTimeline": {
"name": "FacebookTimeline",
"opts": {
containerId: 'facebookTimeline-widget'
},
"onLoad": function(widget) {
widget.postReadToTimeline('news.reads','article', 'onTime', 5);
}
},

"facebookFlipbookTimeline": {
"name": "FacebookTimeline",
"opts": {
containerId: 'facebookTimeline-widget'
},
"onLoad": function(widget) {
widget.postReadToTimeline('mtvi_com:view','flipbook', 'onTime', 5);
}
},

"facebookVideoTimeline": {
"name": "FacebookTimeline",
"opts": {
containerId: 'facebookTimeline-widget'
},
"onLoad": function(widget) {
widget.postReadToTimeline('video.watches','video', 'onTime', 10);
}
},

"badges": {
"name": "ActivityFeed",
"opts": {
title: 'Recent Badges',
mode: 'mini',
updateRequestInterval: 30,
injectItems: 1,
injectSeconds: 20,
maxResults: 3,
showPager: false,
filterVisible: false,
defaultFilter: 'Badges', 
enableComments: false
}
}
};

<!--droplet src="/global/flux/js/jquery-flux4/0.11/flux4.js" /-->	
; (function ($, w) {

if ( $.fn.sm4 ) {	// do not redefine if the plugin is already there
return false;
}

var conf, 
loading,
logMessage,
sm4Callbacks = [],
extant = {}, 
_guid = 1, 
version = "0.2.2";

function log(str) {

logMessage = "SM4 Plugin: " + str;

if ( !debugMode(document.location.search) ) {
return false;
}

if ( typeof console !== 'undefined' ) {
console.log( logMessage );
}

}

// check to see if we are in debug mode
var debugFlag = false; // flag to maintain debug mode

var debugMode = function ( url ) {

if (typeof url === "boolean") {
debugFlag = url;	
return;
} 

if (debugFlag === true) {
return true;
}

return url.match(/[\?|&]?enableWidgetsDebug=true[&]?/);

};	

var loadCore = function () {

var core =	(conf.staging) ? 
"http://widgets4.flux-staging.com/Core":
"http://widgets4.flux.com/Core";

var qs = [];

if (window.jQuery) {
qs.push("includeJquery=false");
}

if (conf.FBJDK) {
qs.push("loadFacebookJDK=false");
}

if (debugMode(document.location.search)) {
qs.push("enableWidgetsDebug=true");
}

if (qs.length) {
core = core + "?" + qs.join("&");
}

loading = true;

w.Flux4 = w.Flux4 || {};

w.Flux4.addEventListener = w.Flux4.addEventListener || function() {

var args = Array.prototype.slice.call(arguments);

sm4Callbacks.push(function() { w.Flux4.addEventListener.apply(undefined, args); });
};

w.Flux4.eventListeners = w.Flux4.eventListeners || {};

if (w.Flux4.eventListeners.coreInitialized) {
sm4Callbacks.push(w.Flux4.eventListeners.coreInitialized);
}

w.Flux4.eventListeners.coreInitialized = function () {

log("coreInitialized event");

if (sm4Callbacks.length > 0) {
for (var i = 0; i < sm4Callbacks.length; i++) {
sm4Callbacks[i].call(undefined, window.Flux4);
}
sm4Callbacks = [];

}

$("*").trigger("sm4:coreLoad", [true]);
loading = false;

};

var s = document.createElement("script"),
t = document.getElementsByTagName("script")[0];

s.setAttribute('id', conf.ucid);
s.setAttribute('widgets4Debug', "true");

if (conf.culture) {
s.setAttribute('culture', conf.culture);	
}

s.src = core;

if (conf.testing) {
conf.testing({
src: s.src,
id: s.getAttribute("id"),
widgets4Debug: s.getAttribute("widgets4Debug"),
culture: s.getAttribute("culture")	
});
} else {
t.parentNode.insertBefore(s, t);	
}	

};

var loadElement = function (element) {

var el = $(element);

if ( !el.data( "_guid" )) {
el.data( "_guid", _guid++ );
}

var wGuid = el.data( "_guid" );
var wName = el.data( "widget" );
var wContentUri = el.data( "contenturi" );

if ( conf.widgets[wName] ) {
var opts = $.extend({}, conf.widgets[wName].opts);

if ( wContentUri ) {
opts.contentUri = wContentUri;
opts.contentId = wContentUri;
}

if ( extant[wGuid] !== wName + "|" + (wContentUri || _guid) ) {

extant[wGuid] = wName + "|" + (wContentUri || _guid);

el.empty();	

el.one( "sm4:widget:create", function() {

log("creating: " + conf.widgets[wName].name + " with opts: ");

if ( typeof JSON === 'undefined' ) {
log(opts);
} else {
log(JSON.stringify(opts, null, 2));
}
opts.container = element;

w.Flux4.createWidget( conf.widgets[wName].name, opts, function (widget) {

if ( conf.widgets[wName].onLoad ) {
conf.widgets[wName].onLoad(widget);	
}

log( conf.widgets[wName].name + " success" );
el.trigger( "sm4:widget:load", [widget, true, conf.widgets[wName].name, opts] );
});	

} );

el.trigger( "sm4:widget:create", [conf.widgets[wName].name, opts] );

} else {	

log( conf.widgets[wName].name + " fail" );
el.trigger( "sm4:widget:failed", [false, true, conf.widgets[wName].name, opts] );

}
} 
};

$.fn.sm4 = function (cmd) {

var filtered;	

if (cmd === "debug") {

return {
version: version,
debugMode: debugMode,
logMessage: logMessage,
sm4Callbacks: sm4Callbacks
};

}

if (typeof cmd === "function") {

if (window.Flux4 && window.Flux4.createWidget) {
cmd.call(undefined, window.Flux4);
} else {
sm4Callbacks.push(cmd);
}

return this;

}

if (!cmd) {	
if (w.MTVN && w.MTVN.conf && w.MTVN.conf.sm4) {
conf = w.MTVN.conf.sm4;
} else {
log("no configuration");
return this;
}

if ( !conf.ucid ) {
log("no ucid configured");
return this;
}

filtered = this.not( function () {
return conf.widgets[$(this).data("widget")] ? false : true;
});

if ( filtered.length ) {
if ( w.Flux4 && w.Flux4.createWidget) {

$("*").trigger("sm4:coreLoad", [true]);

filtered.each( function () {
loadElement( this );
} );

} else {

filtered.one( "sm4:coreLoad", function () {
loadElement( this );
});

if ( !loading ) {
loadCore();
}	
}

} 

return this;
}	
};

})( window.jQuery, window );

function loadimgcarousel(obj){
var carouselDiv= $j(obj).parents('.h-wrap').parent();
$j(carouselDiv).find('img').filter(':[longdesc]').each(function(i){
var tmpLongDesc = $j(this).attr("longdesc");
$j(this).attr("src",tmpLongDesc)[0].removeAttribute("longdesc",0);
});
}
function loadnewsimgcarousel(obj){
var newActiveTabId = obj.parentNode.id;
var newActivePageId = newActiveTabId.substring(0, newActiveTabId.indexOf("Tab"));
$j("#"+newActivePageId+" img").filter(':[longdesc]').each(function(i){
var tmpLongDesc = $j(this).attr("longdesc");
$j(this).attr("src",tmpLongDesc)[0].removeAttribute("longdesc",0);
});
}	
var feo_switch=true;
FEO = new function(){
this.channelId='1';
}
var deferMarqueeImageLoad = true;
$j(window).load(function(){
if(typeof(deferMarqueeImageLoad) != 'undefined' && deferMarqueeImageLoad){
$j(".marquee_img_vertical img").filter(':[longdesc]').each(function(i){
var tmpLongDesc = $j(this).attr("longdesc");
$j(this).attr("src",tmpLongDesc)[0].removeAttribute("longdesc",0);
});
$j(".marquee_img_horizontal img").filter(':[longdesc]').each(function(i){
var tmpLongDesc = $j(this).attr("longdesc");
$j(this).attr("src",tmpLongDesc)[0].removeAttribute("longdesc",0);
});
}
});

MTVN.backloc = MTVN.Utils.Cookies.read('mtvnbackloc')+'';
MTVN.Utils.Cookies.create('mtvnbackloc',window.location.href+'');
