function convertEntities(b){var d,a;d=function(c){if(/&[^;]+;/.test(c)){var f=document.createElement("div");f.innerHTML=c;return!f.firstChild?c:f.firstChild.nodeValue}return c};if(typeof b==="string"){return d(b)}else{if(typeof b==="object"){for(a in b){if(typeof b[a]==="string"){b[a]=d(b[a])}}}}return b};;;(function($){var timer,exit_shown=false;$(document).ready(function(){if(check_cookie()){return false;}
$(document).find('body').prepend(popup_domination.output);if(popup_domination.impression_count>0){if(check_impressions()){return false;}}
switch(popup_domination.show_opt){case'mouseleave':$('body',document).mouseleave(show_lightbox);break;case'unload':enable_unload();break;default:if(popup_domination.delay&&popup_domination.delay>0){timer=setTimeout(show_lightbox,(popup_domination.delay*1000));}else{show_lightbox();}
break;}
if(popup_domination.center&&popup_domination.center=='Y')
init_center();if(popup_domination.defaults){var defaults=popup_domination.defaults;for(var i in defaults){if($.trim(defaults[i])!=''){$('#popup_domination_lightbox_wrapper form :text[name="'+i+'"]').data('default_value',defaults[i]).focus(function(){var $this=$(this);if($this.val()==$this.data('default_value'))
$this.val('');}).blur(function(){var $this=$(this);if($this.val()=='')
$this.val($this.data('default_value'));});}}}
$('#popup_domination_lightbox_close').click(function(){close_box();return false;});$('#popup_domination_lightbox_wrapper form').submit(function(){var checked=true;$('#popup_domination_lightbox_wrapper :text').each(function(){var $this=$(this),val=$this.val();if($this.data('default_value')&&val==$this.data('default_value')){if(checked)
$this.val('').focus();checked=false;}
if(val==''){checked=false;}});if(checked){close_box();return true;}
return false;});});function enable_unload(){var oldunload=window.onbeforeunload,oldunload2=window.onunload;if(typeof oldunload!='function'){oldunload=null;}
if(typeof oldunload2!='function'){oldunload2=null;}
window.onbeforeunload=function(e){if(exit_shown===false){e=e||window.event;exit_shown=true;$(document).focus(function(){timer=setTimeout(show_lightbox,1000)});window.onunload=function(){close_box(false);if(oldunload2!==null){window.onunload=oldunload2;return oldunload2();}}
window.onbeforeunload=oldunload;if(e)
e.returnValue=popup_domination.unload_msg;return popup_domination.unload_msg;}};};function show_lightbox(){$(document).unbind('focus',show_lightbox);$('body',document).unbind('mouseleave',show_lightbox);if(!check_cookie()){max_zindex();$('#popup_domination_lightbox_wrapper').fadeIn('fast');center_it();}};function center_it(){var styles={position:'absolute',left:($(window).width()-$('.popup-dom-lightbox-wrapper .lightbox-main').outerWidth())/2,top:($(window).height()-$('.popup-dom-lightbox-wrapper .lightbox-main').outerHeight())/2};styles.left=styles.left<0?0:styles.left;styles.top=styles.top<0?0:styles.top;$('.popup-dom-lightbox-wrapper .lightbox-main').css(styles);};function init_center(){center_it();$(window).resize(center_it);};function max_zindex(){var maxz=0;$('body *').each(function(){var cur=parseInt($(this).css('z-index'));maxz=cur>maxz?cur:maxz;});$('#popup_domination_lightbox_wrapper').css('z-index',maxz+10);};function close_box(fade){fade=fade===false?false:true;var elem=$('#popup_domination_lightbox_wrapper');clearTimeout(timer);if(fade){elem.fadeOut('fast');if(popup_domination.cookie_time&&popup_domination.cookie_time>0){var date=new Date();date.setTime(date.getTime()+(popup_domination.cookie_time*86400*1000));set_cookie('popup_domination_hide_lightbox','Y',date);}}else{elem.hide();}};function set_cookie(name,value,date){window.document.cookie=[name+'='+escape(value),'expires='+date.toUTCString(),'path='+popup_domination.cookie_path].join('; ');};function check_cookie(){if(get_cookie('popup_domination_hide_lightbox')=='Y')
return true;return false;};function check_impressions(){var ic=1,date=new Date();if(ic=get_cookie('popup_domination_icount')){ic=parseInt(ic);ic++;if(ic==popup_domination.impression_count){date.setTime(date.getTime());set_cookie('popup_domination_icount',popup_domination.impression_count,date);return false;}}else{ic=1;}
date.setTime(date.getTime()+(7200*1000));set_cookie('popup_domination_icount',ic,date);return true;};function get_cookie(cname){var cookie=window.document.cookie;if(cookie.length>0){var c_start=cookie.indexOf(cname+'=');if(c_start!==-1){c_start=c_start+cname.length+1;var c_end=cookie.indexOf(';',c_start);if(c_end===-1)
c_end=cookie.length;return unescape(cookie.substring(c_start,c_end));}}
return false;};})(jQuery);;function new_window(url){width_screen=(screen.width-700)/2;height_screen=(screen.height-400)/2;params='menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, width=700, height=400, left='+width_screen+', top='+height_screen;window.open(url,'newwin',params);}
var nereidFadeObjects=new Object();var nereidFadeTimers=new Object();var opacitiz=0;window.onload=function(){var e=document.getElementsByTagName('*')
for(var i=0,l=e.length;i<l;i++)e[i].sourceIndex=i}
function KrossBrows(object,num){if(num==1)
if(!document.all)nereidFade(object,1,50,0.1);else nereidFade(object,100,50,10);else
if(!document.all)nereidFade(object,0.7,70,0.05);else nereidFade(object,50,70,5);}
function nereidFade(object,destOp,rate,delta){if(!document.all)opacitiz=object.style.opacity;else opacitiz=object.filters.alpha.opacity;clearTimeout(nereidFadeTimers[object.sourceIndex]);diff=destOp-opacitiz;direction=1;if(opacitiz>destOp)direction=-1;delta=Math.min(direction*diff,delta);if(!document.all)object.style.opacity=parseFloat(object.style.opacity)+(direction*delta);else object.filters.alpha.opacity+=direction*delta;if(opacitiz!=destOp){nereidFadeObjects[object.sourceIndex]=object;nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);}};window.onload=ODKL.init();;function sack(file){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=file;this.vars=new Object();this.responseStatus=new Array(2)};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){}};this.reset=function(){this.resetFunctions();this.resetData()};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){this.xmlhttp=null}}if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest()}else{this.failed=true}}};this.setVar=function(name,value){this.vars[name]=Array(value,false)};this.encVar=function(name,value,returnvars){if(true==returnvars){return Array(encodeURIComponent(name),encodeURIComponent(value))}else{this.vars[encodeURIComponent(name)]=Array(encodeURIComponent(value),true)}};this.processURLString=function(string,encode){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=string.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==encode){this.encVar(urlVars[0],urlVars[1])}else{this.setVar(urlVars[0],urlVars[1])}}};this.createURLString=function(urlstring){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true)}if(urlstring){if(this.URLString.length){this.URLString+=this.argumentSeparator+urlstring}else{this.URLString=urlstring}}this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0]}urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0]}if(urlstring){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator)}else{this.URLString+=urlstringtemp.join(this.argumentSeparator)}};this.runResponse=function(){eval(this.response)};this.runAJAX=function(urlstring){if(this.failed){this.onFail()}else{this.createURLString(urlstring);if(this.element){this.elementObj=document.getElementById(this.element)}if(this.xmlhttp){var self=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true)}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]=self.xmlhttp.statusText;if(self.execute){self.runResponse()}if(self.elementObj){elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response}else{self.elementObj.innerHTML=self.response}}if(self.responseStatus[0]=="200"){self.onCompletion()}else{self.onError()}self.URLString="";break}};this.xmlhttp.send(this.URLString)}}};this.reset();this.createAJAX()};;var post_id=0;var post_rating=0;var is_being_rated=false;ratingsL10n.custom=parseInt(ratingsL10n.custom);ratingsL10n.max=parseInt(ratingsL10n.max);ratingsL10n.show_loading=parseInt(ratingsL10n.show_loading);ratingsL10n.show_fading=parseInt(ratingsL10n.show_fading);function current_rating(id,rating,rating_text){if(!is_being_rated){post_id=id;post_rating=rating;if(ratingsL10n.custom&&ratingsL10n.max==2){jQuery("#rating_"+post_id+"_"+rating).attr("src",eval("ratings_"+rating+"_mouseover_image.src"))}else{for(i=1;i<=rating;i++){if(ratingsL10n.custom){jQuery("#rating_"+post_id+"_"+i).attr("src",eval("ratings_"+i+"_mouseover_image.src"))}else{jQuery("#rating_"+post_id+"_"+i).attr("src",ratings_mouseover_image.src)}}}if(jQuery("#ratings_"+post_id+"_text").length){jQuery("#ratings_"+post_id+"_text").show();jQuery("#ratings_"+post_id+"_text").html(rating_text)}}}function ratings_off(b,c,a){if(!is_being_rated){for(i=1;i<=ratingsL10n.max;i++){if(i<=b){if(ratingsL10n.custom){jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_"+i+"_on."+ratingsL10n.image_ext)}else{jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_on."+ratingsL10n.image_ext)}}else{if(i==c){if(ratingsL10n.custom){jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_"+i+"_half"+(a?"-rtl":"")+"."+ratingsL10n.image_ext)}else{jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_half"+(a?"-rtl":"")+"."+ratingsL10n.image_ext)}}else{if(ratingsL10n.custom){jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_"+i+"_off."+ratingsL10n.image_ext)}else{jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_off."+ratingsL10n.image_ext)}}}}if(jQuery("#ratings_"+post_id+"_text").length){jQuery("#ratings_"+post_id+"_text").hide();jQuery("#ratings_"+post_id+"_text").empty()}}}function set_is_being_rated(a){is_being_rated=a}function rate_post_success(a){jQuery("#post-ratings-"+post_id).html(a);if(ratingsL10n.show_loading){jQuery("#post-ratings-"+post_id+"-loading").hide()}if(ratingsL10n.show_fading){jQuery("#post-ratings-"+post_id).fadeTo("def",1,function(){set_is_being_rated(false)})}else{set_is_being_rated(false)}}function rate_post(){if(!is_being_rated){set_is_being_rated(true);if(ratingsL10n.show_fading){jQuery("#post-ratings-"+post_id).fadeTo("def",0,function(){if(ratingsL10n.show_loading){jQuery("#post-ratings-"+post_id+"-loading").show()}jQuery.ajax({type:"GET",url:ratingsL10n.ajax_url,data:"pid="+post_id+"&rate="+post_rating,cache:false,success:rate_post_success})})}else{if(ratingsL10n.show_loading){jQuery("#post-ratings-"+post_id+"-loading").show()}jQuery.ajax({type:"GET",url:ratingsL10n.ajax_url,data:"pid="+post_id+"&rate="+post_rating,cache:false,success:rate_post_success})}}else{alert(ratingsL10n.text_wait)}};
