(function(){var dep={"jQuery":"http://code.jquery.com/jquery-latest.min.js"};var init=function(){(function($){$.fn.idTabs=function(){var s={};for(var i=0;i<arguments.length;++i){var a=arguments[i];switch(a.constructor){case Object:$.extend(s,a);break;case Boolean:s.change=a;break;case Number:s.start=a;break;case Function:s.click=a;break;case String:if(a.charAt(0)=='.')s.selected=a;else if(a.charAt(0)=='!')s.event=a;else s.start=a;break;}}
if(typeof s['return']=="function")
s.change=s['return'];return this.each(function(){$.idTabs(this,s);});}
$.idTabs=function(tabs,options){var meta=($.metadata)?$(tabs).metadata():{};var s=$.extend({},$.idTabs.settings,meta,options);if(s.selected.charAt(0)=='.')s.selected=s.selected.substr(1);if(s.event.charAt(0)=='!')s.event=s.event.substr(1);if(s.start==null)s.start=-1;var showId=function(){if($(this).is('.'+s.selected))
return s.change;var id="#"+this.href.split('#')[1];var aList=[];var idList=[];$("a",tabs).each(function(){if(this.href.match(/#/)){aList.push(this);idList.push("#"+this.href.split('#')[1]);}});if(s.click&&!s.click.apply(this,[id,idList,tabs,s]))return s.change;for(i in aList)$(aList[i]).removeClass(s.selected);for(i in idList)$(idList[i]).hide();$(this).addClass(s.selected);$(id).show();return s.change;}
var list=$("a[href*='#']",tabs).unbind(s.event,showId).bind(s.event,showId);list.each(function(){$("#"+this.href.split('#')[1]).hide();});var test=false;if((test=list.filter('.'+s.selected)).length);else if(typeof s.start=="number"&&(test=list.eq(s.start)).length);else if(typeof s.start=="string"&&(test=list.filter("[href*='#"+s.start+"']")).length);if(test){test.removeClass(s.selected);test.trigger(s.event);}
return s;}
$.idTabs.settings={start:0,change:false,click:null,selected:".selected",event:"!click"};$.idTabs.version="2.2";$(function(){$(".idTabs").idTabs();});})(jQuery);}
var check=function(o,s){s=s.split('.');while(o&&s.length)o=o[s.shift()];return o;}
var head=document.getElementsByTagName("head")[0];var add=function(url){var s=document.createElement("script");s.type="text/javascript";s.src=url;head.appendChild(s);}
var s=document.getElementsByTagName('script');var src=s[s.length-1].src;var ok=true;for(d in dep){if(check(this,d))continue;ok=false;add(dep[d]);}if(ok)return init();add(src);})();var poll_id=0;var poll_answer_id="";var is_being_voted=false;pollsL10n.show_loading=parseInt(pollsL10n.show_loading);pollsL10n.show_fading=parseInt(pollsL10n.show_fading);function poll_vote(a){if(!is_being_voted){set_is_being_voted(true);poll_id=a;poll_answer_id="";poll_multiple_ans=0;poll_multiple_ans_count=0;if(jQuery("#poll_multiple_ans_"+poll_id).length){poll_multiple_ans=parseInt(jQuery("#poll_multiple_ans_"+poll_id).val())}jQuery("#polls_form_"+poll_id+" :checkbox, #polls_form_"+poll_id+" :radio").each(function(b){if(jQuery(this).is(":checked")){if(poll_multiple_ans>0){poll_answer_id=jQuery(this).val()+","+poll_answer_id;poll_multiple_ans_count++}else{poll_answer_id=parseInt(jQuery(this).val())}}});if(poll_multiple_ans>0){if(poll_multiple_ans_count>0&&poll_multiple_ans_count<=poll_multiple_ans){poll_answer_id=poll_answer_id.substring(0,(poll_answer_id.length-1));poll_process()}else{if(poll_multiple_ans_count==0){set_is_being_voted(false);alert(pollsL10n.text_valid)}else{set_is_being_voted(false);alert(pollsL10n.text_multiple+" "+poll_multiple_ans)}}}else{if(poll_answer_id>0){poll_process()}else{set_is_being_voted(false);alert(pollsL10n.text_valid)}}}else{alert(pollsL10n.text_wait)}}function poll_process(){if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",0,function(){if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"POST",url:pollsL10n.ajax_url,data:"vote=true&poll_id="+poll_id+"&poll_"+poll_id+"="+poll_answer_id,cache:false,success:poll_process_success})})}else{if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"POST",url:pollsL10n.ajax_url,data:"vote=true&poll_id="+poll_id+"&poll_"+poll_id+"="+poll_answer_id,cache:false,success:poll_process_success})}}function poll_result(a){if(!is_being_voted){set_is_being_voted(true);poll_id=a;if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",0,function(){if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollresult="+poll_id,cache:false,success:poll_process_success})})}else{if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollresult="+poll_id,cache:false,success:poll_process_success})}}else{alert(pollsL10n.text_wait)}}function poll_booth(a){if(!is_being_voted){set_is_being_voted(true);poll_id=a;if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",0,function(){if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollbooth="+poll_id,cache:false,success:poll_process_success})})}else{if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollbooth="+poll_id,cache:false,success:poll_process_success})}}else{alert(pollsL10n.text_wait)}}function poll_process_success(a){jQuery("#polls-"+poll_id).html(a);if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").hide()}if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",1,function(){set_is_being_voted(false)})}else{set_is_being_voted(false)}}function set_is_being_voted(a){is_being_voted=a};