﻿﻿(function($){m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},$.toJSON=function(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case'string':return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"':'"'+value+'"';case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
if(typeof value.toJSON==='function'){return $.toJSON(value.toJSON());}
a=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){l=value.length;for(i=0;i<l;i+=1){a.push($.toJSON(value[i],whitelist)||'null');}
return'['+a.join(',')+']';}
if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==='string'){v=$.toJSON(value[k],whitelist);if(v){a.push($.toJSON(k)+':'+v);}}}}else{for(k in value){if(typeof k==='string'){v=$.toJSON(value[k],whitelist);if(v){a.push($.toJSON(k)+':'+v);}}}}
return'{'+a.join(',')+'}';}};})(jQuery);(function($){$.facebox=function(data,klass){$.facebox.loading();if(data.ajax)fillFaceboxFromAjax(data.ajax);else if(data.image)fillFaceboxFromImage(data.image);else if(data.div)fillFaceboxFromHref(data.div);else if($.isFunction(data))data.call($);else $.facebox.reveal(data,klass);}
$.extend($.facebox,{settings:{opacity:0,overlay:true,loadingImage:'/facebox/loading.gif',closeImage:'/facebox/closelabel.gif',imageTypes:['png','jpg','jpeg','gif'],faceboxHtml:'\
                <div id="facebox" style="display:none;"> \
                  <div class="popup"> \
                    <table> \
                      <tbody> \
                        <tr> \
                          <td class="tl"/><td class="b"/><td class="tr"/> \
                        </tr> \
                        <tr> \
                          <td class="b"/> \
                          <td class="body"> \
                            <div class="content"> \
                            </div> \
                            <div class="footer"> \
                              <a href="#" class="close"> \
                                <img src="/facebox/closelabel.gif" title="" class="close_image" /> \
                              </a> \
                            </div> \
                          </td> \
                          <td class="b"/> \
                        </tr> \
                        <tr> \
                          <td class="bl"/><td class="b"/><td class="br"/> \
                        </tr> \
                      </tbody> \
                    </table> \
                  </div> \
                </div>'},loading:function(){init();if($('#facebox .loading').length==1)return true;showOverlay();$('#facebox .content').empty();$('#facebox .body').children().hide().end().append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>');$('#facebox').css({top:getPageScroll()[1]+(getPageHeight()/10),left:385.5}).show();$(document).trigger('loading.facebox');},reveal:function(data,klass){$(document).trigger('beforeReveal.facebox');if(klass)$('#facebox .content').addClass(klass);$('#facebox .content').append(data);$('#facebox .loading').remove();$('#facebox .body').children().show();$('#facebox').css('left',$(window).width()/2-($('#facebox .popup').width()/2));$(document).trigger('reveal.facebox').trigger('afterReveal.facebox');},close:function(){$(document).trigger('close.facebox');return false;}})
$.fn.facebox=function(settings){init(settings);function clickHandler(){$.facebox.loading(true);var klass=this.rel.match(/facebox\[?\.(\w+)\]?/);if(klass)klass=klass[1];fillFaceboxFromHref(this.href,klass);return false;}
return this.click(clickHandler);}
function init(settings){if($.facebox.settings.inited)return true;else $.facebox.settings.inited=true;$(document).trigger('init.facebox');var imageTypes=$.facebox.settings.imageTypes.join('|');$.facebox.settings.imageTypesRegexp=new RegExp('\.'+imageTypes+'$','i');if(settings)$.extend($.facebox.settings,settings);$('body').append($.facebox.settings.faceboxHtml);var preload=[new Image(),new Image()];preload[0].src=$.facebox.settings.closeImage;preload[1].src=$.facebox.settings.loadingImage;$('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function(){preload.push(new Image());preload.slice(-1).src=$(this).css('background-image').replace(/url\((.+)\)/,'$1');})
$('#facebox .close').click($.facebox.close);$('#facebox .close_image').attr('src',$.facebox.settings.closeImage);}
function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
return new Array(xScroll,yScroll);}
function getPageHeight(){var windowHeight;if(self.innerHeight){windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else if(document.body){windowHeight=document.body.clientHeight;}
return windowHeight;}
function fillFaceboxFromHref(href,klass){if(href.match(/#/)){var url=window.location.href.split('#')[0];var target=href.replace(url,'');$.facebox.reveal($(target).clone().show(),klass);}else if(href.match($.facebox.settings.imageTypesRegexp)){fillFaceboxFromImage(href,klass);}else{fillFaceboxFromAjax(href,klass);}}
function fillFaceboxFromImage(href,klass){var image=new Image();image.onload=function(){$.facebox.reveal('<div class="image"><img src="'+image.src+'" /></div>',klass);}
image.src=href;}
function fillFaceboxFromAjax(href,klass){$.get(href,function(data){$.facebox.reveal(data,klass)});}
function skipOverlay(){return $.facebox.settings.overlay==false||$.facebox.settings.opacity===null;}
function showOverlay(){if(skipOverlay())return;if($('facebox_overlay').length==0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');$('#facebox_overlay').hide().addClass("facebox_overlayBG").css('opacity',$.facebox.settings.opacity).show();return false;}
function hideOverlay(){if(skipOverlay())return;$("#facebox_overlay").removeClass("facebox_overlayBG");$("#facebox_overlay").addClass("facebox_hide");$("#facebox_overlay").remove();$('#facebox_overlay').hide();return false;}
$(document).bind('close.facebox',function(){$('#facebox').hide();$('#facebox .content').removeClass().addClass('content');hideOverlay();$('#facebox .loading').remove();})})(jQuery);(function($){$.extend({ahover:{version:1.0,defaults:{toggleSpeed:75,toggleEffect:'both',hoverEffect:null,moveSpeed:250,easing:'swing',className:'ahover'},effects:{'width':{width:0},'height':{height:0},'both':{width:0,height:0}}}});$.fn.extend({ahover:function(options){var options=$.extend({},$.ahover.defaults,options);var effect=((typeof options.toggleEffect=='string')?$.ahover.effects[options.toggleEffect]:options.toggleEffect);var parent=this.offsetParent();return this.hover(function(e){var over=$(this);var overSize={width:over.outerWidth(),height:over.outerHeight()};var overOffset=over.offset();var parentOffset=parent.offset();var under=$('div.'+options.className,parent).stop();var created=(under.length==0);if(created){under=$('<div> </div>').addClass(options.className).appendTo(parent).css(overSize);}
var underOffset={left:overOffset.left-parentOffset.left-
(under.outerWidth()-under.width())/2,top:overOffset.top-parentOffset.top-
(under.outerHeight()-under.height())/2}
if(created){under.css(underOffset).css(effect).animate(overSize,{queue:false,duration:options.toggleSpeed,easing:options.easing});}
else{var underCSS=$.extend({},overSize,underOffset);under.animate(underCSS,{queue:false,duration:options.moveSpeed,easing:options.easing});}
if($.isFunction(options.hoverEffect)){under.queue(options.hoverEffect);}},function(e){$('div.'+options.className,parent).animate(effect,{queue:false,duration:options.toggleSpeed,easing:options.easing,complete:function(){$(this).remove();}});});}});})(jQuery);(function($){$.fn.watermark=function(options){var opts=$.extend({},$.fn.watermark.defaults,options);return this.each(function(){var target=$(this);function clear(){if(target.val()==opts.defaultText&&target.hasClass(opts.watermarkCss)){target.val("").removeClass(opts.watermarkCss);}}
function renderDefault(){if($.trim(target.val())===''){target.val(opts.defaultText).addClass(opts.watermarkCss);}}
target.focus(clear);target.blur(renderDefault);target.change(renderDefault);renderDefault();});};$.fn.watermark.defaults={defaultText:'search',watermarkCss:'watermark'};})(jQuery);(function($){$.fn.rater=function(options){var opts=$.extend({},$.fn.rater.defaults,options);return this.each(function(){var $this=$(this);var $on=$this.find('.ui-rater-starsOn');var $off=$this.find('.ui-rater-starsOff');if(opts.size==undefined)opts.size=$off.height();if(opts.rating==undefined)opts.rating=$on.width()/opts.size;if(opts.id==undefined)opts.id=$this.attr('id');$off.mousemove(function(e){var left=e.clientX-$off.offset().left;var width=$off.width()-($off.width()-left);width=Math.min(Math.ceil(width/(opts.size/opts.step))*opts.size/opts.step,opts.size*opts.ratings.length)
$on.width(width);var r=Math.round($on.width()/$off.width()*(opts.ratings.length*opts.step))/opts.step;$this.attr('title',opts.ratings[r-1]==undefined?r:opts.ratings[r-1]);}).hover(function(e){$on.addClass('ui-rater-starsHover');},function(e){$on.removeClass('ui-rater-starsHover');$on.width(opts.rating*opts.size);}).click(function(e){var r=Math.round($on.width()/$off.width()*(opts.ratings.length*opts.step))/opts.step;$.fn.rater.rate($this,opts,r);}).css('cursor','pointer');$on.css('cursor','pointer');});};$.fn.rater.defaults={postHref:location.href,ratings:['Bad','Boring','Average','Good','Great'],step:1};$.fn.rater.rate=function($this,opts,rating){var $on=$this.find('.ui-rater-starsOn');var $off=$this.find('.ui-rater-starsOff');$off.fadeTo(600,0.4,function(){$.ajax({url:opts.postHref,type:"POST",data:'id='+opts.id+'&rating='+rating,complete:function(req){if(req.status==200){if(req.responseText=="HASRATED"){alert("You already rated this post");}else{opts.rating=parseFloat(req.responseText);$off.unbind('click').unbind('mousemove').unbind('mouseenter').unbind('mouseleave');$off.css('cursor','default');$on.css('cursor','default');$off.fadeTo(600,0.1,function(){$on.removeClass('ui-rater-starsHover').width(opts.rating*opts.size);var $count=$this.find('.ui-rater-rateCount');$count.text(parseInt($count.text())+1);$this.find('.ui-rater-rating').text(opts.rating.toFixed(1));$off.fadeTo(500,1);$this.attr('title','Your rating: '+rating.toFixed(1));});alert("Your rating has been registered. Thank you!");}}else{alert("An error occured while registering your rating. Please try again");$off.fadeTo(2200,1);}}});});};})(jQuery);(function($){jQuery.fn.extend({check:function(){return this.each(function(){this.checked=true;});},uncheck:function(){return this.each(function(){this.checked=false;});}});$.fn.s3Capcha=function(vars){var element=this;var spans=$("#"+element[0].id+" div span");var radios=$("#"+element[0].id+" div span input");var images=$("#"+element[0].id+" div .img");spans.css({'display':'none'});images.css({'display':'block'});images.each(function(i){$(images[i]).click(function(){images.css({'background-position':'bottom left'});$(images[i]).css({'background-position':'top left'});$(radios[i]).check();});});}})(jQuery);(function($){$.timeago=function(timestamp){if(timestamp instanceof Date)return inWords(timestamp);else if(typeof timestamp=="string")return inWords($.timeago.parse(timestamp));else return inWords($.timeago.datetime(timestamp));};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:60000,allowFuture:false,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",ago:null,fromNow:null,seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years"}},inWords:function(distanceMillis){var $l=this.settings.strings;var prefix=$l.prefixAgo;var suffix=$l.suffixAgo||$l.ago;if(this.settings.allowFuture){if(distanceMillis<0){prefix=$l.prefixFromNow;suffix=$l.suffixFromNow||$l.fromNow;}
distanceMillis=Math.abs(distanceMillis);}
var seconds=distanceMillis/1000;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;var words=seconds<45&&substitute($l.seconds,Math.round(seconds))||seconds<90&&substitute($l.minute,1)||minutes<45&&substitute($l.minutes,Math.round(minutes))||minutes<90&&substitute($l.hour,1)||hours<24&&substitute($l.hours,Math.round(hours))||hours<48&&substitute($l.day,1)||days<30&&substitute($l.days,Math.floor(days))||days<60&&substitute($l.month,1)||days<365&&substitute($l.months,Math.floor(days/30))||years<2&&substitute($l.year,1)||substitute($l.years,Math.floor(years));return $.trim([prefix,words,suffix].join(" "));},parse:function(iso8601){var s=$.trim(iso8601);s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(s);},datetime:function(elem){var isTime=$(elem).get(0).tagName.toLowerCase()=='time';var iso8601=isTime?$(elem).attr('datetime'):$(elem).attr('title');return $t.parse(iso8601);}});$.fn.timeago=function(){var self=this;self.each(refresh);var $s=$t.settings;if($s.refreshMillis>0){setInterval(function(){self.each(refresh);},$s.refreshMillis);}
return self;};function refresh(){var data=prepareData(this);if(!isNaN(data.datetime)){$(this).text(inWords(data.datetime));}
return this;}
function prepareData(element){element=$(element);if(element.data("timeago")===undefined){element.data("timeago",{datetime:$t.datetime(element)});var text=$.trim(element.text());if(text.length>0)element.attr("title",text);}
return element.data("timeago");}
function inWords(date){return $t.inWords(distance(date));}
function distance(date){return(new Date().getTime()-date.getTime());}
function substitute(stringOrFunction,value){var string=$.isFunction(stringOrFunction)?stringOrFunction(value):stringOrFunction;return string.replace(/%d/i,value);}
document.createElement('abbr');document.createElement('time');})(jQuery);if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){var _25=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}
return _25;};deconcept.PlayerVersion=function(_29){this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;this.minor=parseInt(_29[1])||0;this.rev=parseInt(_29[2])||0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(q){var _2d=q.indexOf(_2b+"=");var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e);}}return"";}};if(Array.prototype.push==null){Array.prototype.push=function(_2f){this[this.length]=_2f;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;