// jQuery to bmQuery Adapter
(function($){window.bmQuery=$;})(jQuery);
(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},h=0,c=0,l=[];function g(e,d,g,i){var c={data:i||(d?d.data:{}),_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};e&&a.extend(c,e,{nodes:[],parent:d});if(g){c.tmpl=g;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++h;(l.length?f:b)[h]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a.fn[d].apply(a(i[h]),k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,l,j){if(d[0]&&d[0].nodeType){var f=a.makeArray(arguments),g=d.length,i=0,h;while(i<g&&!(h=a.data(d[i++],"tmplItem")));if(g>1)f[0]=[a.makeArray(d)];if(h&&c)f[2]=function(b){a.tmpl.afterManip(this,b,j)};r.apply(this,f)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var j,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(i(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);j=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(i(c,null,j)):j},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function i(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:i(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=j(c).concat(b);if(d)b=b.concat(j(d))});return b?b:j(c)}function j(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,j,d,b,c,e){var i=a.tmpl.tag[j],h,f,g;if(!i)throw"Template command not found: "+j;h=i._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=k(b);e=e?","+k(e)+")":c?")":"";f=c?b.indexOf(".")>-1?b+c:"("+b+").call($item"+e:b;g=c?f:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else g=f=h.$1||"null";d=k(d);return"');"+i[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(g).split("$1").join(f).split("$2").join(d?d.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(d,c,b,a){a=a?","+a+")":b?")":"";return a?"("+c+").call($item"+a:d}):h.$2||"")+"_.push('"})+"');}return _;")}function n(c,b){c._wrap=i(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function k(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,i;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(i=j.length-1;i>=0;i--)m(j[i]);m(k)}function m(j){var p,i=j,k,e,m;if(m=j.getAttribute(d)){while(i.parentNode&&(i=i.parentNode).nodeType===1&&!(p=i.getAttribute(d)));if(p!==m){i=i.parentNode?i.nodeType===11?0:i.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[i]||f[i],null,true);e.key=++h;b[h]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;i=a.data(j.parentNode,"tmplItem");i=i?i.key:0}if(e){k=e;while(k&&k.key!=i){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent,null,true)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(bmQuery);// jQuery onPath Plugin 1.2.0 by JT
(function($){$.onPath=function(paths){if(!(paths instanceof Array)){paths=paths.replace(/\ *,\ */ig,',').split(',');}var path=location.pathname;for(var i=0;i<paths.length;i++){paths[i]=paths[i].replace(/(\?|#)[^,]*/ig,'');if(paths[i].length>1&&paths[i].indexOf('/')==0&&path.indexOf(paths[i])==0){return true;}else if(paths[i].length>1&&!paths[i].indexOf('/')==0&&path.indexOf(paths[i])!=-1){return true;}else if(paths[i]==path){return true;}}var domainName=location.hostname;for(var i=0;i<paths.length;i++){paths[i]=paths[i].replace(/(\?|#)[^,]*/ig,'');if(domainName.indexOf(paths[i])!==-1){return true;}}return false;};})(bmQuery);// jQuery getQueryParam Plugin 1.0.0 by JT
(function($){$.getQueryParam=function(param){var pairs=location.search.substring(1).split('&');for(var i=0;i<pairs.length;i++){var params=pairs[i].split('=');if(params[0]==param){return params[1]||'';}}return undefined;};})(bmQuery);
// jQuery Cookie Plugin 1.0 by Klaus Hartl (stilbuero.de)
(function($){$.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=$.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};})(bmQuery);
// jQuery available Plugin 1.6.1 (20101220)
// By John Terenzio | http://plugins.jquery.com/project/available | MIT License
(function($){var queue=[],interval,check=function(){for(var i=0;i<queue.length;i++){if($(queue[i][0])[0]&&(queue[i][2]||$(queue[i][0]).next()[0]||$.isReady)){try{queue[i][1].apply($(queue[i][0]).eq(0));}catch(e){if(typeof console!='undefined'){console.log(e);}}queue.splice(i,1);i--;}}if(!queue.length||$.isReady){interval=clearInterval(interval);}};$.fn.available=function(fn,turbo){turbo=turbo||false;queue.push([this.selector,fn,turbo]);if(!interval){interval=setInterval(check,1);}return this;};})(bmQuery);
// Buzzmedia fire Plugin 1.0.1 by JT/DLT
(function($){$.bmLib=$.bmLib||{};$.bmLib.fire=function(src){window.ord=window.ord||Math.floor(Math.random()*10000000000000000);if(!(src instanceof Array)){src=src.replace(/\ *,\ */ig,',').split(',http')}for(var i=0;i<src.length;i++){src[i]=src[i].replace(/^(s?:\/\/)/i,'http$1').replace(/ord=(\?$|$)/i,'ord='+window.ord+'?');if((/\/.*\.(js|php|aspx?)($|\?.*)/i).test(src[i])){$('head').append('<scr'+'ipt type="text/javascript" src="'+src[i]+'"></scr'+'ipt>')}else{(new Image()).src=src[i]}}};$.bmLib.fireBuzzTrack=function(gid,site,type,action){window.ord=window.ord||Math.floor(Math.random()*10000000000000000);var src='http://img.cms.celebuzz.com:8080/pixel.gif?gid='+gid+'&site='+site+'&type='+type+'&action='+action+'&url='+encodeURIComponent(document.URL)+'&rand='+window.ord+'&ref='+encodeURIComponent(document.referrer)+'&cc=';new Image().src=src}})(bmQuery);
//jQuery hashchange event - v1.3 - 7/21/2010 - http://benalman.com/projects/jquery-hashchange-plugin/
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(bmQuery,this);
// jQuery writeCapture Plugin by JC
(function($,global,doEvil){$=$||(function(bmQuery){return{ajax:bmQuery.ajax,$:function(s){return bmQuery(s)[0]},replaceWith:function(selector,content){var el=bmQuery(selector)[0];var next=el.nextSibling,parent=el.parentNode;bmQuery(el).remove();if(next){bmQuery(next).before(content)}else{bmQuery(parent).append(content)}}}})(global.bmQuery);function each(array,fn){for(var i=0,len=array.length;i<len;i++){fn(array[i])}}function isFunction(o){return Object.prototype.toString.call(o)==="[object Function]"}function isString(o){return Object.prototype.toString.call(o)==="[object String]"}function slice(array,start,end){return Array.prototype.slice.call(array,start||0,end||array&&array.length)}function any(array,fn){var result=false;each(array,check);function check(it){return!(result=fn(it))}return result}function defer(ctx,name){setTimeout(function(){ctx[name]()},1)}function Q(parent){this._queue=[];this._children=[];this._parent=parent;if(parent)parent._register(this)}Q.prototype={_paused:false,push:function(task){this._queue.push(task);this._next()},pause:function(){this._paused=true},resume:function(){this._paused=false;this._next(true)},_register:function(child){this._children.push(child)},_isPaused:function(){return this._paused||any(this._children,isPaused);function isPaused(c){return c._isPaused()}},_next:function(resuming){var next;if(!this._isPaused()){if((next=this._queue.shift())){next();this._next()}else if(this._parent){if(resuming){defer(this._parent,'_next')}else{this._parent._next()}}}}};function capture(){var state={write:global.document.write,writeln:global.document.writeln,getEl:global.document.getElementById,tempEls:[],finish:function(){each(this.tempEls,function(it){var tempHTML='';if(it.el.contentWindow!==undefined&&it.el.contentWindow.document!==undefined&&it.el.contentWindow.document.html!==''){tempHTML=it.el.contentWindow.document.html;var test=document.getElementById(it.id);test.contentWindow.document.open();test.contentWindow.document.write(tempHTML);window.setTimeout(function(){try{test.contentWindow.document.close()}catch(e){}},2000)}var real=document.getElementById(it.id);each(it.el.childNodes,function(it){real.appendChild(it)})})},out:''};global.document.write=replacementWrite;global.document.writeln=replacementWriteln;nsrDocumentWrite=replacementWrite;srDocumentWrite=replacementWrite;if(self.proxyGetElementById){global.document.getElementById=getReplacmentEl}function replacementWrite(s){if(s.indexOf('prev_slotnames')!==-1){var urlparts=s.split('?');if(urlparts.length>=2){var prefix=encodeURIComponent('prev_slotnames')+'=';var pars=urlparts[1].split(/[&;]/g);for(var i=pars.length;i-->0;){if(pars[i].lastIndexOf(prefix,0)!==-1){pars.splice(i,1)}}s=urlparts[0]+'?'+pars.join('&')}}state.out+=s}function replacementWriteln(s){state.out+=s+'\n'}function makeTemp(id){var t=global.document.createElement('div');t.id=id;t.contentWindow={document:{open:function(){},html:'',write:function(str){this.html=str},close:function(){}}};state.tempEls.push({id:id,el:t});return t}function getReplacmentEl(id){var result=state.getEl.call(global.document,id);return result||makeTemp(id)}return state}function uncapture(state){if(self.proxyGetElementById){global.document.getElementById=state.getEl}return state.out}function clean(code){return code&&code.replace(/^\s*<!(\[CDATA\[|--)/,'').replace(/(\]\]|--)>\s*$/,'')}function ignore(){}function doLog(code,error){console.error("Error",error,"executing code:",code)}var logError=isFunction(global.console&&console.error)?doLog:ignore;function captureWrite(code){var state=capture();try{doEvil(clean(code))}catch(e){logError(code,e)}finally{uncapture(state)}return state}function isXDomain(src){var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(src);return parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)}function attrPattern(name){return new RegExp(name+'=(?:(["\'])(.*?)\\1|([^\\s>]+))','i')}function matchAttr(name){var regex=attrPattern(name);return function(tag){var match=regex.exec(tag)||[];return match[2]||match[3]}}var SCRIPT_TAGS=/(<script[\s\S]*?>)([\s\S]*?)<\/script>/ig,SRC_REGEX=attrPattern('src'),SRC_ATTR=matchAttr('src'),TYPE_ATTR=matchAttr('type'),LANG_ATTR=matchAttr('language'),GLOBAL="__document_write_ajax_callbacks__",DIV_PREFIX="__document_write_ajax_div-",TEMPLATE="window['"+GLOBAL+"']['%d']();",callbacks=global[GLOBAL]={},global_id=0;function nextId(){return(++global_id).toString()}function normalizeOptions(options,callback){var done;if(isFunction(options)){done=options;options=null}options=options||{};done=done||options&&options.done;options.done=callback?function(){callback(done)}:done;return options}var GLOBAL_Q=new Q();function sanitize(html,options,parentQ){var queue=parentQ&&new Q(parentQ)||GLOBAL_Q;options=normalizeOptions(options);var done=options.done;var doneHtml='';if(isFunction(done)){var doneId=nextId();callbacks[doneId]=function(){queue.push(done);delete callbacks[doneId]};doneHtml='<script type="text/javascript">'+TEMPLATE.replace(/%d/,doneId)+'</script>'}return html.replace(SCRIPT_TAGS,proxyTag)+doneHtml;function proxyTag(element,openTag,code){var src=SRC_ATTR(openTag),type=TYPE_ATTR(openTag)||'',lang=LANG_ATTR(openTag)||'',isJs=(!type&&!lang)||type.toLowerCase().indexOf('javascript')!==-1||lang.toLowerCase().indexOf('javascript')!==-1;var id=nextId(),divId=DIV_PREFIX+id;var run;if(!isJs){return element}if(src&&isFunction(self.fixUrls)){src=self.fixUrls(src)}callbacks[id]=queueScript;function queueScript(){queue.push(run);delete callbacks[id]}if(src){openTag=openTag.replace(SRC_REGEX,'');if(isXDomain(src)){run=loadXDomain}else{if(options.asyncAll){run=loadAsync()}else{run=loadSync}}}else{run=runInline}function runInline(){captureHtml(code)}function loadSync(){$.ajax({url:src,type:'GET',async:false,success:captureHtml})}function logAjaxError(xhr,status,error){logError("<XHR for "+src+">",error);queue.resume()}function loadAsync(){var ready,scriptText;function captureAndResume(script,status){if(!ready){scriptText=script;return}try{captureHtml(script)}catch(e){logError(script,e)}finally{queue.resume()}}$.ajax({url:src,type:'GET',async:true,success:captureAndResume,error:logAjaxError});return function(){ready=true;if(scriptText){captureHtml(scriptText)}else{queue.pause()}}}function loadXDomain(cb){var state=capture();queue.pause();$.ajax({url:src,type:'GET',dataType:"script",success:captureAndResume,error:logAjaxError});function captureAndResume(xhr,st,error){html(uncapture(state));state.finish();queue.resume()}}function captureHtml(script){var state=captureWrite(script);html(state.out);state.finish()}function html(markup){$.replaceWith('#'+divId,sanitize(markup,null,queue))}return openTag+TEMPLATE.replace(/%d/,id)+'</script><div style="" id="'+divId+'"></div>'}}function sanitizeSerial(fragments,done){var queue=GLOBAL_Q;each(fragments,function(f){queue.push(run);function run(){f.action(sanitize(f.html,f.options,queue),f)}});if(done){queue.push(done)}}var name='writeCapture';var self=global[name]={_original:global[name],fixUrls:function(src){return src.replace(/&amp;/g,'&')},noConflict:function(){global[name]=this._original;return this},proxyGetElementById:false,_forTest:{Q:Q,$:$,matchAttr:matchAttr,slice:slice,capture:capture,uncapture:uncapture,captureWrite:captureWrite},replaceWith:function(selector,content,options){$.replaceWith(selector,sanitize(content,options))},html:function(selector,content,options){var el=$.$(selector);el.innerHTML='<span/>';$.replaceWith(el.firstChild,sanitize(content,options))},load:function(selector,url,options){$.ajax({url:url,type:"GET",success:function(content){self.html(selector,content,options)}})},sanitize:sanitize,sanitizeSerial:sanitizeSerial}})(this.writeCaptureSupport,this,eval);(function($,wc,noop){var methods={html:html};$.each(['append','prepend','after','before','wrap','wrapAll','replaceWith','wrapInner'],function(){methods[this]=makeMethod(this)});function isString(s){return Object.prototype.toString.call(s)=="[object String]"}function executeMethod(method,content,options,cb){if(arguments.length==0)return proxyMethods.call(this);var m=methods[method];if(method=='load'){return load.call(this,content,options,cb)}if(!m)error(method);return doEach.call(this,content,options,m)}$.fn.writeCapture=executeMethod;var PROXIED='__writeCaptureJsProxied-fghebd__';function proxyMethods(){if(this[PROXIED])return this;var jq=this;function F(){var _this=this,sanitizing=false;this[PROXIED]=true;$.each(methods,function(method){var _super=jq[method];if(!_super)return;_this[method]=function(content,options,cb){if(!sanitizing&&isString(content)){try{sanitizing=true;return executeMethod.call(_this,method,content,options,cb)}finally{sanitizing=false}}return _super.apply(_this,arguments)}});this.pushStack=function(){return proxyMethods.call(jq.pushStack.apply(_this,arguments))};this.endCapture=function(){return jq}}F.prototype=jq;return new F()}function doEach(content,options,action){var done,self=this;if(options&&options.done){done=options.done;delete options.done}else if($.isFunction(options)){done=options;options=null}wc.sanitizeSerial($.map(this,function(el){return{html:content,options:options,action:function(text){action.call(el,text)}}}),done&&function(){done.call(self)}||done);return this}function html(safe){$(this).html(safe)}function makeMethod(method){return function(safe){$(this)[method](safe)}}function load(url,options,callback){var self=this,selector,off=url.indexOf(' ');if(off>=0){selector=url.slice(off,url.length);url=url.slice(0,off)}if($.isFunction(callback)){options=options||{};options.done=callback}return $.ajax({url:url,type:options&&options.type||"GET",dataType:"html",data:options&&options.params,complete:loadCallback(self,options,selector)})}function loadCallback(self,options,selector){return function(res,status){if(status=="success"||status=="notmodified"){var text=getText(res.responseText,selector);doEach.call(self,text,options,html)}}}var PLACEHOLDER=/jquery-writeCapture-script-placeholder-(\d+)-wc/g;function getText(text,selector){if(!selector||!text)return text;var id=0,scripts={};return $('<div/>').append(text.replace(/<script(.|\s)*?\/script>/g,function(s){scripts[id]=s;return"jquery-writeCapture-script-placeholder-"+(id++)+'-wc'})).find(selector).html().replace(PLACEHOLDER,function(all,id){return scripts[id]})}function error(method){throw"invalid method parameter "+method;}$.writeCapture=wc})(bmQuery,writeCapture.noConflict());
// Buzzmedia geoLocation Plugin 1.0.0 by JT (requires $.cookie, $.getQueryParam, MaxMind GeoIP)
(function($){$.bmLib=$.bmLib||{};$.bmLib.geoLocation=$.cookie('GEOIP_COUNTRY_CODE');if($.getQueryParam('geoLocation')!=undefined){$.bmLib.geoLocation=$.getQueryParam('geoLocation').toUpperCase();}})(bmQuery);
// Buzzworthy Module Event Tracking 1.1.0 by JT
(function($){var getSiteName=function(hostname){var sites=[['Buzznet','www.buzznet.com'],['Celebuzz','www.celebuzz.com'],['Egotastic','egotastic.com'],['Idolator','idolator.com'],['Khloe Kardashian','khloekardashian.celebuzz.com'],['Kim Kardashian','kimkardashian.celebuzz.com'],['Kourtney Kardashian','officialkourtneyk.celebuzz.com'],['OK Magazine','www.okmagazine.com'],['Stereogum','stereogum.com'],['The Superficial','www.thesuperficial.com'],['Videogum','videogum.com'],['WWTDD','www.wwtdd.com']];for(var i=0;i<sites.length;i++){if(hostname==sites[i][1]){return sites[i][0];}}return hostname;};$(document).ready(function(){if($('.buzzworthy_block').length){window._gaq=window._gaq||[];window._gaq.push(['buzzworthy._setAccount','UA-18286583-1']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);})();$('.buzzworthy_block a').each(function(){if(this.hostname!=location.hostname){$(this).click(function(){window._gaq.push(['buzzworthy._trackEvent',getSiteName(location.hostname),this.hostname,this.href]);});}});}});})(bmQuery);
// Buzzmedia Comscore Plugin 2.0.0 by JT
(function(){if(!window.bmComscoreFired){window._comscore=window._comscore||[];window._comscore.push({c1:"2",c2:"6035055"});var s=document.createElement("script"),el=document.getElementsByTagName("script")[0];s.async=true;s.src=(document.location.protocol=="https:"?"https://sb":"http://b")+".scorecardresearch.com/beacon.js";el.parentNode.insertBefore(s,el);}})();

(function($) {
	$.bmLib = $.bmLib || {};
	$.bmLib.social = $.bmLib.social || {};
	
	$.bmLib.social.injectPlugins = function(socialPlugins) {
	
		$.each(socialPlugins, function(index, plugin) {
		
			var myFunc = function() {
				if ($.bmLib.social[plugin.type] !== undefined && typeof $.bmLib.social[plugin.type].inject === 'function') {
					$.bmLib.social[plugin.type].inject(plugin);
				}
				
			}();
		});
	
	};
	
})(bmQuery);


(function($) {
	$.bmLib = $.bmLib || {};
	$.bmLib.social = $.bmLib.social || {};
	$.bmLib.social.Default_Model_App_Plugin_FacebookLikeButton = $.bmLib.social.Default_Model_App_Plugin_FacebookLikeButton || {};
	
	$.bmLib.social.Default_Model_App_Plugin_FacebookLikeButton.inject = function(pluginConfig) {
				if (pluginConfig.iframeTag.length > 0) {
			$(pluginConfig.container)[pluginConfig.injectMethod](pluginConfig.iframeTag);
		}
	};
})(bmQuery);
(function($) {
	$.bmLib = $.bmLib || {};
	$.bmLib.social = $.bmLib.social || {};
	$.bmLib.social.Default_Model_App_Plugin_FacebookLikeBox = $.bmLib.social.Default_Model_App_Plugin_FacebookLikeBox || {};
	
	$.bmLib.social.Default_Model_App_Plugin_FacebookLikeBox.inject = function(pluginConfig) {
				if (pluginConfig.iframeTag.length > 0) {
			$(pluginConfig.container)[pluginConfig.injectMethod](pluginConfig.iframeTag);
		}
	};
})(bmQuery);
(function($) {
	$.bmLib = $.bmLib || {};
	$.bmLib.social = $.bmLib.social || {};
	$.bmLib.social.Default_Model_App_Plugin_TweetButton = $.bmLib.social.Default_Model_App_Plugin_TweetButton || {};
	
	$.bmLib.social.Default_Model_App_Plugin_TweetButton.inject = function(pluginConfig) {
				if (pluginConfig.iframeTag.length > 0) {
			$(pluginConfig.container)[pluginConfig.injectMethod](pluginConfig.iframeTag);
		}
	};
})(bmQuery);// BuzzMedia Skin 3.1.0 by JT
// Requires $.onPath, $.bmLib.fire
(function($){window.ord=window.ord||Math.floor(Math.random()*10000000000000000);$.bmLib=$.bmLib||{};$.bmLib.skin=function(config){$('#bmSkinCss').remove();$(document).unbind('mousemove');$(document).unbind('click');if(!config){return false;}if(config.includePaths.length&&!$.onPath(config.includePaths)){return false;}if(config.excludePaths.length&&$.onPath(config.excludePaths)){return false;}if(config.adHide.length){$.bmLib.iab=$.bmLib.iab||{};$.bmLib.iab.adHide=$.bmLib.iab.adHide||{};$.bmLib.iab.adHide[config.siteToken]=config.adHide.split(',');}if(typeof config.kill==='function'){try{if(config.kill.apply(this)){return false;}}catch(killError){}}if(typeof config.supplement==='function'){try{config.supplement.apply(this);}catch(supplementError){}}$('head').append('<style id="bmSkinCss" type="text/css"> html, body { background: url('+config.backgroundImage+') '+config.backgroundColor+' center 0px no-repeat fixed !important; } '+config.extraCss+' </style>');if(config.trackingPixel.length){$.bmLib.fire(config.trackingPixel);}var bgPointer=function(e){var target=e.target;var html=document.getElementsByTagName('html')[0];if(eval(config.targetCondition)){if(html.style.cursor!=='pointer'){html.style.cursor='pointer';}}else{if(html.style.cursor!==target.style.cursor){html.style.cursor=target.style.cursor;}}};var bgClick=function(e){var target=e.target;if(eval(config.targetCondition)){window.open(config.clickThrough.replace(';ord=',';ord='+ord+'?'));}};if(config.clickThrough.length){$(document).mousemove(bgPointer);$(document).click(bgClick);}if(config.researchScript.length){$.bmLib.fire(config.researchScript);}return true;};})(bmQuery);
// BuzzMedia Wrapped Blog Post 3.1.0 by JT
// Requires $.available, $.bmLib.fire
(function($){$.bmLib=$.bmLib||{};$.bmLib.wbp=function(config){var postIds=config.postIds.replace(/\ *,\ */ig,',').split(',');for(var i=0;i<postIds.length;i++){var element=config.element.replace('<ID>',postIds[i]);$(element).available((function(postId){return function(){$.bmLib.fire(config.trackingPixel);$(this)[config.method]('<a class="bmWbp" href="'+config.clickThrough.replace(/ord=(\?$|$)/i,'ord='+window.ord+'?')+'" target="_blank" style="outline: none !important; background: none !important;"><img src="'+config.headerImage+'" alt="Advertisment" style="'+config.headerImageStyle+'" /></a>');if(config.extraCss){$('head').append('<style type="text/css" class="bmWbpCss">'+config.extraCss.replace(/\<ID\>/g,postId)+'</style>');}};})(postIds[i]),true);}};})(bmQuery);

// Buzzmedia Campaign Wrapper
(function($){
	if($.getQueryParam('campaignId')) {
		document.write('<scr'+'ipt type="text/javascript" src="http://extensions.buzznet.com/topscript.preview.js.php?siteToken=PN&campaignId='+$.getQueryParam('campaignId')+'&ignoreDefaultPreviewIds='+($.getQueryParam('ignoreDefaultPreviewIds')||'0')+'"></scr'+'ipt>');
	} else {
// PN Campaign Output - Wed, 22 Feb 12 12:45:45 -0800
// 192.168.26.2

$(document).ready(function(){$('body').append('<iframe src="/ifb/audience-science.html" style="display: none;"></iframe>');});
(function(config){$.bmLib=$.bmLib||{};$.bmLib.iab=$.bmLib.iab||{};$.bmLib.iab.adHide=$.bmLib.iab.adHide||{};if(typeof config=='undefined'){config={};}
var positionCache=[];var queue=[];var queueInterval;var running=false;var siteToken='PN';var tile=0;var preAdConfigHook=function(adConfig){};if(config.preAdConfigHook!=undefined){preAdConfigHook=config.preAdConfigHook;}
var overrideConfigs={};var keywords=[];var gamLocations={};$.bmLib.iab.write=function(adConfig){var adTag=getAdTag(adConfig);if(adTag.length){document.write(adTag);}}
$.bmLib.iab.writeAjax=function(divsAndConfigs){ajaxWriteWrapper(divsAndConfigs,false);}
$.bmLib.iab.writeAjaxByPosition=function(divsAndPositions){ajaxWriteWrapper(divsAndPositions,true);}
function ajaxWriteWrapper(adCallConfigs,usePositionCache){var delayTime=0;$.each(adCallConfigs,function(index,obj){var adTag='';try{var adTag='';if(usePositionCache){adTag=positionCache[obj.position];}else{adTag=getAdTag(obj.adConfig);}
if(isDartTag()){var adTagSub=adTag.substring(0,adTag.indexOf("ord="));var ord=Math.floor(Math.random()*10000000000000000);adTagSub+='ord='+ord+'?"></scr'+'ipt>';adTag=adTagSub;}
queue.push(function(){callAjaxAd(obj.div,adTag);});}catch(e){}});queueInterval=setInterval(function(){execAdQueue();},10);}
function execAdQueue(){if(queue.length===0){clearInterval(queueInterval);return;}
if(running===false){if(next=queue.shift()){running=true;next();}}}
function callAjaxAd(theDiv,adTag){if($.writeCapture===undefined){return;}
$('#'+theDiv).html('');if(siteToken!=='HM'){$.writeCapture.proxyGetElementById=true;}
$('#'+theDiv).writeCapture().html(adTag,function(){setTimeout(function(){running=false;},100);});}
function getAdTag(adConfig){if(overrideConfigs[adConfig.position]!==undefined){$.each(overrideConfigs[adConfig.position],function(key,value){if(value!==''){adConfig[key]=value;}});}
preAdConfigHook(adConfig);var adTag="";if(isDartTag()){adTag=buildDartAdCall(adConfig);}else{adTag=buildGoogleAdCall(adConfig);}
positionCache[adConfig.position]=adTag;return adTag;}
function buildGoogleAdCall(adConfig){var id='ad_'+adConfig.position;var width='';var height='';var positionName='';if(adConfig.sizes.length>0){var size=adConfig.sizes[0];var splitString=adConfig.sizes[0].split('x');width=splitString[0];height=splitString[1];}
var size=adConfig.sizes[0];size=size.toUpperCase()
positionName='international_'+'PN'+'_ros_'+size;var outputString='<iframe src="http://cdn.buzznet.com/assets/pages/p2/ads/gam.html?positionName=';outputString+=positionName+'"';outputString+=' name="'+id+'" id="'+id+'"';outputString+=' height="'+height+'" width="'+width+'"'
outputString+=' framespacing="0" frameborder="0"  marginheight="0" marginwidth="0" scrolling="no"></iframe>';return outputString;}
function buildDartAdCall(adConfig){if(shouldBeSkipped(adConfig)){return'';}
var outputString="";var useIframe='false';if(useIframe!==undefined&&useIframe==='true'){var id='ad_'+adConfig.position;var width='';var height='';var positionName='';if(adConfig.sizes.length>0){var size=adConfig.sizes[0];var splitString=adConfig.sizes[0].split('x');width=splitString[0];height=splitString[1];}
outputString='<iframe src="http://ad.doubleclick.net/adi/';outputString+=buildDartScriptSrc(adConfig)+'"';outputString+=' name="'+id+'" id="'+id+'"';outputString+=' height="'+height+'" width="'+width+'"'
outputString+=' framespacing="0" frameborder="0" marginheight="0" marginwidth="0" scrolling="no">';if(navigator.userAgent.indexOf("Gecko")==-1){outputString+='<scri'+'pt type="text/javascript" src="http://ad.doubleclick.net/adj/';outputString+=buildDartScriptSrc(adConfig);outputString+='"><\/scr'+'ipt>';}
outputString+='</iframe>';}else{outputString='<scri'+'pt type="text/javascript" src="http://ad.doubleclick.net/adj/';outputString+=buildDartScriptSrc(adConfig);outputString+='"><\/scr'+'ipt>';}
return outputString;}
function buildDartScriptSrc(adConfig){if(typeof window.ord=='undefined'){window.ord=Math.floor(Math.random()*10000000000000000);}
var outputString="";var siteIdentifer='';if(siteIdentifer!==''){outputString+=siteIdentifer+'/';}else{outputString+=adConfig.siteIdentifier+'/';}
outputString+=adConfig.zone+';';outputString+='pos='+adConfig.position+';';tile++;outputString+='tile='+tile+';';outputString+='sz='
$.each(adConfig.sizes,function(index,size){outputString+=size;if((index+1)<adConfig.sizes.length){outputString+=',';}});outputString+=';';if(keywords.length){outputString+='kw=';for(var i=0;i<keywords.length;i++){if(adConfig.keywords&&i==0){outputString+=adConfig.keywords;}
if($.onPath(keywords[i].paths)){if(adConfig.position.match(keywords[i].positions)||keywords[i].positions.match('all')){if(keywords[i].keywords.length){if(outputString.charAt(outputString.length-1)!='='){outputString+=',';}
outputString+=keywords[i].keywords;}}}}
outputString+=';';}else{if(adConfig.keywords){outputString+='kw='+adConfig.keywords+';';}}
outputString=outputString.replace('kw=;','');if($.getQueryParam('dfpKeyword')!=undefined){if(outputString.match('kw=')){outputString=outputString.replace('kw=','kw='+$.getQueryParam('dfpKeyword')+',');}else{outputString+='kw='+$.getQueryParam('dfpKeyword')+';';}}
if($.bmLib.iab.extraKeywords!=undefined&&$.bmLib.iab.extraKeywords.length>0){if(outputString.match('kw=')){outputString=outputString.replace('kw=','kw='+$.bmLib.iab.extraKeywords.join(',')+',');}else{outputString+='kw='+$.bmLib.iab.extraKeywords.join(',')+';';}}
if(keywords.length){for(var i=0;i<keywords.length;i++){if($.onPath(keywords[i].paths)&&keywords[i].keyvalues.length){if(adConfig.position.match(keywords[i].positions)||keywords[i].positions.match('all')){if(outputString.charAt(outputString.length-1)!=';'){outputString+=';';}
outputString+=keywords[i].keyvalues+';';}}}}
if($.getQueryParam('dfpKeyval')!=undefined){outputString+=$.getQueryParam('dfpKeyval').replace(/\:/g,'=').replace(/\,/g,';')+';';}
if(tile=='2'){outputString+='dcopt=ist;';}
if(adConfig.options!=undefined){outputString+=adConfig.options;if(outputString.charAt(outputString.length-1)!=';'){outputString+=';';}}
function getAsiSegs(){var rsi_segs=[];var segs_beg=document.cookie.indexOf('rsi_segs=');if(segs_beg>=0){segs_beg=document.cookie.indexOf('=',segs_beg)+1;if(segs_beg>0){var segs_end=document.cookie.indexOf(';',segs_beg);if(segs_end==-1)segs_end=document.cookie.length;rsi_segs=document.cookie.substring(segs_beg,segs_end).split('|');}}
var segLen=10;var segQS="";if(rsi_segs.length<segLen){segLen=rsi_segs.length}
for(var i=0;i<segLen;i++){segQS+=("asi"+"="+rsi_segs[i]+";")}
return segQS;};outputString+=getAsiSegs();outputString+='ord='+ord;outputString+='?';return outputString;}
function shouldBeSkipped(adConfig){var siteToken='PN';if($.bmLib.iab.adHide[siteToken]!=undefined){if($.inArray(adConfig.position,$.bmLib.iab.adHide[siteToken])!==-1){return true;}}
return false;}
function isDartTag(){var isDartTag=true;if($.bmLib.geoLocation==undefined||!$.bmLib.geoLocation){isDartTag=true;}else if((gamLocations['AL']!==undefined)){isDartTag=false;}else if(gamLocations['NOUS']!==undefined&&$.bmLib.geoLocation!=='US'){isDartTag=false;}else if(gamLocations['INTL']!==undefined&&($.bmLib.geoLocation!=='US'&&$.bmLib.geoLocation!=='CA'&&$.bmLib.geoLocation!=='UK'&&$.bmLib.geoLocation!=='GB'&&$.bmLib.geoLocation!=='AU'&&$.bmLib.geoLocation!=='DE'&&$.bmLib.geoLocation!=='NO'&&$.bmLib.geoLocation!=='NL'&&$.bmLib.geoLocation!=='IT'&&$.bmLib.geoLocation!=='BE'&&$.bmLib.geoLocation!=='ES'&&$.bmLib.geoLocation!=='AT'&&$.bmLib.geoLocation!=='CH')){isDartTag=false;}else if(gamLocations[$.bmLib.geoLocation]!==undefined){isDartTag=false;}else if(!$.bmLib.geoLocation){isDartTag=true;}
return isDartTag;}})
({});
	}
})(bmQuery);

