if("undefined"==typeof nRelate){var nr_load_time=(new Date).getTime();nRelate=function(){function q(a){this.res=a||10}function m(a){this.dialog=f.xgebi(a);if(!this.dialog)return!1;m.instances[a]=this;var b=document.createElement("div");b.className="nr_dialog";b.style.position="absolute";b.style.zIndex=9E3;b.style.top=0;b.style.left="-9999px";b.style.width="550px";b.style.padding="30px 10px 5px";b.style.backgroundColor="#fff";b.style.border="solid 1px #333";var c=document.createElement("img");c.src= "http://static.nrelate.com/common_js/close_window.gif";c.title="Close dialog";c.style.cursor="pointer";c.style.position="absolute";c.style.top="5px";c.style.right="5px";f.bind(c,"click",function(b){m.instances[a].hide()});b.appendChild(c);b.appendChild(this.dialog.parentNode.removeChild(this.dialog));this.dialog=b;document.body.appendChild(this.dialog);b=m.grey;b||(b=document.createElement("div"),b.className="nr_dialog_overlay",b.style.position="fixed",b.style.overflow="hidden",b.style.zIndex="9000", b.style.opacity=0.3,b.style.filter="alpha(opacity=30)",b.style.backgroundColor="#000",m.grey=document.body.appendChild(b),f.bind(b,"click",function(){for(var a in m.instances)m.instances[a].hide()}));f.bind(window,"resize",function(){for(var a in m.instances)m.instances[a].is_opened&&m.instances[a].center()})}var f={init:function(a){var b,c=null;if(this.is_initialized)return this.debug("nRelate already setup"),!1;this.is_initialized=!0;this.extend(this.options,a,this.constants);if(this.is_object(this.options.plugins))for(b in this.options.plugins)a= this.options.plugins[b],this.is_defined(this.plugin_helpers[b])&&(c=c||{},c[b]=this.extend({},this.plugin_helpers[b]._defaults,a,this.plugin_helpers[b]));this.options.plugins=c;this.plugins_sanitized=!0;for(b in this.options.plugins)this.snt(b);this.lcs();this.debug("Options initialized %o",this.options)},snt:function(a){var b,c,d;a=this.options.plugins[a];var e=["cssstyle","thumbsize","ad_place","widgetstyle"];c={style:"cssstyle",thumb_size:"thumbsize"};for(b in c)this.is_defined(a[b])&&(a[c[b]]= a[b],delete a[b]);b=0;for(c=e.length;bthis.in_array(a[e[b]],a[d])&&(a[e[b]]=a[d][0]);this.is_function(a.csnt)&&a.csnt.call(this,a)},lcs:function(){var a=this.options.debug_mode?this.options.debug_cs_api_url:this.options.cs_api_url,a=a+(this.to_slug(this.options.domain)+".js");this.debug("Loading custom scripts from %o",a);this.lr(a,"nrelate-widget-cs");var b=this;setTimeout(function(){b.acs({})},5E3)},acs:function(a){if(this.plugins_sanitized&&!this.custom_scripts_loaded){this.custom_scripts_loaded= !0;var b;this.debug("Applying custom scripts");for(b in this.options.plugins)this.extend(this.options.plugins[b],a[b]);this.nr_cs_load_time=(new Date).getTime();if(!this.options.browser.msie)try{this.pd()}catch(c){}this.bdr(this.pd,"pd()")}},pd:function(){var a,b,c,d,e,g;for(p in this.options.plugins){a=this.options.plugins[p];this.is_function(a.fph)?(b=a.fph,this.debug("Use custom fph for %s",p)):(b=this.dfph,this.debug("Use default fph for %s",p));this.is_function(a.fpl)?(c=a.fpl,this.debug("Use custom fpl for %s", p)):(c=this.dfpl,this.debug("Use default fpl for %s",p));this.is_function(a.fkw)?(d=a.fkw,this.debug("Use custom fkw for %s",p)):(d=this.dfkw,this.debug("Use default fkw for %s",p));this.debug("Parsing document for %s",p);e=a.cts.length;a.phs=b.call(this,p);a.pls=c.call(this,p);g={};b=0;for(c=a.pls.length;b=c?1:15);++b)this.act(b, p);this.mac()}},dfph:function(a){var b=[];if(b=this.xgebi("nrelate_"+a+"_placeholder"))return this.debug("Backwards compatibility: using #nrelate_%s_placeholder: %o",a,b),[b];if(0<(b=this.xgebcn("nr_"+a+"_placeholder","div")).length)return this.debug("Using manually located .nr_%s_placeholder: %o",a,b),b;if(b=this.xgebi("nrelate_"+a+"_backup_placeholder"))return this.debug("Backwards compatibility: using #nrelate_%s_backup_placeholder: %o",a,b),[b];this.debug("No placeholders found");return[]},dfpl:function(a){var b, c,d,e,g,h,n,f,l=[];c=this.options.plugins[a];f=["entry-title","post-title","entry-header"];var m=["h3","h2","h1"];if(1==c.phs.length&&"undefined"!=typeof window.nr_pageurl)return this.debug("Manually defined nr_pageurl"),[{href:window.nr_pageurl}];if(0num_cols&&(_col_counter=1,_row_counter++);this.xhc(a,"nrelate_pol")&&this.xac(a,"rotate");a.nr_fixing_height=!1;if(!this.is_dom_ready){var n=this;clearInterval(a.nr_fixheight_interval);a.nr_fixheight_interval=setTimeout(function(){n.fh(a)},100)}}}},fah:function(){var a,b,c;for(a in this.options.plugins)for(c=this.options.plugins[a], b=0;b=c.nr_top_distance&&f>=c.nr_left_distance)&&this.cwv(c,b)},cwv:function(a,b){var c;a.nr_count_views&&!a.nr_viewed&&(a.nr_viewed=!0,this.xac(a,"nr_viewed"),c=this.aurlp(this.options.views_url,{plugin:b.shortname, domain:this.options.domain,url:a.nr_src_url||window.location.href,widget_id:b.widget_id,page_type_id:b.page_type_id,page_type:b.page_type,geo:b.geo,pr_id:this.get_print_id(),top:a.nr_top_distance,left:a.nr_left_distance,api_time:a.nr_widget_initialized_time-a.nr_api_call_time,page_size:this.xDocSize()}),this.lr(c,a.id+"_view"))},aa:function(a){if((a=this.xgebi(a))&&0!=(a=this.xgebcn("nr_sponsored","span",a)).length){var b,c,d=this,e=new q;b=0;for(c=a.length;bc?Math.max(0,d+c):c:0;cthis.in_array(a,this.options.extra_apip[c])&&(this.options.extra_apip[c][this.options.extra_apip[c].length]=a)},get_print_id:function(){if(!this.print_id){var a;this.print_id="";for(a=0;24>a;a++)this.print_id+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.round(61*Math.random())]}return this.print_id}, is_object:function(a){return null!=a&&"object"==typeof a},is_array:function(a){return null!=a&&"object"===typeof a&&"splice"in a&&"join"in a},is_function:function(a){try{return/^\s*\bfunction\b/.test(a)}catch(b){return!1}},get_keys:function(a){var b,c=[];for(b in a)c[c.length]=b;return c},is_defined:function(){for(var a=0,b=arguments.length;a";try{h=e.contentWindow.document,h.write(a),h.close()}catch(l){e.src=f+"d.write('"+a.replace(/"/g,'\\"')+"');d.close();"}return d}d=document.createElement("script");d.type="text/javascript";d.src=a;break;case "css":case "link":if(d=document.createElement("link"), d.type="text/css",d.rel="stylesheet",d.href=a,this.is_function(c.callback)){e=document.createElement("img");var q=this;e.onerror=function(){c.callback.call(q,b,d)};e.src=a}}d&&(b&&(d.id=b),a=this.xgebtn("head")[0]||document.documentElement,a.insertBefore(d,a.firstChild));return d}},xgebcn:function(a,b,c,d){var e=[],f;a=RegExp("(^|\\s)"+a+"(\\s|$)");b=this.xgebtn(b,c);c=0;for(f=b.length;cb?0:Math.round(b);c= this.is_defined(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=this.xClientHeight();else if(c&&this.is_defined(a.offsetHeight)&&"string"==typeof a.style.height){if(0<=b){"CSS1Compat"==document.compatMode&&(d=this.xGetComputedStyle(a,"padding-top",1),null!==d?(e=this.xGetComputedStyle(a,"padding-bottom",1),f=this.xGetComputedStyle(a,"border-top-width",1),h=this.xGetComputedStyle(a,"border-bottom-width",1)):this.is_defined(a.offsetHeight,a.style.height)&& (a.style.height=b+"px",d=a.offsetHeight-b));b-=d+e+f+h;if(isNaN(b)||0>b)return;a.style.height=b+"px"}b=a.offsetHeight}else c&&this.is_defined(a.style.pixelHeight)&&(0<=b&&(a.style.pixelHeight=b),b=a.style.pixelHeight);return b},xWidth:function(a,b){var c,d=0,e=0,f=0,h=0;if(!(a=this.xgebi(a)))return 0;b=isNaN(b)||"number"!==typeof b?-1:0>b?0:Math.round(b);c=this.is_defined(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=this.xClientWidth();else if(c&&this.is_defined(a.offsetWidth)&& "string"==typeof a.style.width){if(0<=b){"CSS1Compat"==document.compatMode&&(d=this.xGetComputedStyle(a,"padding-left",1),null!==d?(e=this.xGetComputedStyle(a,"padding-right",1),f=this.xGetComputedStyle(a,"border-left-width",1),h=this.xGetComputedStyle(a,"border-right-width",1)):this-is_defined(a.offsetWidth,a.style.width)&&(a.style.width=b+"px",d=a.offsetWidth-b));b-=d+e+f+h;if(isNaN(b)||0>b)return;a.style.width=b+"px"}b=a.offsetWidth}else c&&this.is_defined(a.style.pixelWidth)&&(0<=b&&(a.style.pixelWidth= b),b=a.style.pixelWidth);return b},xClientHeight:function(){var a=0,b=document,c=window;b.compatMode&&"CSS1Compat"!=b.compatMode||!b.documentElement||!b.documentElement.clientHeight?b.body&&b.body.clientHeight?a=b.body.clientHeight:this.is_defined(c.innerWidth,c.innerHeight,b.width)&&(a=c.innerHeight,b.width>c.innerWidth&&(a-=16)):a=b.documentElement.clientHeight;return a},xClientWidth:function(){var a=0,b=document,c=window;b.compatMode&&"CSS1Compat"!=b.compatMode||c.opera||!b.documentElement||!b.documentElement.clientWidth? b.body&&b.body.clientWidth?a=b.body.clientWidth:this.is_defined(c.innerWidth,c.innerHeight,b.height)&&(a=c.innerWidth,b.height>c.innerHeight&&(a-=16)):a=b.documentElement.clientWidth;return a},xDocSize:function(){var a=document.body,b=document.documentElement,c=0,d=0,e=0,f=0,h=0,n=0,m=0,l=0;b&&(c=b.scrollWidth,d=b.offsetWidth,h=b.scrollHeight,n=b.offsetHeight);a&&(e=a.scrollWidth,f=a.offsetWidth,m=a.scrollHeight,l=a.offsetHeight);return{w:Math.max(c,d,e,f),h:Math.max(h,n,m,l)}},xScrollTop:function(a, b){var c,d=0;!this.is_defined(a)||b||a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase()?(c=window,b&&a&&(c=a),c.document.documentElement&&c.document.documentElement.scrollTop?d=c.document.documentElement.scrollTop:c.document.body&&this.is_defined(c.document.body.scrollTop)&&(d=c.document.body.scrollTop)):(a=this.xgebi(a))&&(!isNaN(a.scrollTop)&&"number"==typeof a.scrollTop)&&(d=a.scrollTop);return d},xScrollLeft:function(a,b){var c,d=0;!this.is_defined(a)||b||a==document|| "html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase()?(c=window,b&&a&&(c=a),c.document.documentElement&&c.document.documentElement.scrollLeft?d=c.document.documentElement.scrollLeft:c.document.body&&this.is_defined(c.document.body.scrollLeft)&&(d=c.document.body.scrollLeft)):(a=this.xgebi(a))&&(!isNaN(a.scrollLeft)&&"number"==typeof a.scrollLeft)&&(d=a.scrollLeft);return d},xGetComputedStyle:function(a,b,c){if(!(a=this.xgebi(a)))return null;var d="undefined",e=document.defaultView;if(e&& e.getComputedStyle)(a=e.getComputedStyle(a,""))&&(d=a.getPropertyValue(b));else if(a.currentStyle)d=a.currentStyle[this.xCamelize(b)];else return null;return c?parseInt(d)||0:d},xOpacity:function(a,b){var c=this.is_defined(b);if(!(a=this.xgebi(a)))return 2;"string"==typeof a.style.opacity?c?a.style.opacity=b+"":b=parseFloat(a.style.opacity):"string"==typeof a.style.filter?c?a.style.filter="alpha(opacity="+100*b+")":a.filters&&a.filters.alpha&&(b=a.filters.alpha.opacity/100):"string"==typeof a.style.MozOpacity? c?a.style.MozOpacity=b+"":b=parseFloat(a.style.MozOpacity):"string"==typeof a.style.KhtmlOpacity&&(c?a.style.KhtmlOpacity=b+"":b=parseFloat(a.style.KhtmlOpacity));return isNaN(b)?1:b},xCamelize:function(a){var b,c,d;c=a.split("-");d=c[0];for(a=1;athis.in_array(a.animstyle,a.supported_animstyles)&&(a.animstyle=a.supported_animstyles[0]);0>this.in_array(a.animation,a.supported_animations)&&(a.animation=a.supported_animations[0]);0>this.in_array(a.location,a.supported_locations)&&(a.location=a.supported_locations[0]);0>this.in_array(a.offset,a.supported_flyout_offsets)&&(a.offset=a.supported_flyout_offsets[0]);a.offset_node=null},capip:function(a,b,c){var d,e="width widthtype frombot frombottype animstyle animation location offset element".split(" "); for(c=0;c=this.xPageY(a.offset_node)+this.xHeight(a.offset_node)/2;break;case 2:b=b+c>=this.xPageY(a.offset_node)+this.xHeight(a.offset_node); break;case 3:b=b+c>=d.h;break;case 4:b=b+c>=this.xPageY(a.offset_node);break;default:b=b+c>=d.h/2}return b},should_load:function(a){if(this.is_home_page)return!1;a=navigator.userAgent||navigator.vendor||window.opera;return/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))?!1:!0},fo_faph:function(a){a=this.dfph(a.fullname)[0];this.debug("fo_faph result: %o",a);return a},fph:function(a){return[document.body]}})};q.prototype.axes=function(a){var b;if(!this.a||this.a.length!=a)for(this.a=[],b=0;bthis.at&&(this.fq*=this.qc*Math.PI,1==this.at||2==this.at)&& (this.fq/=2);for(a=0;a