(function(c){function r(d,b,a){var i=a.relative?d.position().top:d.offset().top,f=a.relative?d.position().left:d.offset().left,e=a.position[0];i-=b.outerHeight()-a.offset[0];f+=d.outerWidth()+a.offset[1];if(/iPad/i.test(navigator.userAgent))i-=c(window).scrollTop();var k=b.outerHeight()+d.outerHeight();if(e=="center")i+=k/2;if(e=="bottom")i+=k;e=a.position[1];d=b.outerWidth()+d.outerWidth();if(e=="center")f-=d/2;if(e=="left")f-=d;return{top:i,left:f}}function m(d,b){var a=this,i=d.add(a),f,e=0,k= 0,o=d.attr("title"),p=d.attr("data-tooltip"),t=g[b.effect],n,j=d.is(":input"),h=j&&d.is(":checkbox, :radio, select, :button, :submit"),l=d.attr("type"),s=b.events[l]||b.events[j?h?"widget":"input":"def"];if(!t)throw'Nonexistent effect "'+b.effect+'"';s=s.split(/,\s*/);if(s.length!=2)throw"Tooltip: bad events configuration for "+l;d.bind(s[0],function(q){clearTimeout(e);if(b.predelay)k=setTimeout(function(){a.show(q)},b.predelay);else a.show(q)}).bind(s[1],function(q){clearTimeout(k);if(b.delay)e= setTimeout(function(){a.hide(q)},b.delay);else a.hide(q)});if(o&&b.cancelDefault){d.removeAttr("title");d.data("title",o)}c.extend(a,{show:function(q){if(!f){if(p)f=c(p);else if(b.tip)f=c(b.tip).eq(0);else if(o)f=c(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(o);else{f=d.next();f.length||(f=d.parent().next())}if(!f.length)throw"Cannot find tooltip for "+d;}if(a.isShown())return a;f.stop(true,true);var u=r(d,f,b);b.tip&&f.html(d.data("title"));q=q||c.Event();q.type="onBeforeShow"; i.trigger(q,[u]);if(q.isDefaultPrevented())return a;u=r(d,f,b);f.css({position:"absolute",top:u.top,left:u.left});n=true;t[0].call(a,function(){q.type="onShow";n="full";i.trigger(q)});u=b.events.tooltip.split(/,\s*/);if(!f.data("__set")){f.bind(u[0],function(){clearTimeout(e);clearTimeout(k)});u[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&f.bind(u[1],function(v){v.relatedTarget!=d[0]&&d.trigger(s[1].split(" ")[0])});f.data("__set",true)}return a},hide:function(q){if(!f||!a.isShown())return a; q=q||c.Event();q.type="onBeforeHide";i.trigger(q);if(!q.isDefaultPrevented()){n=false;g[b.effect][1].call(a,function(){q.type="onHide";i.trigger(q)});return a}},isShown:function(q){return q?n=="full":n},getConf:function(){return b},getTip:function(){return f},getTrigger:function(){return d}});c.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(q,u){c.isFunction(b[u])&&c(a).bind(u,b[u]);a[u]=function(v){v&&c(a).bind(u,v);return a}})}c.tools=c.tools||{version:"1.2.5"};c.tools.tooltip= {conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(d,b,a){g[d]=[b,a]}};var g={toggle:[function(d){var b=this.getConf(),a=this.getTip();b=b.opacity;b<1&&a.css({opacity:b});a.show();d.call()},function(d){this.getTip().hide(); d.call()}],fade:[function(d){var b=this.getConf();this.getTip().fadeTo(b.fadeInSpeed,b.opacity,d)},function(d){this.getTip().fadeOut(this.getConf().fadeOutSpeed,d)}]};c.fn.tooltip=function(d){var b=this.data("tooltip");if(b)return b;d=c.extend(true,{},c.tools.tooltip.conf,d);if(typeof d.position=="string")d.position=d.position.split(/,?\s/);this.each(function(){b=new m(c(this),d);c(this).data("tooltip",b)});return d.api?b:this}})(jQuery); (function(c){var r=c.tools.tooltip;c.extend(r.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!c.browser.msie});var m={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};r.addEffect("slide",function(g){var d=this.getConf(),b=this.getTip(),a=d.slideFade?{opacity:d.opacity}:{},i=m[d.direction]||m.up;a[i[1]]=i[0]+"="+d.slideOffset;d.slideFade&&b.css({opacity:0});b.show().animate(a,d.slideInSpeed,g)},function(g){var d=this.getConf(),b=d.slideOffset, a=d.slideFade?{opacity:0}:{},i=m[d.direction]||m.up,f=""+i[0];if(d.bounce)f=f=="+"?"-":"+";a[i[1]]=f+"="+b;this.getTip().animate(a,d.slideOutSpeed,function(){c(this).hide();g.call()})})})(jQuery); (function(c){var r=c.tools.tooltip;r.dynamic={conf:{classNames:"top right bottom left"}};c.fn.dynamic=function(m){if(typeof m=="number")m={speed:m};m=c.extend({},r.dynamic.conf,m);var g=m.classNames.split(/\s/),d;this.each(function(){var b=c(this).tooltip().onBeforeShow(function(a,i){a=this.getTip();var f=this.getConf();d||(d=[f.position[0],f.position[1],f.offset[0],f.offset[1],c.extend({},f)]);c.extend(f,d[4]);f.position=[d[0],d[1]];f.offset=[d[2],d[3]];a.css({visibility:"hidden",position:"absolute", top:i.top,left:i.left}).show();var e=a,k=c(window),o=k.width()+k.scrollLeft(),p=k.height()+k.scrollTop();i=[e.offset().top<=k.scrollTop(),o<=e.offset().left+e.width(),p<=e.offset().top+e.height(),k.scrollLeft()>=e.offset().left];a:{for(e=i.length;e--;)if(i[e]){e=false;break a}e=true}if(!e){if(i[2]){c.extend(f,m.top);f.position[0]="top";a.addClass(g[0])}if(i[3]){c.extend(f,m.right);f.position[1]="right";a.addClass(g[1])}if(i[0]){c.extend(f,m.bottom);f.position[0]="bottom";a.addClass(g[2])}if(i[1]){c.extend(f, m.left);f.position[1]="left";a.addClass(g[3])}if(i[0]||i[2])f.offset[0]*=-1;if(i[1]||i[3])f.offset[1]*=-1}a.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf();this.getTip();setTimeout(function(){a.position=[d[0],d[1]];a.offset=[d[2],d[3]]},0)});b.onHide(function(){this.getTip().removeClass(m.classNames)});ret=b});return m.api?ret:this}})(jQuery); (function(c){function r(d,b){var a=c(b);return a.length<2?a:d.parent().find(b)}function m(d,b){var a=this,i=d.add(a),f=d.children(),e=0,k=b.vertical;g||(g=a);if(f.length>1)f=c(b.items,d);c.extend(a,{getConf:function(){return b},getIndex:function(){return e},getSize:function(){return a.getItems().size()},getNaviButtons:function(){return t.add(n)},getRoot:function(){return d},getItemWrap:function(){return f},getItems:function(){return f.children(b.item).not("."+b.clonedClass)},move:function(h,l){return a.seekTo(e+ h,l)},next:function(h){return a.move(1,h)},prev:function(h){return a.move(-1,h)},begin:function(h){return a.seekTo(0,h)},end:function(h){return a.seekTo(a.getSize()-1,h)},focus:function(){return g=a},addItem:function(h){h=c(h);if(b.circular){f.children("."+b.clonedClass+":last").before(h);f.children("."+b.clonedClass+":first").replaceWith(h.clone().addClass(b.clonedClass))}else f.append(h);i.trigger("onAddItem",[h]);return a},seekTo:function(h,l,s){h.jquery||(h*=1);if(b.circular&&h===0&&e==-1&&l!== 0)return a;if(!b.circular&&h<0||h>a.getSize()||h<-1)return a;var q=h;if(h.jquery)h=a.getItems().index(h);else q=a.getItems().eq(h);var u=c.Event("onBeforeSeek");if(!s){i.trigger(u,[h,l]);if(u.isDefaultPrevented()||!q.length)return a}q=k?{top:-q.position().top}:{left:-q.position().left};e=h;g=a;if(l===undefined)l=b.speed;f.animate(q,l,b.easing,s||function(){i.trigger("onSeek",[h])});return a}});c.each(["onBeforeSeek","onSeek","onAddItem"],function(h,l){c.isFunction(b[l])&&c(a).bind(l,b[l]);a[l]=function(s){s&& c(a).bind(l,s);return a}});if(b.circular){var o=a.getItems().slice(-1).clone().prependTo(f),p=a.getItems().eq(1).clone().appendTo(f);o.add(p).addClass(b.clonedClass);a.onBeforeSeek(function(h,l,s){if(!h.isDefaultPrevented())if(l==-1){a.seekTo(o,s,function(){a.end(0)});return h.preventDefault()}else l==a.getSize()&&a.seekTo(p,s,function(){a.begin(0)})});a.seekTo(0,0,function(){})}var t=r(d,b.prev).click(function(){a.prev()}),n=r(d,b.next).click(function(){a.next()});if(!b.circular&&a.getSize()>1){a.onBeforeSeek(function(h, l){setTimeout(function(){if(!h.isDefaultPrevented()){t.toggleClass(b.disabledClass,l<=0);n.toggleClass(b.disabledClass,l>=a.getSize()-1)}},1)});b.initialIndex||t.addClass(b.disabledClass)}b.mousewheel&&c.fn.mousewheel&&d.mousewheel(function(h,l){if(b.mousewheel){a.move(l<0?1:-1,b.wheelSpeed||50);return false}});if(b.touch){var j={};f[0].ontouchstart=function(h){h=h.touches[0];j.x=h.clientX;j.y=h.clientY};f[0].ontouchmove=function(h){if(h.touches.length==1&&!f.is(":animated")){var l=h.touches[0],s= j.x-l.clientX;l=j.y-l.clientY;a[k&&l>0||!k&&s>0?"next":"prev"]();h.preventDefault()}}}b.keyboard&&c(document).bind("keydown.scrollable",function(h){if(!(!b.keyboard||h.altKey||h.ctrlKey||c(h.target).is(":input")))if(!(b.keyboard!="static"&&g!=a)){var l=h.keyCode;if(k&&(l==38||l==40)){a.move(l==38?-1:1);return h.preventDefault()}if(!k&&(l==37||l==39)){a.move(l==37?-1:1);return h.preventDefault()}}});b.initialIndex&&a.seekTo(b.initialIndex,0,function(){})}c.tools=c.tools||{version:"1.2.5"};c.tools.scrollable= {conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};var g;c.fn.scrollable=function(d){var b=this.data("scrollable");if(b)return b;d=c.extend({},c.tools.scrollable.conf,d);this.each(function(){b=new m(c(this),d);c(this).data("scrollable",b)});return d.api?b:this}})(jQuery); (function(c){var r=c.tools.scrollable;r.autoscroll={conf:{autoplay:true,interval:3E3,autopause:true}};c.fn.autoscroll=function(m){if(typeof m=="number")m={interval:m};var g=c.extend({},r.autoscroll.conf,m),d;this.each(function(){var b=c(this).data("scrollable");if(b)d=b;var a;b.play=function(){a||(a=setInterval(function(){b.next()},g.interval))};b.pause=function(){a=clearInterval(a)};b.stop=function(){b.pause()};g.autopause&&b.getRoot().add(b.getNaviButtons()).hover(b.pause,b.play);g.autoplay&&b.play()}); return g.api?d:this}})(jQuery); (function(c){function r(g,d){var b=c(d);return b.length<2?b:g.parent().find(d)}var m=c.tools.scrollable;m.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};c.fn.navigator=function(g){if(typeof g=="string")g={navi:g};g=c.extend({},m.navigator.conf,g);var d;this.each(function(){function b(n,j,h){e.seekTo(j);if(t){if(location.hash)location.hash=n.attr("href").replace("#","")}else return h.preventDefault()}function a(){return k.find(g.naviItem||"> *")} function i(n){var j=c("<"+(g.naviItem||"a")+"/>").click(function(h){b(c(this),n,h)}).attr("href","#"+n);n===0&&j.addClass(p);g.indexed&&j.text(n+1);g.idPrefix&&j.attr("id",g.idPrefix+n);return j.appendTo(k)}function f(n,j){n=a().eq(j.replace("#",""));n.length||(n=a().filter("[href="+j+"]"));n.click()}var e=c(this).data("scrollable"),k=g.navi.jquery?g.navi:r(e.getRoot(),g.navi),o=e.getNaviButtons(),p=g.activeClass,t=g.history&&c.fn.history;if(e)d=e;e.getNaviButtons=function(){return o.add(k)};a().length? a().each(function(n){c(this).click(function(j){b(c(this),n,j)})}):c.each(e.getItems(),function(n){i(n)});e.onBeforeSeek(function(n,j){setTimeout(function(){if(!n.isDefaultPrevented()){var h=a().eq(j);!n.isDefaultPrevented()&&h.length&&a().removeClass(p).eq(j).addClass(p)}},1)});e.onAddItem(function(n,j){j=i(e.getItems().index(j));t&&j.history(f)});t&&a().history(f)});return g.api?d:this}})(jQuery); (function(c){function r(d,b){var a=this,i=d.add(a),f=c(window),e,k,o,p=c.tools.expose&&(b.mask||b.expose),t=Math.random().toString().slice(10);if(p){if(typeof p=="string")p={color:p};p.closeOnClick=p.closeOnEsc=false}var n=b.target||d.attr("rel");k=n?c(n):d;if(!k.length)throw"Could not find Overlay: "+n;d&&d.index(k)==-1&&d.click(function(j){a.load(j);return j.preventDefault()});c.extend(a,{load:function(j){if(a.isOpened())return a;var h=g[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+ '"';b.oneInstance&&c.each(m,function(){this.close(j)});j=j||c.Event();j.type="onBeforeLoad";i.trigger(j);if(j.isDefaultPrevented())return a;o=true;p&&c(k).expose(p);var l=b.top,s=b.left,q=k.outerWidth({margin:true}),u=k.outerHeight({margin:true});if(typeof l=="string")l=l=="center"?Math.max((f.height()-u)/2,0):parseInt(l,10)/100*f.height();if(s=="center")s=Math.max((f.width()-q)/2,0);h[0].call(a,{top:l,left:s},function(){if(o){j.type="onLoad";i.trigger(j)}});p&&b.closeOnClick&&c.mask.getMask().one("click", a.close);b.closeOnClick&&c(document).bind("click."+t,function(v){c(v.target).parents(k).length||a.close(v)});b.closeOnEsc&&c(document).bind("keydown."+t,function(v){v.keyCode==27&&a.close(v)});return a},close:function(j){if(!a.isOpened())return a;j=j||c.Event();j.type="onBeforeClose";i.trigger(j);if(!j.isDefaultPrevented()){o=false;g[b.effect][1].call(a,function(){j.type="onClose";i.trigger(j)});c(document).unbind("click."+t).unbind("keydown."+t);p&&c.mask.close();return a}},getOverlay:function(){return k}, getTrigger:function(){return d},getClosers:function(){return e},isOpened:function(){return o},getConf:function(){return b}});c.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(j,h){c.isFunction(b[h])&&c(a).bind(h,b[h]);a[h]=function(l){l&&c(a).bind(h,l);return a}});e=k.find(b.close||".close");if(!e.length&&!b.close){e=c('<a class="close"></a>');k.prepend(e)}e.click(function(j){a.close(j)});b.load&&a.load()}c.tools=c.tools||{version:"1.2.5"};c.tools.overlay={addEffect:function(d, b,a){g[d]=[b,a]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!c.browser.msie||c.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var m=[],g={};c.tools.overlay.addEffect("default",function(d,b){var a=this.getConf(),i=c(window);if(!a.fixed){d.top+=i.scrollTop();d.left+=i.scrollLeft()}d.position=a.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(a.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed, d)});c.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(c.isFunction(d))d={onBeforeLoad:d};d=c.extend(true,{},c.tools.overlay.conf,d);this.each(function(){b=new r(c(this),d);m.push(b);c(this).data("overlay",b)});return d.api?b:this}})(jQuery); (function(c){function r(d){var b=d.offset();return{top:b.top+d.height()/2,left:b.left+d.width()/2}}var m=c.tools.overlay,g=c(window);c.extend(m.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});m.addEffect("apple",function(d,b){var a=this.getOverlay(),i=this.getConf(),f=this.getTrigger(),e=this,k=a.outerWidth({margin:true}),o=a.data("img"),p=i.fixed?"fixed":"absolute";if(!o){o=a.css("backgroundImage");if(!o)throw"background-image CSS property not set for overlay";o=o.slice(o.indexOf("(")+ 1,o.indexOf(")")).replace(/\"/g,"");a.css("backgroundImage","none");o=c('<img src="'+o+'"/>');o.css({border:0,display:"none"}).width(k);c("body").append(o);a.data("img",o)}var t=i.start.top||Math.round(g.height()/2),n=i.start.left||Math.round(g.width()/2);if(f){f=r(f);t=f.top;n=f.left}if(i.fixed){t-=g.scrollTop();n-=g.scrollLeft()}else{d.top+=g.scrollTop();d.left+=g.scrollLeft()}o.css({position:"absolute",top:t,left:n,width:0,zIndex:i.zIndex}).show();d.position=p;a.css(d);o.animate({top:a.css("top"), left:a.css("left"),width:k},i.speed,function(){a.css("zIndex",i.zIndex+1).fadeIn(i.fadeInSpeed,function(){e.isOpened()&&!c(this).index(a)?b.call():a.hide()})}).css("position",p)},function(d){var b=this.getOverlay().hide(),a=this.getConf(),i=this.getTrigger();b=b.data("img");var f={top:a.start.top,left:a.start.left,width:0};i&&c.extend(f,r(i));a.fixed&&b.css({position:"absolute"}).animate({top:"+="+g.scrollTop(),left:"+="+g.scrollLeft()},0);b.animate(f,a.closeSpeed,d)})})(jQuery); (function(c){function r(){if(c.browser.msie){var e=c(document).height(),k=c(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e-k<20?k:e]}return[c(document).width(),c(document).height()]}function m(e){if(e)return e.call(c.mask)}c.tools=c.tools||{version:"1.2.5"};var g;g=c.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null, onClose:null}};var d,b,a,i,f;c.mask={load:function(e,k){if(a)return this;if(typeof e=="string")e={color:e};e=e||i;i=e=c.extend(c.extend({},g.conf),e);d=c("#"+e.maskId);if(!d.length){d=c("<div/>").attr("id",e.maskId);c("body").append(d)}var o=r();d.css({position:"absolute",top:0,left:0,width:o[0],height:o[1],display:"none",opacity:e.startOpacity,zIndex:e.zIndex});e.color&&d.css("backgroundColor",e.color);if(m(e.onBeforeLoad)===false)return this;e.closeOnEsc&&c(document).bind("keydown.mask",function(p){p.keyCode== 27&&c.mask.close(p)});e.closeOnClick&&d.bind("click.mask",function(p){c.mask.close(p)});c(window).bind("resize.mask",function(){c.mask.fit()});if(k&&k.length){f=k.eq(0).css("zIndex");c.each(k,function(){var p=c(this);/relative|absolute|fixed/i.test(p.css("position"))||p.css("position","relative")});b=k.css({zIndex:Math.max(e.zIndex+1,f=="auto"?0:f)})}d.css({display:"block"}).fadeTo(e.loadSpeed,e.opacity,function(){c.mask.fit();m(e.onLoad);a="full"});a=true;return this},close:function(){if(a){if(m(i.onBeforeClose)=== false)return this;d.fadeOut(i.closeSpeed,function(){m(i.onClose);b&&b.css({zIndex:f});a=false});c(document).unbind("keydown.mask");d.unbind("click.mask");c(window).unbind("resize.mask")}return this},fit:function(){if(a){var e=r();d.css({width:e[0],height:e[1]})}},getMask:function(){return d},isLoaded:function(e){return e?a=="full":a},getConf:function(){return i},getExposed:function(){return b}};c.fn.mask=function(e){c.mask.load(e);return this};c.fn.expose=function(e){c.mask.load(e,this);return this}})(jQuery); (function(c){function r(g){switch(g.type){case "mousemove":return c.extend(g.data,{clientX:g.clientX,clientY:g.clientY,pageX:g.pageX,pageY:g.pageY});case "DOMMouseScroll":c.extend(g,g.data);g.delta=-g.detail/3;break;case "mousewheel":g.delta=g.wheelDelta/120}g.type="wheel";return c.event.handle.call(this,g,g.delta)}c.fn.mousewheel=function(g){return this[g?"bind":"trigger"]("wheel",g)};c.event.special.wheel={setup:function(){c.event.add(this,m,r,{})},teardown:function(){c.event.remove(this,m,r)}}; var m=!c.browser.mozilla?"mousewheel":"DOMMouseScroll"+(c.browser.version<"1.9"?" mousemove":"")})(jQuery);﻿(function(b){var d={};d.divcounter=0;d.tabpos=["","0001021020212212","00010203041020304041424344142434","000102030405061020304050606162636465162636465666"];d.font={serif:"Georgia, 'Times New Roman', 'Century Schoolbook L', serif",sans_serif:"Verdana, Helvetica, Arial, 'URW Gothic L', sans-serif",monospace:"'Courier New', Courier, 'DejaVu Sans Mono', monospace",fantasy:"Impact, Papyrus, fantasy",cursive:"'Comic Sans MS' cursive"};b.fn.FontEffect=function(h){function j(e){e=e.substring(1);if(e.length==3){e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)}return"rgb("+parseInt(e.substring(0,2),16)+", "+parseInt(e.substring(2,4),16)+", "+parseInt(e.substring(4,6),16)+")"}function c(e){return/(#([0-9A-Fa-f]{3,6})\b)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/.test(e)}function g(k){if(c(k)){k=k.toUpperCase();if(k.charAt(0)=="#"){k=j(k)}k=k.substring(4,k.length-1).split(", ");var e=255-parseInt(k[0]),f=255-parseInt(k[1]);k="rgb("+(255-parseInt(k[2]))+", "+e+", "+f+")"}return k}var a=b.extend({outline:false,outlineColor1:"",outlineColor2:"",outlineWeight:1,mirror:false,mirrorColor:"#000",mirrorOffset:-10,mirrorHeight:50,mirrorDetail:1,mirrorTLength:50,mirrorTStart:0.2,shadow:false,shadowColor:"#aaa",shadowOffsetTop:5,shadowOffsetLeft:5,shadowBlur:1,shadowOpacity:0.1,gradient:false,gradientColor:"",gradientFromTop:true,gradientPosition:20,gradientLength:50,gradientSteps:20,proportional:false,hideText:false,debug:false},h);this.not(".JQFE").each(function(){if(!a.outline&&!a.shadow&&!a.mirror&&!a.gradient){a.outline=true}if(a.outline){if(a.outlineColor1==""&&a.outlineColor2==""){a.outlineColor1=g(b(this).css("color"))}if(a.outlineColor2==""){a.outlineColor2=a.outlineColor1}}if(a.gradient&&a.gradientColor==""){a.gradientColor=g(b(this).css("color"))}var A=b(this).css("display"),x=b(this).css("position");b(this).css({display:"inline",position:x=="absolute"?"absolute":"relative"});var z=b(this).height();x=b(this).width()*1.04+"px";var w=z+"px",s=b(this).html();b(this).data("options",a).addClass("JQFE").css({width:x,height:w,display:A,position:b(this).css("position")!="absolute"?"relative":"absolute",zoom:1});A=b("<div></div>").css({width:x,height:w,position:"relative"});A.append(b("<div class='JQFEText'>"+s+"</div>").css({display:a.hideText?"none":"inline",width:x,height:w,position:"relative",zIndex:100}));var e=b("<div></div>").css({width:x,height:w,left:"0px",position:"absolute",top:parseInt(b(this).css("paddingTop"))*0+"px",zIndex:110}),m=b(e).clone().css({zIndex:90});d.divounter+=4;b(this).html("");if(a.mirror){for(i=0;i<z*(a.mirrorHeight/100);i++){if(a.proportional){var y=(z+a.mirrorOffset+i*a.mirrorDetail).pxToEm({scope:this}),v=a.mirrorDetail.pxToEm({scope:this}),u=(z*-1+i*(100/a.mirrorHeight)).pxToEm({scope:this})}else{y=z+a.mirrorOffset+i*a.mirrorDetail+"px";v=a.mirrorDetail+"px";u=z*-1+i*(100/a.mirrorHeight)+"px"}var f=a.mirrorTStart-i*(a.mirrorTStart/(a.mirrorHeight/100*a.mirrorTLength));y=b("<div class='JQFEMirror'></div>").css({position:"absolute",top:y,height:v,width:x,overflow:"hidden"}).append(b("<div>"+s+"</div>").css({position:"absolute",color:a.mirrorColor,top:u,opacity:f}));d.divounter+=i*2;if(f<0.01){break}m.append(y)}}if(a.outline){v=a.outlineWeight*8;u=d.tabpos[a.outlineWeight];for(i=0;i<v;i++){y=b("<div class='JQFEOutline'>"+s+"</div>").css({position:"absolute",top:u.charAt(i*2)-a.outlineWeight+"px",left:u.charAt(i*2+1)-a.outlineWeight+"px",width:x,color:i<v/2+a.outlineWeight?a.outlineColor1:a.outlineColor2,zIndex:i>v-v/3?20:30});d.divounter+=i;m.append(y)}}if(a.shadow){v=a.shadowBlur*8;u=d.tabpos[a.shadowBlur];for(i=0;i<v;i++){y=b("<div class='JQFEShadow'>"+s+"</div>").css({opacity:a.shadowOpacity,position:"absolute",top:u.charAt(i*2)-a.shadowBlur+a.shadowOffsetTop+"px",left:u.charAt(i*2+1)-a.shadowBlur+a.shadowOffsetLeft+"px",width:x,height:w,color:a.shadowColor,zIndex:10});d.divounter+=i;m.append(y)}}if(a.gradient){w=Math.round(z*a.gradientLength*0.01/a.gradientSteps);z=z*a.gradientPosition*0.01;f=1/a.gradientSteps;var B=a.gradientColor;for(i=0;i<a.gradientSteps;i++){if(a.proportional){y=((i==0?0:z)+i*w).pxToEm({scope:this});v=((i==0?z:0)+w).pxToEm({scope:this});u=(((i==0?0:z)+i*w)*-1).pxToEm({scope:this})}else{y=(i==0?0:z)+i*w+"px";v=(i==0?z:0)+w+"px";u=((i==0?0:z)+i*w)*-1+"px"}y=b("<div class='JQFEGradient'></div>").css({position:"absolute",top:y,height:v,left:"0px",width:x,overflow:"hidden"}).append(b("<div>"+s+"</div>").css({width:"100%",position:"absolute",top:u,color:B,opacity:1-f*i}));d.divounter+=i*2;e.append(y)}}A.append(m);A.append(e);b(this).append(A)});return this};b.fn.changeOptionsFE=function(a){if(this){var c=b(this).data("options")||{};b.extend(c,a);b(this).data("options",c)}};b.fn.redrawFE=function(a){if(this){a&&b(this).changeOptionsFE(a);b(this).removeFE();b(this).FontEffect(b(this).data("options"))}};b.fn.removeFE=function(a){if(this&&b(this).hasClass("JQFE")){var c=b(this).find("div[class='JQFEText']").html();b(this).removeClass("JQFE");a&&b(this).data("options",{});b(this).find("div[class^='JQFE']").remove();b(this).html(c)}}})(jQuery);Number.prototype.pxToEm=String.prototype.pxToEm=function(b){b=$.extend({scope:"body",reverse:false},b);var h=this==""?0:parseFloat(this),d,g=function(){var a=document.documentElement;return self.innerWidth||a&&a.clientWidth||document.body.clientWidth};d=b.scope=="body"&&$.browser.msie&&(parseFloat($("body").css("font-size"))/g()).toFixed(1)>0?function(){return(parseFloat($("body").css("font-size"))/g()).toFixed(3)*16}():parseFloat($(b.scope).css("font-size"));return b.reverse==true?(h*d).toFixed(2)+"px":(h/d).toFixed(2)+"em"};function PopupCenter(d,j,g){var h=(screen.availWidth-j)/2,b="";b+="top="+(screen.availHeight-g)/2;b+=",left="+h;b+=",width="+j;b+=",height="+g;b+=",scrollbars=yes";window.open(d,"_blank",b)}function PopupCorner(b,h,d){var g="";g="";g+="top=0";g+=",left=0";if(h>0){g+=",width="+h}if(d<0){g+=",height="+d}g+=",scrollbars=yes";window.open(b,"_blank",g)}function PrintPreview(){var b=document.getElementById("print_area");if(b!=null){var d=window.open();d.document.writeln('<HTML dir="rtl"><HEAD><title> \u0634\u0628\u0643\u0629 \u0627\u0644\u0623\u0644\u0648\u0643\u0629</title><LINK href="/css/alukah/alukah.css" type="text/css" rel="stylesheet">');d.document.writeln('<LINK href="/css/alukah/print.css" type="text/css" rel="stylesheet" media="print"><base target="_self"></HEAD>');d.document.writeln('<body style="background-color:white;margin:15px;">');d.document.writeln('<form method="post">');d.document.writeln(b.innerHTML);d.document.writeln('<p style="text-align:center">');d.document.writeln('<INPUT ID="PRINT" type="button" class="button" value="\u0627\u0637\u0628\u0639" style="width:60px;" onclick="javascript:location.reload(true);window.print();">');d.document.writeln('&nbsp;&nbsp;&nbsp;<INPUT ID="CLOSE" class="button" style="width:60px;" type="button" value="\u0623\u063a\u0644\u0642" onclick="window.close();"></p>');d.document.writeln("</form></body></HTML>")}}function SendToFriend(){var b="/SendToFriend.aspx?url="+encodeURIComponent(location.href);PopupCenter(b,530,320)}function ReportBadLink(){var b="/BadLink.aspx?url="+encodeURIComponent(location.href);PopupCenter(b,650,300)}function ValidateEmail(b,d){if(/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i.test(b)){return true}d==true&&alert("\u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0645\u062f\u062e\u0644 \u063a\u064a\u0631 \u0635\u0627\u0644\u062d");return false}function getFileName(b){var d=b.lastIndexOf("\\");return d>0?b.substr(d+1,b.length-d):b}function goTo(b){if(IMAGE_COUNT==0){return false}if(isNaN(b)){return false}if(b<1){return false}if(b>IMAGE_COUNT){return false}current=b;document.getElementById("img-scan").src=IMAGE_PATH+IMAGE_NAME.replace("{0}",current);document.getElementById("lblCurrent").innerHTML="("+IMAGE_COUNT+"/"+current+")";b=document.getElementById("btnFirst");var h=document.getElementById("btnNext"),d=document.getElementById("btnPrevious"),g=document.getElementById("btnLast");b.disabled=current==1;d.disabled=current==1;h.disabled=current==IMAGE_COUNT;g.disabled=current==IMAGE_COUNT}var c1="#000";var c2="#ccc";$(function(){$(".watermark").each(function(){$t=$(this);if($t.val()!=this.title){if($t.val()!=""){$t.css("color",c1)}else{$t.val(this.title);$t.css("color",c2)}}});$(".watermark").focus(function(){$t=$(this);if($t.val()==this.title){$t.val("");$t.css("color",c1)}});$(".watermark").blur(function(){$t=$(this);if($.trim($t.val())==""){$t.val(this.title);$t.css("color",c2)}})});$(document).ready(function(){$("#latest-additions-image-label").click(function(){$("#latest-additions-content").slideToggle(600);$("#latest-additions-tooltip").fadeOut()})});
