;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:100,fade:false,showURL:false,extraClass:"",top:-40,left:20,id:"tooltip",showBody:'|'},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return $(document).delegate(this.selector,'mouseover.tooltip',function(event){if(!$.data(this,"tooltip")){if(!this.title||this.title=='')return false;$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;this.alt="";this.title="";};save.call(this,event);return false;}).delegate(this.selector,'mouseout.tooltip',hide).delegate(this.selector,'mousedown.tooltip',hide);},remove_tooltip:function(){return $(this).removeData('tooltip');},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')
$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)
return;helper.parent=$('<div id="'+settings.id+'"><div class="header"></div><div class="body"></div></div>').appendTo(document.body).hide().click(hide);if($.fn.bgiframe)
helper.parent.bgiframe();helper.title=helper.parent.find('div.header');helper.body=helper.parent.find('div.body');}
function settings(element){return $.data(element,"tooltip");}
function handle(event){if(settings(this).delay)
tID=setTimeout(show,settings(this).delay);else
show();update(event);}
function save(){if($.tooltip.blocked||this==current)return;if($(this).is(".dragging"))return;current=this;title=this.tooltipText;var thissettings=settings(this);if(!settings)return false;if(thissettings.showBody){var parts=title.split(thissettings.showBody);if(parts.length>1){helper.title.html(parts.shift()).show();}else{helper.title.empty().hide();}
helper.body.empty();helper.body.append(parts.join('<br>'));helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}
helper.parent.addClass(thissettings.extraClass);if(thissettings.fixPNG)
helper.parent.fixPNG();handle.apply(this,arguments);return false;}
function show(){tID=null;helper.parent.show();update();}
function update(event){if($.tooltip.blocked)
return;if(event&&event.target.tagName=="OPTION"){return;}
var thissettings=settings(current);if(current==null||!thissettings){return;}
helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+thissettings.left;top=event.pageY+thissettings.top;var right='auto';if(thissettings.positionLeft){right=$(window).width()-left;left='auto';}
helper.parent.css({left:left,right:right,top:top});}
var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+thissettings.left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}
if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+thissettings.top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}
function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}
function hide(event){if($.tooltip.blocked)
return;if(tID)
clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.hide();if(tsettings)
helper.parent.removeClass(tsettings.extraClass)}
if((!IE||!$.fn.bgiframe)&&tsettings&&tsettings.fade){if(helper.parent.is(':animated'))
helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(tsettings&&tsettings.fixPNG)
helper.parent.unfixPNG();}
$.hidetooltip=function(){$("#tooltip").hide();}})(jQuery);

(function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)
$('<div id="jGrowl"></div>').addClass((o&&o.position)?o.position:$.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',$.extend(new $.fn.jGrowl(),{notifications:[],element:null,interval:null}));$(this).data('jGrowl.instance').startup(this);}
if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').create(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{pool:0,header:'',group:'',sticky:false,position:'top-right',glue:'after',theme:'default',themeState:'highlight',corners:'10px',check:250,life:3000,closeDuration:'normal',openDuration:'normal',easing:'swing',closer:true,closeTemplate:'&times;',closerTemplate:'<div>[ close all ]</div>',log:function(e,m,o){},beforeOpen:function(e,m,o){},afterOpen:function(e,m,o){},open:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},notifications:[],element:null,interval:null,create:function(message,o){var o=$.extend({},this.defaults,o);if(typeof o.speed!=='undefined'){o.openDuration=o.speed;o.closeDuration=o.speed;}
this.notifications.push({message:message,options:o});o.log.apply(this.element,[this.element,message,o]);},render:function(notification){var self=this;var message=notification.message;var o=notification.options;o.themeState=(o.themeState=='')?'':'ui-state-'+o.themeState;var notification=$('<div class="jGrowl-notification '+o.themeState+' ui-corner-all'+
((o.group!=undefined&&o.group!='')?' '+o.group:'')+'">'+'<div class="jGrowl-close">'+o.closeTemplate+'</div>'+'<div class="jGrowl-header">'+o.header+'</div>'+'<div class="jGrowl-message">'+message+'</div></div>').data("jGrowl",o).addClass(o.theme).children('div.jGrowl-close').bind("click.jGrowl",function(){$(this).parent().trigger('jGrowl.close');}).parent();$(notification).bind("mouseover.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",true);}).bind("mouseout.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",false);}).bind('jGrowl.beforeOpen',function(){if(o.beforeOpen.apply(notification,[notification,message,o,self.element])!=false){$(this).trigger('jGrowl.open');}}).bind('jGrowl.open',function(){if(o.open.apply(notification,[notification,message,o,self.element])!=false){if(o.glue=='after'){$('div.jGrowl-notification:last',self.element).after(notification);}else{$('div.jGrowl-notification:first',self.element).before(notification);}
$(this).animate(o.animateOpen,o.openDuration,o.easing,function(){if($.browser.msie&&(parseInt($(this).css('opacity'),10)===1||parseInt($(this).css('opacity'),10)===0))
this.style.removeAttribute('filter');if($(this).data("jGrowl")!=null)
$(this).data("jGrowl").created=new Date();$(this).trigger('jGrowl.afterOpen');});}}).bind('jGrowl.afterOpen',function(){o.afterOpen.apply(notification,[notification,message,o,self.element]);}).bind('jGrowl.beforeClose',function(){if(o.beforeClose.apply(notification,[notification,message,o,self.element])!=false)
$(this).trigger('jGrowl.close');}).bind('jGrowl.close',function(){$(this).data('jGrowl.pause',true);$(this).animate(o.animateClose,o.closeDuration,o.easing,function(){if($.isFunction(o.close)){if(o.close.apply(notification,[notification,message,o,self.element])!==false)
$(this).remove();}else{$(this).remove();}});}).trigger('jGrowl.beforeOpen');if(o.corners!=''&&$.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',self.element).size()>1&&$('div.jGrowl-closer',self.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer '+this.defaults.themeState+' ui-corner-all').addClass(this.defaults.theme).appendTo(self.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().trigger("jGrowl.beforeClose");if($.isFunction(self.defaults.closer)){self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);}});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+parseInt($(this).data("jGrowl").life))<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl.pause")==undefined||$(this).data("jGrowl.pause")!=true)){$(this).trigger('jGrowl.beforeClose');}});if(this.notifications.length>0&&(this.defaults.pool==0||$(this.element).find('div.jGrowl-notification:parent').size()<this.defaults.pool))
this.render(this.notifications.shift());if($(this.element).find('div.jGrowl-notification:parent').size()<2){$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){$(this).remove();});}},startup:function(e){this.element=$(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){$(e).data('jGrowl.instance').update();},parseInt(this.defaults.check));if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"]){$(this.element).addClass('ie6');}},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);},close:function(){$(this.element).find('div.jGrowl-notification').each(function(){$(this).trigger('jGrowl.beforeClose');});}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);

jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/9/2009
 * @author Ariel Flesler
 * @version 1.4.1
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
/*yepnope1.0.2|WTFPL*/(function(a,b,c){function H(){var a=z;a.loader={load:G,i:0};return a}function G(a,b,c){var e=b=="c"?r:q;i=0,b=b||"j",u(a)?F(e,a,b,this.i++,d,c):(h.splice(this.i++,0,a),h.length==1&&E());return this}function F(a,c,d,g,j,l){function q(){!o&&A(n.readyState)&&(p.r=o=1,!i&&B(),n.onload=n.onreadystatechange=null,e(function(){m.removeChild(n)},0))}var n=b.createElement(a),o=0,p={t:d,s:c,e:l};n.src=n.data=c,!k&&(n.style.display="none"),n.width=n.height="0",a!="object"&&(n.type=d),n.onload=n.onreadystatechange=q,a=="img"?n.onerror=q:a=="script"&&(n.onerror=function(){p.e=p.r=1,E()}),h.splice(g,0,p),m.insertBefore(n,k?null:f),e(function(){o||(m.removeChild(n),p.r=p.e=o=1,B())},z.errorTimeout)}function E(){var a=h.shift();i=1,a?a.t?e(function(){a.t=="c"?D(a):C(a)},0):(a(),B()):i=0}function D(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(o||j)){var g=function(a){e(function(){if(!d)try{a.sheet.cssRules.length?(d=1,B()):g(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,e(function(){B()},0)):g(a)}},0)};g(c)}else c.onload=function(){d||(d=1,e(function(){B()},0))},a.e&&c.onload();e(function(){d||(d=1,B())},z.errorTimeout),!a.e&&f.parentNode.insertBefore(c,f)}function C(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&A(c.readyState)&&(d=1,B(),c.onload=c.onreadystatechange=null)},e(function(){d||(d=1,B())},z.errorTimeout),a.e?c.onload():f.parentNode.insertBefore(c,f)}function B(){var a=1,b=-1;while(h.length- ++b)if(h[b].s&&!(a=h[b].r))break;a&&E()}function A(a){return!a||a=="loaded"||a=="complete"}var d=b.documentElement,e=a.setTimeout,f=b.getElementsByTagName("script")[0],g={}.toString,h=[],i=0,j="MozAppearance"in d.style,k=j&&!!b.createRange().compareNode,l=j&&!k,m=k?d:f.parentNode,n=a.opera&&g.call(a.opera)=="[object Opera]",o="webkitAppearance"in d.style,p=o&&"async"in b.createElement("script"),q=j?"object":n||p?"img":"script",r=o?"img":q,s=Array.isArray||function(a){return g.call(a)=="[object Array]"},t=function(a){return Object(a)===a},u=function(a){return typeof a=="string"},v=function(a){return g.call(a)=="[object Function]"},w=[],x={},y,z;z=function(a){function h(a,b){function i(a){if(u(a))g(a,f,b,0,c);else if(t(a))for(h in a)a.hasOwnProperty(h)&&g(a[h],f,b,h,c)}var c=!!a.test,d=c?a.yep:a.nope,e=a.load||a.both,f=a.callback,h;i(d),i(e),a.complete&&b.load(a.complete)}function g(a,b,d,e,g){var h=f(a),i=h.autoCallback;if(!h.bypass){b&&(b=v(b)?b:b[a]||b[e]||b[a.split("/").pop().split("?")[0]]);if(h.instead)return h.instead(a,b,d,e,g);d.load(h.url,h.forceCSS||!h.forceJS&&/css$/.test(h.url)?"c":c,h.noexec),(v(b)||v(i))&&d.load(function(){H(),b&&b(h.origUrl,g,e),i&&i(h.origUrl,g,e)})}}function f(a){var b=a.split("!"),c=w.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=x[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=w[h](f);return f}var b,d,e=this.yepnope.loader;if(u(a))g(a,0,e,0);else if(s(a))for(b=0;b<a.length;b++)d=a[b],u(d)?g(d,0,e,0):s(d)?z(d):t(d)&&h(d,e);else t(a)&&h(a,e)},z.addPrefix=function(a,b){x[a]=b},z.addFilter=function(a){w.push(a)},z.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",y=function(){b.removeEventListener("DOMContentLoaded",y,0),b.readyState="complete"},0)),a.yepnope=H()})(this,this.document)

/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();

jQuery.root=jQuery(document);jQuery.ShowMessage=function(message,theme,life){$.jGrowl(message,{life:15000,theme:"success",animateOpen:{height:"show"},closerTemplate:'<div>[ закрыть все ]</div>',theme:theme,life:life});};$.update_list=function(url,fname,pvalue){$('#'+fname).html('<option>Загружается...</option>').load(url,{fname:fname,parent_id:pvalue},function(){$(this).trigger('change')});};window.messageBox={alert:function(header,message,theme,life){var numargs=arguments.length;if(numargs<4){life=theme;theme=message;message=header;header='';}
jQuery.jGrowl(message,$.extend({header:false,life:5000,theme:"success",animateOpen:{height:"show"},closerTemplate:'<div>[ закрыть все ]</div>'},{header:header,theme:theme,life:life}));}}
window.scroll_to={scrollTimeout:null,bottom:function(domelement){if(this.scrollTimeout)clearTimeout(this.scrollTimeout);this.scrollTimeout=setTimeout(function(){domelement.scrollTop=10000000},100);},top:function(domelement){if(this.scrollTimeout)clearTimeout(this.scrollTimeout);this.scrollTimeout=setTimeout(function(){domelement.scrollTop=0},100);}};jQuery.live=function(selector,type,fn)
{var r=$([]);r.selector=selector;if(type&&fn){r.live(type,fn);}
return r;};(function(){if(!window.console||!console.firebug)
{var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"],i,f=function(){};window.console={};for(i=0;i<names.length;++i)window.console[names[i]]=f;};})();function clearSelection(){var sel;if(document.selection&&document.selection.empty){document.selection.empty();}else if(window.getSelection){sel=window.getSelection();if(sel&&sel.removeAllRanges)
sel.removeAllRanges();}}
(function(){if($.ui){(function(){var u=0;function s(){return++u};$.extend($.ui.tabs.prototype,{_tabId:function(a){return a.rel&&this.options.idPrefix+a.rel.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+s();}});})();if($.fn.button){(function(){$.fn.extend($.ui.dialog.prototype,{_original_createButtons:$.ui.dialog.prototype._createButtons,_createButtons:function(buttons){this._original_createButtons(buttons);var b=this.uiDialog.find('.ui-dialog-buttonpane .ui-button');if(!b.length)return;b=b.first();$.each(buttons,function(name,props){if(typeof props.icons==='object'){b.button({icons:props.icons});}
b=b.next();});return;}});$.fn.extend($.ui.button.prototype,{_original_resetButton:$.ui.button.prototype._resetButton,_resetButton:function(){if(!(this.options.icons.primary||this.options.icons.secondary)){this.options.icons={primary:this.element.data('icons-primary'),secondary:this.element.data('icons-secondary')}}
this._original_resetButton();}});})();};}})();jQuery.fn.extend({insertAtCaret:function(string){return this.each(function(){var obj=this;obj.focus();if(typeof(document.selection)!='undefined'){var range=document.selection.createRange();if(range.parentElement()!=obj)
return;range.text=string;range.select();}else if(typeof(obj.selectionStart)!='undefined'){var start=obj.selectionStart;obj.value=obj.value.substr(0,start)
+string
+obj.value.substr(obj.selectionEnd,obj.value.length);start+=string.length;obj.setSelectionRange(start,start);}else{obj.value+=string;obj.focus();}});}});

$(function(){var toTop=$('#toTop').click(function(){jQuery.scrollTo(0,1000);return false;});$('.vcard_block').delegate('a','click',function(){if(this.href.split('?',2).length>1)return true;var key=$(this).parents('.vcard_block').data('timekey');this.href+='?click='+key;return true;});});

jQuery.myVotes={url:'/functions/vote/',object:null,vote:function(){jQuery.myVotes.object=null;if(typeof this.target=='undefined'||typeof this.rel=='undefined'||typeof this.rev=='undefined'||typeof jQuery.myVotes['for_'+this.target]!='function')return false;jQuery.myVotes.object=this;$(jQuery.myVotes.object).fadeTo('normal',.1);jQuery.myVotes['for_'+this.target](this.rel,this.rev);return false;},for_content:function(id,dir){$.post(this.url+'for_content.html',{id:id,dir:dir},jQuery.myVotes.for_content_dispatcher,'json');},for_projects:function(id,dir){$.post(this.url+'for_projects.html',{id:id,dir:dir},jQuery.myVotes.for_projects_dispatcher,'json');},for_comment:function(id,dir){$.post(this.url+'for_comment.html',{id:id,dir:dir},jQuery.myVotes.for_comment_dispatcher,'json');},for_projects_dispatcher:function(j){if(!j)return jQuery.myVotes.ithappens();$(jQuery.myVotes.object).fadeTo('fast',1);if(j.message){messageBox.alert(j.message,j.error?'error':'success');}
if(typeof j.result!='undefined'){jQuery('.votes_count_'+j.id).text(j.result);}
if(typeof j.vote_potential!='undefined'){jQuery.myVotes.update_vote_potential(j.vote_potential);}},for_content_dispatcher:function(j){if(!j)return jQuery.myVotes.ithappens();$(jQuery.myVotes.object).fadeTo('fast',1);if(j.message){messageBox.alert(j.message,j.error?'error':'success');}
if(typeof j.result!='undefined'){jQuery('.votes_count_'+j.id).text(j.result);}
if(typeof j.vote_potential!='undefined'){jQuery.myVotes.update_vote_potential(j.vote_potential);}},for_comment_dispatcher:function(j){if(!j)return jQuery.myVotes.ithappens();$(jQuery.myVotes.object).fadeTo('fast',1);if(j.message){messageBox.alert(j.message,j.error?'error':'success');}
if(typeof j.result!='undefined'){jQuery('#comment_rating_'+j.id).text(j.result).removeClass('positive negative').addClass(parseInt(j.result)>0?'positive':'negative');}
if(typeof j.vote_potential!='undefined'){jQuery.myVotes.update_vote_potential(j.vote_potential);}},ithappens:function(){messageBox.alert('Что-то пошло не так.<br>Обновите страницу','error');;},update_vote_potential:function(value){$("#vote_potential_value").text(value||0);}};

jQuery.myFavorites={url:'/functions/favorites/',object:null,toggle:function(){jQuery.myFavorites.object=this;$(jQuery.myFavorites.object).fadeTo('fast',.1);$.post(jQuery.myFavorites.url+'toggle.html',{id:this.rel,target:this.target},jQuery.myFavorites.dispatcher,'json');return false;},dispatcher:function(j){if(j.message){messageBox.alert(j.message,j.error?'error':'success');}
if(typeof j.status!='undefined'){$(jQuery.myFavorites.object).toggleClass('in_favorites',j.status);}
$(jQuery.myFavorites.object).fadeTo('fast',1);}};

jQuery.myComments={replyto_last:0,last_comment_date:0,content_id:0,reload_button:null,tinyMCE_started:false,init:function(content_id,last_comment_id){jQuery("#comments").delegate("a.comment_reply","click",jQuery.myComments.reply).delegate("a.comment_edit","click",jQuery.myComments.edit).delegate("a.comment_vote_plus","click",jQuery.myVotes.vote).delegate("a.comment_vote_minus","click",jQuery.myVotes.vote);jQuery("#last_comment_line").bind('click',jQuery.myComments.reply);this.content_id=content_id;this.last_comment_id=last_comment_id;this.create_mask_new_button();},load_new_comments:function(){jQuery.myComments.reload_button.stop().animate({left:-40},200);jQuery.post('/comments/get_new_comments.html',{id:jQuery.myComments.content_id,last_comment_id:jQuery.myComments.last_comment_id},jQuery.myComments.load_new_comments_handler,'json');return false;},load_new_comments_handler:function(j){jQuery.myComments.reload_button.stop().animate({left:0},1000);if(!j||!j.comments)return;var obj=jQuery("#comments").children('ul.comentry');if(!obj.length){obj=$('<ul class="comentry" />').appendTo(jQuery("#comments"));}
for(var k in j.comments){var entry=j.comments[k];if(entry.parent_id==0){obj.append(entry.content);}else{var parent=obj.find("#comment-"+entry.parent_id);var nested=parent.children('ul.comentry');if(!nested.length){nested=$('<ul class="comentry" />').appendTo(parent);}
nested.append(entry.content);}
if(jQuery.myComments.last_comment_id<entry.id){jQuery.myComments.last_comment_id=entry.id;}}},create_reload_button:function(){this.reload_button=$('<a href="#" id="new_comments_button" title="Обновить комментарии без перезагрузки страницы" />').css({opacity:0.5}).bind('mouseover',function(){$(this).css({opacity:1})}).bind('mouseout',function(){$(this).css({opacity:.5})}).bind('click',jQuery.myComments.load_new_comments).appendTo('#body_overlay')},reply:function(){var id=parseInt(this.rel);if(jQuery.myComments.replyto_last==id){if(id==0){if(jQuery.myComments.tinyMCE_started){tinyMCE.execCommand('mceFocus',false,'comments_textarea');}
return false;}
id=0;}
if(jQuery.myComments.tinyMCE_started){tinyMCE.execCommand('mceRemoveControl',false,'comments_textarea');}
if(id==0){$("#add_comment_block").insertAfter($("#last_comment_line")).find('input[name=replyto]').val(id);}else{$("#add_comment_block").appendTo($("#comment-"+id).find('.comment_body:eq(0)')).find('input[name=replyto]').val(id);}
$("#comments_textarea").val('');if(jQuery.myComments.tinyMCE_started){tinyMCE.execCommand('mceAddControl',false,'comments_textarea');tinyMCE.execCommand('mceFocus',false,'comments_textarea');}
jQuery.myComments.replyto_last=id;return false;},add_personal:function(){var replied=jQuery.myComments.replyto_last?$("#comment-"+jQuery.myComments.replyto_last+"-author"):$("#entry_author");if(!replied.length)return false;var sex=replied.data('users_sex')==2?'ая':'ый',name_parts=replied.clone().children('.prof_status').remove().end().text().trim().split(' '),io=name_parts.slice(name_parts.length==3?1:0).join(' ');$("#comments_textarea").val('Уважаем'+sex+' '+io+', '+$("#comments_textarea").val()).focus();},edit:function(){var id='edit_comment_'+parseInt(this.rel);var remove=$('#'+id+' textarea').length;if(!jQuery.myComments.tinyMCE_started){jQuery.myComments.init_tinyMCE();}
var parent=$(this).parents('.comment_body:eq(0)');parent.find('.edit_comment').each(function(){var o=$(this);var ta=o.find('textarea').eq(0);if(ta.length){if(jQuery.myComments.tinyMCE_started){tinyMCE.execCommand('mceRemoveControl',false,ta.attr('id'));}}
o.remove();});if(!remove){$('<div id="'+id+'" class="add_comment edit_comment" />').appendTo(parent).load('/comments/get_comment_edit_form.html',{id:parseInt(this.rel)},function(){if(jQuery.myComments.tinyMCE_started){tinyMCE.execCommand('mceAddControl',false,'comments_textarea_edit');}
jQuery('#comment_form_edit').bind('submit',function(){if(jQuery.myComments.tinyMCE_started){tinyMCE.triggerSave();}
if($(this).find('#comments_textarea_edit').val().length<10){$.ShowMessage('Слишком короткий комментарий');return false;}
return true;})});}
return false;},start_tinyMCE:function(){yepnope({test:tinyMCE,nope:['/plugins/tiny_mce/tiny_mce.js','/plugins/tiny_mce/tiny_mce_preload.js'],complete:jQuery.myComments.init_tinyMCE});},init_tinyMCE:function(){if(jQuery.myComments.tinyMCE_started){return;}
tinyMCE.init(tinymce.extend(tinyMCE._default_settings,{editor_selector:"comments_textarea",theme_advanced_buttons1:"bold,strikethrough,scite,|,slink,unlink,|,simage,code",valid_elements:"a[href],strong,s,img[src|width|height],br,cite",plugins:tinyMCE._default_settings.plugins}));tinyMCE.addI18n({ru:{autosave:{unload_msg:"Вы начали писать комментарий, хотите уйти с этой страницы?"}}});jQuery.myComments.tinyMCE_started=true;},goToParentComment:function(link){var elm=$(link),parent_id=elm.data('parent_id'),return_id=elm.data('return_id'),parent=$('#comment-'+parent_id);parent.find('.return-to-child:eq(0)').removeClass('hidden').data('child_id',return_id);$.scrollTo(parent,1000);return false;},goToChildComment:function(link){var elm=$(link),child_id=elm.data('child_id'),child=$('#comment-'+child_id);elm.addClass('hidden');$.scrollTo(child,1000);return false;},create_mask_new_opacity_100:function(){$(this).css({opacity:1});},create_mask_new_opacity_80:function(){$(this).css({opacity:.8});},create_mask_new_button:function(){var fresh=jQuery("#comments").find('.fresh_comment');if(fresh.length==0)return;var comments_new_actions=$("<div/>",{id:'comments_new_actions'}).prependTo('#bottom_bar_content');$('<a href="#" title="показать только свежие комментарии" class="mask_new_box icon icon_new" />').css({opacity:0.8}).bind('mouseover',jQuery.myComments.create_mask_new_opacity_100).bind('mouseout',jQuery.myComments.create_mask_new_opacity_80).bind('click',jQuery.myComments.mask_new).appendTo(comments_new_actions);$('<a href="#" title="перейти к следующему свежему комментарию" class="mask_new_box_next icon icon_new_next" />').css({opacity:0.8}).bind('mouseover',jQuery.myComments.create_mask_new_opacity_100).bind('mouseout',jQuery.myComments.create_mask_new_opacity_80).bind('click',jQuery.myComments.mask_new_next).data('fresh',fresh.toArray()).data('fresh_index',0).appendTo(comments_new_actions);},mask_new:function(){var obj=jQuery("#comments").children('ul.comentry'),masked=obj.data('masked_new');obj.find('.comment_block').not('.fresh_comment').toggleClass('dimmed',masked);obj.data('masked_new',!masked);return false;},mask_new_next:function(){var fresh=$.data(this,'fresh'),fresh_index=$.data(this,'fresh_index'),current=fresh[fresh_index];if(++fresh_index==fresh.length)fresh_index=0;$.data(this,'fresh_index',fresh_index);$.scrollTo(current,540);return false;},show_spoiler:function(){$(this).siblings('.spoiler_text').slideToggle(300);}}

jQuery.Im={w:null,open:function(userid){this.w=window.open('https://pravorub.ru/im/?u='+(userid||0),'im_window','width=950,height=600,toolbar=0,resizable=1,location=0,directories=0,status=1,menubar=0,scrollbars=0');if(typeof this.w.focus=='function'){this.w.focus();}},update_session:function(){var w=this.getwindow();if(w)w.jQuery.cookie('PHPSESSID',jQuery.cookie('PHPSESSID'),{secure:true})},getwindow:function(){return window.open('','im_window');},close:function(){var w=this.getwindow();if(w)w.close();},check_unreaded:function(){$.post('/im/check_new_messages.html',{},function(j){if(typeof j=='undefined')return;jQuery.Im.update_unreaded(j.count,j.newmessages);},'json');},update_unreaded:function(unreaded,newmessages){$("#im_unreaded_count").text(unreaded>0?'('+unreaded+')':'');if(newmessages&&unreaded>0){var elem=$("#im_unreaded_img").show();var animateTo=0;for(var i=0;i<6;i++){elem.animate({opacity:animateTo},{duration:200,queue:true});animateTo=(animateTo+1)%2;}}}};

function social_buttons(u,t,user){if(!u)u=location.href;if(!t)t=document.title;u=encodeURIComponent(u);t=encodeURIComponent(t);var buttons=new Array('"#" onclick="window.open(\'http://vkontakte.ru/share.php?url='+u+'&title='+t+'\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=200, top=200, width=554, height=421, toolbar=0, status=0\');return false" title="Поделиться В Контакте"','"http://www.odnoklassniki.ru/dk?st.cmd=addShare&st._surl='+u+'&title='+t+'" title="Добавить в Одноклассники"','"http://www.facebook.com/sharer.php?u='+u+'&t='+t+'" title="Поделиться в Facebook"','"http://www.livejournal.com/update.bml?event='+u+'&subject='+t+'" title="Опубликовать в LiveJournal"','"http://connect.mail.ru/share?url='+u+'&title='+t+'" title="Поделиться в Моем Мире@Mail.Ru"','"http://share.yandex.ru/go.xml?service=moikrug&url='+u+'&title='+t+'" title="Поделиться в Мой Круг"','"http://www.blogger.com/blog_this.pyra?t&u='+u+'&n='+t+'" title="Опубликовать в Blogger.com"','"http://www.liveinternet.ru/journal_post.php?action=n_add&cnurl='+u+'&cntitle='+t+'" title="Опубликовать в LiveInternet"','"http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+u+'&title='+t+'" title="Сохранить закладку в Google"','"http://my.ya.ru/posts_add_link.xml?URL='+u+'&title='+t+'" title="Поделиться в Я.ру"','"http://twitter.com/share?url='+u+'&text='+t+'&related='+user+'" title="Поделиться в Твиттере"');var html='';for(i=0;i<buttons.length;i++){html+='<a rel="nofollow" style="background:url(/assets/i/social/icons.png) -'+24*i+'px 0" href='+buttons[i]+' target="_blank"></a>';};document.write(html);};

