jQuery.preloadImages=function()
{for(var i=0;i<arguments.length;i++)
{jQuery("<img>").attr("src",arguments[i]);}}
function refresh_ads()
{jQuery('.doubleclick_ad_src').each(function(){var $ad_src=jQuery(this);var ad_url_base=$ad_src.text();var $ad_div=$ad_src.prev();var ord=Math.floor(Math.random()*1E16);var full_ad_url=ad_url_base+';ord='+ord+'?';domWrite($ad_div.get(0),full_ad_url,'');});}
jQuery(document).ready(function(){jQuery('a.icon_print').attr('href','#').click(function(){window.print();});var meta_description=jQuery('meta[name="description"]').attr('content');meta_description=(meta_description!==undefined)?meta_description.replace(/\n/,' '):'';jQuery('a.sharethis').each(function(){jQuery(this).attr('href','javascript:void(0);');var the_title=jQuery(this).attr('title')||document.title;var the_url=jQuery(this).attr('rel')||document.URL;var st=SHARETHIS.addEntry({title:the_title,url:the_url,summary:meta_description||the_title},{button:false,embeds:true,onmouseover:false});st.attachButton(this);});var num_tabs=0;jQuery('#events-filter li>a').each(function()
{var cat=jQuery(this).attr('href').substring(1);if(cat=='all')return;if(jQuery('.box_events-list > .cat-'+cat).length>0)
{num_tabs++;}
else
{jQuery(this).parent().hide();}});if(num_tabs>1)jQuery('#events-filter').show();jQuery('#events-filter li>a').click(function()
{var cat=jQuery(this).attr('href').substring(1);jQuery('#events-filter li.nav_selected').removeClass('nav_selected');jQuery(this).parent().addClass('nav_selected');if(cat=='all')
{jQuery('.box_event').show();}
else
{jQuery('.box_event').each(function()
{if(jQuery(this).hasClass('cat-'+cat))
{jQuery(this).show();}
else
{jQuery(this).hide();}});}
return false;});jQuery('#commentform #author, #commentform #comment, #commentform #email').inputHint();});(function($){$.fn.inputHint=function(callerSettings){var settings=$.extend(true,{},$.fn.inputHint.settings,callerSettings);return this.each(function(){var n=$(this),v=settings.value||$(this).attr('title'),f=$(this.form);n.focus(function(){n.val(n.val()==v?'':n.val())
.removeClass(settings.className);})
.blur(function(){n.val(n.val()==''?v:n.val())
.addClass(settings.className);})
.blur();if(f){f.submit(function(e){n.trigger('focus');});}});};$.fn.inputHint.settings={value:false,className:false};})(jQuery);var domWrite=(function(){var dw=document.write,myCalls=[],t='';function startnext(){if(myCalls.length>0){myCalls[0].startCall();}}
function evals(pCall){var scripts=[],script,regexp=/<script[^>]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(pCall.buf)))scripts.push(script[1]);scripts=scripts.join('\n');if(scripts){eval(scripts);}}
function finishCall(pCall){pCall.e.innerHTML=pCall.buf;evals(pCall);document.write=dw;myCalls.shift();window.setTimeout(startnext,50);}
function testDone(pCall){var myCall=pCall;return function(){if(myCall.buf!==myCall.oldbuf){myCall.oldbuf=myCall.buf;t=window.setTimeout(testDone(myCall),myCall.ms);}
else{finishCall(myCall);}}}
function MyCall(pDiv,pSrc,pFunc){this.e=(typeof pDiv=='string'?document.getElementById(pDiv):pDiv),this.f=pFunc||function(){},this.stat=0,this.src=pSrc,this.buf='',this.oldbuf='',this.ms=100,this.scripttag;}
MyCall.prototype={startCall:function(){this.f.apply(window);this.stat=1;var that=this;document.write=(function(){var o=that,cb=testDone(o),t;return function(pString){window.clearTimeout(t);o.stat=2;window.clearTimeout(t);o.oldbuf=o.buf;o.buf+=pString;t=window.setTimeout(cb,o.ms);};})();var s=document.createElement('script');s.setAttribute('language','javascript');s.setAttribute('type','text/javascript');s.setAttribute('src',this.src);document.getElementsByTagName('head')[0].appendChild(s);}}
return function(pDiv,pSrc,pFunc){var c=new MyCall(pDiv,pSrc,pFunc);myCalls.push(c);if(myCalls.length===1){startnext();}}})();

