/**
 * jQuery Tools 1.2.5 - The missing UI library for the Web
 * 
 * [tabs, tooltip, overlay, scrollable]
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 * File generated: Wed Sep 22 06:12:55 GMT 2010
 */
(function(c){function p(d,b,a){var e=this,l=d.add(this),h=d.find(a.tabs),i=b.jquery?b:d.children(b),j;h.length||(h=d.children());i.length||(i=d.parent().find(b));i.length||(i=c(b));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=Math.max(h.index(k),0)}if(a.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(j>=0)return e;f=a.initialIndex;k=h.eq(f)}if(f===j)return e;
g=g||c.Event();g.type="onBeforeClick";l.trigger(g,[f]);if(!g.isDefaultPrevented()){o[a.effect].call(e,f,function(){g.type="onClick";l.trigger(g,[f])});j=f;h.removeClass(a.current);k.addClass(a.current);return e}},getConf:function(){return a},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return e.click(j+1)},prev:function(){return e.click(j-1)},destroy:function(){h.unbind(a.event).removeClass(a.current);
i.find("a[href^=#]").unbind("click.T");return e}});c.each("onBeforeClick,onClick".split(","),function(f,g){c.isFunction(a[g])&&c(e).bind(g,a[g]);e[g]=function(k){k&&c(e).bind(g,k);return e}});if(a.history&&c.fn.history){c.tools.history.init(h);a.event="history"}h.each(function(f){c(this).bind(a.event,function(g){e.click(f,g);return g.preventDefault()})});i.find("a[href^=#]").bind("click.T",function(f){e.click(c(this).attr("href"),f)});if(location.hash&&a.tabs=="a"&&d.find("[href="+location.hash+"]").length)e.click(location.hash);
else if(a.initialIndex===0||a.initialIndex>0)e.click(a.initialIndex)}c.tools=c.tools||{version:"1.2.5"};c.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(d,b){o[d]=b}};var o={"default":function(d,b){this.getPanes().hide().eq(d).show();b.call()},fade:function(d,b){var a=this.getConf(),e=a.fadeOutSpeed,l=this.getPanes();e?l.fadeOut(e):l.hide();l.eq(d).fadeIn(a.fadeInSpeed,b)},slide:function(d,
b){this.getPanes().slideUp(200);this.getPanes().eq(d).slideDown(400,b)},ajax:function(d,b){this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),b)}},m;c.tools.tabs.addEffect("horizontal",function(d,b){m||(m=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:m},function(){c(this).show();b.call()})});c.fn.tabs=function(d,b){var a=this.data("tabs");if(a){a.destroy();this.removeData("tabs")}if(c.isFunction(b))b=
{onBeforeClick:b};b=c.extend({},c.tools.tabs.conf,b);this.each(function(){a=new p(c(this),d,b);c(this).data("tabs",a)});return b.api?a:this}})(jQuery);
(function(f){function p(a,b,c){var h=c.relative?a.position().top:a.offset().top,d=c.relative?a.position().left:a.offset().left,i=c.position[0];h-=b.outerHeight()-c.offset[0];d+=a.outerWidth()+c.offset[1];if(/iPad/i.test(navigator.userAgent))h-=f(window).scrollTop();var j=b.outerHeight()+a.outerHeight();if(i=="center")h+=j/2;if(i=="bottom")h+=j;i=c.position[1];a=b.outerWidth()+a.outerWidth();if(i=="center")d-=a/2;if(i=="left")d-=a;return{top:h,left:d}}function u(a,b){var c=this,h=a.add(c),d,i=0,j=
0,m=a.attr("title"),q=a.attr("data-tooltip"),r=o[b.effect],l,s=a.is(":input"),v=s&&a.is(":checkbox, :radio, select, :button, :submit"),t=a.attr("type"),k=b.events[t]||b.events[s?v?"widget":"input":"def"];if(!r)throw'Nonexistent effect "'+b.effect+'"';k=k.split(/,\s*/);if(k.length!=2)throw"Tooltip: bad events configuration for "+t;a.bind(k[0],function(e){clearTimeout(i);if(b.predelay)j=setTimeout(function(){c.show(e)},b.predelay);else c.show(e)}).bind(k[1],function(e){clearTimeout(j);if(b.delay)i=
setTimeout(function(){c.hide(e)},b.delay);else c.hide(e)});if(m&&b.cancelDefault){a.removeAttr("title");a.data("title",m)}f.extend(c,{show:function(e){if(!d){if(q)d=f(q);else if(b.tip)d=f(b.tip).eq(0);else if(m)d=f(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(m);else{d=a.next();d.length||(d=a.parent().next())}if(!d.length)throw"Cannot find tooltip for "+a;}if(c.isShown())return c;d.stop(true,true);var g=p(a,d,b);b.tip&&d.html(a.data("title"));e=e||f.Event();e.type="onBeforeShow";
h.trigger(e,[g]);if(e.isDefaultPrevented())return c;g=p(a,d,b);d.css({position:"absolute",top:g.top,left:g.left});l=true;r[0].call(c,function(){e.type="onShow";l="full";h.trigger(e)});g=b.events.tooltip.split(/,\s*/);if(!d.data("__set")){d.bind(g[0],function(){clearTimeout(i);clearTimeout(j)});g[1]&&!a.is("input:not(:checkbox, :radio), textarea")&&d.bind(g[1],function(n){n.relatedTarget!=a[0]&&a.trigger(k[1].split(" ")[0])});d.data("__set",true)}return c},hide:function(e){if(!d||!c.isShown())return c;
e=e||f.Event();e.type="onBeforeHide";h.trigger(e);if(!e.isDefaultPrevented()){l=false;o[b.effect][1].call(c,function(){e.type="onHide";h.trigger(e)});return c}},isShown:function(e){return e?l=="full":l},getConf:function(){return b},getTip:function(){return d},getTrigger:function(){return a}});f.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(e,g){f.isFunction(b[g])&&f(c).bind(g,b[g]);c[g]=function(n){n&&f(c).bind(g,n);return c}})}f.tools=f.tools||{version:"1.2.5"};f.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(a,b,c){o[a]=[b,c]}};var o={toggle:[function(a){var b=this.getConf(),c=this.getTip();b=b.opacity;b<1&&c.css({opacity:b});c.show();a.call()},function(a){this.getTip().hide();
a.call()}],fade:[function(a){var b=this.getConf();this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};f.fn.tooltip=function(a){var b=this.data("tooltip");if(b)return b;a=f.extend(true,{},f.tools.tooltip.conf,a);if(typeof a.position=="string")a.position=a.position.split(/,?\s/);this.each(function(){b=new u(f(this),a);f(this).data("tooltip",b)});return a.api?b:this}})(jQuery);
(function(a){function t(d,b){var c=this,j=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+
'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";j.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var i=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof i=="string")i=i=="center"?Math.max((o.height()-v)/2,0):parseInt(i,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:i,left:r},function(){if(m){e.type="onLoad";j.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",
c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";j.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";j.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},
getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(i){i&&a(c).bind(h,i);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<a class="close"></a>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.5"};a.tools.overlay={addEffect:function(d,
b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),j=a(window);if(!c.fixed){d.top+=j.scrollTop();d.left+=j.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,
d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);
(function(e){function p(f,c){var b=e(c);return b.length<2?b:f.parent().find(c)}function u(f,c){var b=this,n=f.add(b),g=f.children(),l=0,j=c.vertical;k||(k=b);if(g.length>1)g=e(c.items,f);e.extend(b,{getConf:function(){return c},getIndex:function(){return l},getSize:function(){return b.getItems().size()},getNaviButtons:function(){return o.add(q)},getRoot:function(){return f},getItemWrap:function(){return g},getItems:function(){return g.children(c.item).not("."+c.clonedClass)},move:function(a,d){return b.seekTo(l+
a,d)},next:function(a){return b.move(1,a)},prev:function(a){return b.move(-1,a)},begin:function(a){return b.seekTo(0,a)},end:function(a){return b.seekTo(b.getSize()-1,a)},focus:function(){return k=b},addItem:function(a){a=e(a);if(c.circular){g.children("."+c.clonedClass+":last").before(a);g.children("."+c.clonedClass+":first").replaceWith(a.clone().addClass(c.clonedClass))}else g.append(a);n.trigger("onAddItem",[a]);return b},seekTo:function(a,d,h){a.jquery||(a*=1);if(c.circular&&a===0&&l==-1&&d!==
0)return b;if(!c.circular&&a<0||a>b.getSize()||a<-1)return b;var i=a;if(a.jquery)a=b.getItems().index(a);else i=b.getItems().eq(a);var r=e.Event("onBeforeSeek");if(!h){n.trigger(r,[a,d]);if(r.isDefaultPrevented()||!i.length)return b}i=j?{top:-i.position().top}:{left:-i.position().left};l=a;k=b;if(d===undefined)d=c.speed;g.animate(i,d,c.easing,h||function(){n.trigger("onSeek",[a])});return b}});e.each(["onBeforeSeek","onSeek","onAddItem"],function(a,d){e.isFunction(c[d])&&e(b).bind(d,c[d]);b[d]=function(h){h&&
e(b).bind(d,h);return b}});if(c.circular){var s=b.getItems().slice(-1).clone().prependTo(g),t=b.getItems().eq(1).clone().appendTo(g);s.add(t).addClass(c.clonedClass);b.onBeforeSeek(function(a,d,h){if(!a.isDefaultPrevented())if(d==-1){b.seekTo(s,h,function(){b.end(0)});return a.preventDefault()}else d==b.getSize()&&b.seekTo(t,h,function(){b.begin(0)})});b.seekTo(0,0,function(){})}var o=p(f,c.prev).click(function(){b.prev()}),q=p(f,c.next).click(function(){b.next()});if(!c.circular&&b.getSize()>1){b.onBeforeSeek(function(a,
d){setTimeout(function(){if(!a.isDefaultPrevented()){o.toggleClass(c.disabledClass,d<=0);q.toggleClass(c.disabledClass,d>=b.getSize()-1)}},1)});c.initialIndex||o.addClass(c.disabledClass)}c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(a,d){if(c.mousewheel){b.move(d<0?1:-1,c.wheelSpeed||50);return false}});if(c.touch){var m={};g[0].ontouchstart=function(a){a=a.touches[0];m.x=a.clientX;m.y=a.clientY};g[0].ontouchmove=function(a){if(a.touches.length==1&&!g.is(":animated")){var d=a.touches[0],h=
m.x-d.clientX;d=m.y-d.clientY;b[j&&d>0||!j&&h>0?"next":"prev"]();a.preventDefault()}}}c.keyboard&&e(document).bind("keydown.scrollable",function(a){if(!(!c.keyboard||a.altKey||a.ctrlKey||e(a.target).is(":input")))if(!(c.keyboard!="static"&&k!=b)){var d=a.keyCode;if(j&&(d==38||d==40)){b.move(d==38?-1:1);return a.preventDefault()}if(!j&&(d==37||d==39)){b.move(d==37?-1:1);return a.preventDefault()}}});c.initialIndex&&b.seekTo(c.initialIndex,0,function(){})}e.tools=e.tools||{version:"1.2.5"};e.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 k;e.fn.scrollable=function(f){var c=this.data("scrollable");if(c)return c;f=e.extend({},e.tools.scrollable.conf,f);this.each(function(){c=new u(e(this),f);e(this).data("scrollable",c)});return f.api?c:this}})(jQuery);

/**
* Print Element Plugin 1.2
*
* Copyright (c) 2010 Erik Zaadi
*
* Inspired by PrintArea (http://plugins.jquery.com/project/PrintArea) and
* http://stackoverflow.com/questions/472951/how-do-i-print-an-iframe-from-javascript-in-safari-chrome
*
*  Home Page : http://projects.erikzaadi/jQueryPlugins/jQuery.printElement 
*  Issues (bug reporting) : http://github.com/erikzaadi/jQueryPlugins/issues/labels/printElement
*  jQuery plugin page : http://plugins.jquery.com/project/printElement 
*  
*  Thanks to David B (http://github.com/ungenio) and icgJohn (http://www.blogger.com/profile/11881116857076484100)
*  For their great contributions!
* 
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html
*   
*   Note, Iframe Printing is not supported in Opera and Chrome 3.0, a popup window will be shown instead
*/
;(function(g){function k(c){c&&c.printPage?c.printPage():setTimeout(function(){k(c)},50)}function l(c){c=a(c);a(":checked",c).each(function(){this.setAttribute("checked","checked")});a("input[type='text']",c).each(function(){this.setAttribute("value",a(this).val())});a("select",c).each(function(){var b=a(this);a("option",b).each(function(){b.val()==a(this).val()&&this.setAttribute("selected","selected")})});a("textarea",c).each(function(){var b=a(this).attr("value");if(a.browser.b&&this.firstChild)this.firstChild.textContent=
b;else this.innerHTML=b});return a("<div></div>").append(c.clone()).html()}function m(c,b){var i=a(c);c=l(c);var d=[];d.push("<html><head><title>"+b.pageTitle+"</title>");if(b.overrideElementCSS){if(b.overrideElementCSS.length>0)for(var f=0;f<b.overrideElementCSS.length;f++){var e=b.overrideElementCSS[f];typeof e=="string"?d.push('<link type="text/css" rel="stylesheet" href="'+e+'" >'):d.push('<link type="text/css" rel="stylesheet" href="'+e.href+'" media="'+e.media+'" >')}}else a("link",j).filter(function(){return a(this).attr("rel").toLowerCase()==
"stylesheet"}).each(function(){d.push('<link type="text/css" rel="stylesheet" href="'+a(this).attr("href")+'" media="'+a(this).attr("media")+'" >')});d.push('<base href="'+(g.location.protocol+"//"+g.location.hostname+(g.location.port?":"+g.location.port:"")+g.location.pathname)+'" />');d.push('</head><body style="'+b.printBodyOptions.styleToAdd+'" class="'+b.printBodyOptions.classNameToAdd+'">');d.push('<div class="'+i.attr("class")+'">'+c+"</div>");d.push('<script type="text/javascript">function printPage(){focus();print();'+
(!a.browser.opera&&!b.leaveOpen&&b.printMode.toLowerCase()=="popup"?"close();":"")+"}<\/script>");d.push("</body></html>");return d.join("")}var j=g.document,a=g.jQuery;a.fn.printElement=function(c){var b=a.extend({},a.fn.printElement.defaults,c);if(b.printMode=="iframe")if(a.browser.opera||/chrome/.test(navigator.userAgent.toLowerCase()))b.printMode="popup";a("[id^='printElement_']").remove();return this.each(function(){var i=a.a?a.extend({},b,a(this).data()):b,d=a(this);d=m(d,i);var f=null,e=null;
if(i.printMode.toLowerCase()=="popup"){f=g.open("about:blank","printElementWindow","width=650,height=440,scrollbars=yes");e=f.document}else{f="printElement_"+Math.round(Math.random()*99999).toString();var h=j.createElement("IFRAME");a(h).attr({style:i.iframeElementOptions.styleToAdd,id:f,className:i.iframeElementOptions.classNameToAdd,frameBorder:0,scrolling:"no",src:"about:blank"});j.body.appendChild(h);e=h.contentWindow||h.contentDocument;if(e.document)e=e.document;h=j.frames?j.frames[f]:j.getElementById(f);
f=h.contentWindow||h}focus();e.open();e.write(d);e.close();k(f)})};a.fn.printElement.defaults={printMode:"iframe",pageTitle:"",overrideElementCSS:null,printBodyOptions:{styleToAdd:"padding:10px;margin:10px;",classNameToAdd:""},leaveOpen:false,iframeElementOptions:{styleToAdd:"border:none;position:absolute;width:0px;height:0px;bottom:0px;left:0px;",classNameToAdd:""}};a.fn.printElement.cssElement={href:"",media:""}})(window);

/**
 * jQuery urForms Plugin
 * Copyright: htmlReligion Team
 * URL: http://research.htmlreligion.com/custom-forms/
 * Version: 2.0.4 (2011-may-05)
 * Requires: jQuery v1.3+
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){3 v=5(n,o){3 p=$(n);3 q=6;3 s=$.2o({1H:8,1I:8,1J:8,1n:\'2p\',I:\'2q\',1c:\'2r-2s\',14:\'1o\',Y:\'2t\',1p:\'1q\',1r:\'2u\',1s:\'<x><1t>{1K}</1t></x>\',1u:\'<1L><a 1M="#">{1v}</a></1L>\',1w:\'15\',1N:\'1x-M\',E:\'1O\',N:\'2v\',Q:\'2w\',1y:8,1z:8,1d:8,1P:F,1Q:8},o||{});q.1R=5(){4(!$(6).C(s.1n)){q.1={};q.1S();4(s.1H){q.1T()}4(s.1I){q.1U()}4(s.1J){q.1V()}$(6).9(s.1n)}};q.1S=5(){q.1.G=[];q.1.7=[];q.1.J=[];p.K(\'2x\').y(5(){4(!$(6).C(s.I)&&!$(6).C(s.1c)){q.1.G.V($(6))}});$(\'M\',p).y(5(){4(!$(6).C(s.I)&&!$(6).C(s.1c)){q.1.7.V($(6))}});$(\'2y\',p).y(5(){2z{3 a=$(6).2(\'A\');4(a&&$(\'#\'+a).z){4(!$(\'#\'+a).C(s.I)&&!$(\'#\'+a).C(s.1c)){q.1.J.V($(6))}}}2A(2B){}});q.1.w=[];q.1.Z=[];q.1.D=[];q.1.10=[];3 b=0;3 c=0;A(i=0;i<q.1.G.z;i++){4(q.1.G[i].2(\'1W\')=="2C"){q.1.w.V(q.1.G[i]);A(3 d=0;d<q.1.J.z;d++){4(q.1.G[i].2(\'1e\')&&q.1.J[d].2(\'A\')==q.1.G[i].2(\'1e\')){q.1.J[d].2(\'11\',b);q.1.Z.V(q.1.J[d])}}b++}4(q.1.G[i].2(\'1W\')=="2D"){q.1.D.V(q.1.G[i]);A(3 d=0;d<q.1.J.z;d++){4(q.1.G[i].2(\'1e\')&&q.1.J[d].2(\'A\')==q.1.G[i].2(\'1e\')){q.1.J[d].2(\'11\',c);q.1.10.V(q.1.J[d])}}c++}}};q.1U=5(){A(i=0,1X=q.1.D.z;i<1X;i++){4(!q.1.D[i].C(s.I)){q.1.D[i].9(s.I);3 b=$(\'<x></x>\');4(q.1.D[i].2(\'H\')==F){b.9(s.1r)}W{b.9(s.1p)}b.2(\'1Y\',\'1q\'+i);q.1.D[i].1A().1B(b);q.1.D[i].R=b;b.S(5(){3 a=$(6).2(\'1Y\').1f(\'1q\',\'\');1Z(a)})}}A(i=0,20=q.1.10.z;i<20;i++){3 c=q.1.10[i].2(\'A\');4(c&&$(\'#\'+c).z){4(q.1.10[i].2(\'11\')){q.1.10[i].S(5(){21($(6).2(\'11\'))})}}}};5 1Z(a){3 b=8;4(q.1.D[a].2(\'H\')==F){b=8}W{b=F}q.1.D[a].2(\'H\',b);1g(a,b)};5 21(a){4(q.1.D[a]){4(q.1.D[a].2(\'H\')==F){1g(a,8)}W{1g(a,F)}}};5 1g(a,b){3 c=q.1.D[a].R;4(b==F){c.2(\'B\',s.1r);c.2(\'H\',F)}4(b==8){c.2(\'B\',s.1p);c.2(\'H\',8)}};5 22(a){A(3 r=0,23=q.1.w.z;r<23;r++){4(q.1.w[r].2(\'1h\')==q.1.w[a].2(\'1h\')){q.1.w[r].2(\'H\',8).L(\'H\')}}q.1.w[a].2(\'H\',F).9(\'H\');1C(a)};5 1C(a){3 b=q.1.w[a];A(3 c=0,24=q.1.w.z;c<24;c++){4(q.1.w[c].R||q.1.w[c].R!=\'2E\'){4((q.1.w[c].R.C(s.Y))&&q.1.w[c].2(\'1h\')==b.2(\'1h\')){q.1.w[c].R.2(\'B\',s.14)}}}b.R.2(\'B\',s.Y)};q.1T=5(){A(i=0,25=q.1.w.z;i<25;i++){4(!q.1.w[i].C(s.I)){q.1.w[i].9(s.I);3 b=$(\'<x></x>\');4(q.1.w[i].2(\'H\')==F){b.9(s.Y)}W{b.9(s.14)}b.2(\'26\',\'1o\'+i);q.1.w[i].1A().1B(b);q.1.w[i].R=b;b.S(5(){3 a=$(6).2(\'26\').1f(\'1o\',\'\');22(a,q.1,s.14,s.Y)})}}A(i=0,27=q.1.Z.z;i<27;i++){3 c=q.1.Z[i].2(\'A\');4(c&&$(\'#\'+c).z){4(q.1.Z[i].2(\'11\')){q.1.Z[i].S(5(){1C($(6).2(\'11\'),q.1,s.14,s.Y)})}}}};5 1i(a){3 b=q.1.7[a].15;3 c=b.2F();4(s.1y){c=s.1y}3 d=q.1.7[a].28;4(d&&b){4(s.1z){d.O({T:b.T()})}4(p.X&&p.X!=d){p.X.L(s.N).9(s.E).O({29:\'2a\'})}4(d.C(s.N)){d.O({16:\'-2G\',2b:u(b)+c+\'2c\'});17();d.L(s.N).9(s.E).O({16:t(b)+\'2c\'});b.9(s.Q);p.X=d;$(2H).S(5(e){4($(e.2d).2e(\'x.\'+s.1w).z==0&&$(e.2d).2e(\'x.\'+s.E).z==0){17()}})}W 4(d.C(s.E)){d.O({29:\'2a\'}).L(s.E).9(s.N);17()}}};5 17(){4(p.X){$(\'.\'+s.E).y(5(){$(6).L(s.E).9(s.N)});$(\'.\'+s.Q).y(5(){$(6).L(s.Q)});p.X=8}};5 1D(b,c){3 d=q.1.7[c];$(\'U\',d).y(5(a){4(a==b){$(6).2(\'1j\',F)}W{$(6).2(\'1j\',8)}});3 e=$(\'U\',d).1k(b).18();d.15.K(\'.12-M-1l\').18(e);4(d.2f&&q.1E){2I(d.2f())}17()};q.2J=5(c){3 d=c.2(\'2K\').1f(\'2g\',\'\');3 e=s.1s;3 f=\'\';3 g=c.K(\'U\').1k(0).18();c.K(\'U\').y(5(j){3 a={1v:$(6).19()};f+=s.1u.1a(a);3 b=$(6).2(\'1j\');4(b){g=c.K(\'U\').1k(j).18()}});3 h=c.1b(\'2h\');3 i=$(\'1t\',h);4(i.z){i.19(f);$(\'a\',i).y(5(j){$(6).2(\'13\',j).2(\'B\',d);$(6).S(5(){3 a=$(6).2(\'13\');3 b=$(6).2(\'B\');4(a&&b){1i(b);1D(a,b)}P 8})})}3 k=c.1b(\'2i\');3 l=$(\'.12-M-1l\',k);l.19(g)};q.1V=5(){4(1F 2j.2k.1a!=\'5\'){2j.2k.1a=5(c){P 6.1f(/{([^{}]*)}/g,5(a,b){3 r=c[b];P 1F r===\'2L\'||1F r===\'2M\'?r:a})}}q.1E=8;p.X=8;A(i=0;i<q.1.7.z;i++){4(!q.1.7[i].C(s.I)){q.1.7[i].2N=i;3 d=1m(q.1.7[i].T());3 e=\'\';q.1.7[i].K(\'U\').y(5(){4($(6).2(\'1j\')){e=$(6).19()}});4(e==\'\')e=q.1.7[i].K(\'U\').1k(0).18();3 f=$(\'					<x B="\'+s.1w+\'">					    <x B="12-M-16"></x>					    <x B="1x"></x>					    <x B="12-M-1l" 2O="2P\'+i+\'">\'+e+\'</x>					    <a 1M="#" 13="\'+i+\'" B="2Q"></a>					</x>\');f.9(q.1.7[i].2(\'B\'));4(q.1.7[i].2(\'1x\')){f.9(s.1N)}q.1.7[i].1A().1B(f);$(\'a\',f).S(5(){3 a=$(6).2(\'13\');4(a&&1m(a)==a){1i(a)}P 8});3 g=1m(f.K(\'.12-M-16\').T());3 h=1m(f.K(\'.12-M-1l\').O(\'2R\'));4(s.1z){f.O({T:\'2S%\'})}W{f.O({T:d+g+h})}f.2(\'2T\',\'15\'+i);$(q.1.7[i]).2(\'2U\',\'2g\'+i);3 k=s.1s;3 l=\'\';q.1.7[i].K(\'U\').y(5(j){3 a={1v:$(6).19()};l+=s.1u.1a(a)});3 m={1K:l};k=k.1a(m);k=$(k);k.O({T:f.T()}).2(\'2V\',\'1O\'+i);$(\'a\',k).y(5(j){$(6).2(\'13\',j).2(\'B\',i);$(6).S(5(){3 a=$(6).2(\'13\');3 b=$(6).2(\'B\');4(a&&b){1i(b);1D(a,b)}P 8})});q.1.7[i].15=f;q.1.7[i].28=k;q.1.7[i].1b({2i:f,2h:k});k.9(q.1.7[i].2(\'B\'));k.M=q.1.7[i];$(\'2W\').2X(k);q.1.7[i].9(s.I);k.9(s.N)}}q.1E=F;4(s.1d&&2l.2Y(s.1d)){s.1d.2Z(6)}4(s.1P){$(2m).30(5(){$(\'.\'+s.E).y(5(){$(6).L(s.E).9(s.N)});$(\'.\'+s.Q).y(5(){$(6).L(s.Q)})})}4(s.1Q){$(2m).31(5(){$(\'.\'+s.E).y(5(){$(6).L(s.E).9(s.N)});$(\'.\'+s.Q).y(5(){$(6).L(s.Q)})})}};3 t=5(a){3 b=a.2n();P b.16};3 u=5(a){3 b=a.2n();P b.2b};q.1R()};$.32.1G=5(c){P 6.y(5(){3 a=$(6);4(a.1b(\'1G\'))P;3 b=33 v(6,c);a.1b(\'1G\',b)})}})(2l);',62,190,'|elements|attr|var|if|function|this|selects|false|addClass|||||||||||||||||||||||radios|div|each|length|for|class|hasClass|checkboxes|optionsClass|true|inputs|checked|customizedClass|labels|find|removeClass|select|optionsHiddenClass|css|return|selectActiveClass|custom|click|width|option|push|else|openedSelect|radioClassChecked|radioLabels|checkboxLabels|targetId|bg|rel|radioClass|customSelect|left|hideOptions|text|html|supplantstr|data|noCustomClass|selectImplemented|id|replace|checkCheckbox|name|showOptions|selected|eq|center|parseInt|implementedClass|customRadio|checkboxClass|customCheckbox|checkboxClassChecked|selectOptionHTML|ul|selectOptionItem|optionItem|selectClass|disabled|selectHeight|flexibleSelects|parent|prepend|checkRadios|customSelectEvent|selectsAll|typeof|urForm|replaceRadios|replaceCheckboxes|replaceSelects|options|li|href|selectDisabledClass|customOptions|hideOnResize|hideOnScroll|initialize|getRelations|customizeRadios|customizeCheckboxes|customizeSelects|type|chn|customCheckboxId|retoggleCheckbox|chln|toggleCheckbox|changeRadios|rlen|_rlen|iln|customRadioId|ilen|optionz|height|auto|top|px|target|parents|change|defaultSelect|dOptions|dCustomSelect|String|prototype|jQuery|window|offset|extend|customizedForm|customizedElement|no|transform|customRadioChecked|customCheckboxChecked|customOptionsHidden|customSelectActive|input|label|try|catch|labErr|radio|checkbox|undefined|outerHeight|9999px|document|eval|updateSelect|defaultselectid|string|number|index|customselecttext|customSelectText|selectButton|marginRight|100|customSelectId|defaultSelectId|customOptionsId|body|append|isFunction|apply|resize|scroll|fn|new'.split('|'),0,{}));
function supplantString(objrepl, objtxt) {
	return objrepl.replace(/{([^{}]*)}/g,
	function(a, b) {
		var r = objtxt[b];
		return typeof r === 'string' || typeof r === 'number' ? r : a;
	});
};
/**
 * jQuery Simple Tooltip
 * Copyright: htmlReligion Team
 * URL: http://research.htmlreligion.com/custom-forms/
 * Version: 0.0.2 (2011-jun-07)
 * Requires: jQuery v1.3+
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
(function($){var i=function(c,d){var f=$(c);var g=this;var h=$.extend({template:'<div class="tooltip">{text}</div>',offsetTop:0,offsetLeft:0,id:'b-tooltip-box',invertLeft:false,invertTop:false},d||{});f.attr('tooltiptext',f.attr('title')).attr('title','').mouseenter(function(){if($('#'+h.id).length){$('#'+h.id).remove()}var a={text:$(this).attr('tooltiptext')};var b=supplantString(h.template,a);b=$(b);b.attr('id',h.id);$('body').append(b)}).mouseleave(function(){if($('#'+h.id).length)$('#'+h.id).remove()}).mousemove(function(e){if($('#'+h.id).length){if(h.invertLeft){$('#'+h.id).css({left:e.pageX-$('#'+h.id).outerWidth()+h.offsetLeft})}else{$('#'+h.id).css({left:e.pageX+h.offsetLeft})}if(h.invertTop){$('#'+h.id).css({top:e.pageY-$('#'+h.id).outerHeight()+h.offsetTop})}else{$('#'+h.id).css({top:e.pageY+h.offsetTop})}}})};$.fn.urTip=function(c){return this.each(function(){var a=$(this);if(a.data('urTip'))return;var b=new i(this,c);a.data('urTip',b)})}})(jQuery);
function initInputPlaceholder() {$('.focusable').each(function(){$(this).attr('placeholder',$(this).val());$(this).focus(function(){$(this).addClass('focused');if($(this).val()==$(this).attr('placeholder'))$(this).val('')}).blur(function(){$(this).removeClass('focused');if($(this).val()=='')$(this).val($(this).attr('placeholder'))})})}
function mainPromo() {
	var promoSpeed = 200; // slide speed
	var promoCurrent = 'current';
	var promoAutoTime = 9000; // 9 sec autoslide
	
	$('div.main-promo').each(function() {
		if(!$(this).hasClass('promo-impl')) {
			var promo = $(this);
			var promoSlicer = $('div.slicer', promo);
			var promoNode = $('div.node', promoSlicer);
			var promoItem = $('div.item', promoNode);
			var promoStep = parseInt(promoItem.eq(0).width());
			var promoItemLen = promoItem.length;
			var promoBtn = $('div.main-promo-btn a', promo);
			if(promoItemLen>1 && promoBtn.length==promoItemLen) {
				var promoActive = promoBtn.index(promoBtn.filter('.' + promoCurrent).eq(0));
				if(promoActive<0) {
					promoActive = 0;
				}
				promoBtn.removeClass(promoCurrent);
				promoBtn.eq(promoActive).addClass(promoCurrent);
				promoNode.css({
					left: -promoStep * promoActive
				});
				promoBtn.click(function() {
					promoActive = promoBtn.index(this);
					promoNode
						.stop()
						.animate({
							left: -promoStep * promoActive
						}, {
							duration: promoSpeed,
							complete: function() {
								promoBtn.removeClass(promoCurrent);
								promoBtn.eq(promoActive).addClass(promoCurrent);
							}
						});
					return false;
				});
				if(promoAutoTime) {
					var promoHovered = false;
					var promoTimer = false;
					
					function promoAutoSlide() {
						if(promoActive<promoItemLen-1) {
							promoActive++;
						} else {
							promoActive = 0;
						}
						promoNode
							.stop()
							.animate({
								left: -promoStep * promoActive
							}, {
								duration: promoSpeed,
								complete: function() {
									promoBtn.removeClass(promoCurrent);
									promoBtn.eq(promoActive).addClass(promoCurrent);
									promoAuto();
								}
							});
					}
					
					function promoAuto() {
						promoTimer = setTimeout(function() {
							promoAutoSlide();
						}, promoAutoTime);
					}
					
					promo.hover(function() {
						if(promoTimer) {
							clearTimeout(promoTimer);
							promoTimer = null;
						}
					}, function() {
						promoAuto();
					});
					
					promoAuto();
				}
			}
			
			promo.addClass('promo-impl');
		}
	});
}
function mapUkraine() {
	$('div.map').each(function() {
		if(!$(this).hasClass('map-implemented')) {
			var ukrMap = $(this);
			var ukrMapItems = $('li', ukrMap);
			var ukrMapAreas = $('area', ukrMap);
			ukrMapAreas
				.mouseenter(function() {
					ukrMapItems.filter('.' + $(this).attr('class')).show();
				})
				.mouseleave(function() {
					ukrMapItems.filter('.' + $(this).attr('class')).hide();
				});
			ukrMap.addClass('map-implemented');
		}
	});
}
function flexGallery() {
	var flexItems = 6;
	var flexSpeed = 300;
	
	$('div.flex-gallery').each(function() {
		if(!$(this).hasClass('flex-gallery-implemented')) {
			var flex = $(this);
			var flexSlicer = $('div.slicer', flex);
			var flexNode = $('div.node', flexSlicer);
			var flexItem = $('div.item', flexNode);
			var flexItemLen = flexItem.length;
			var flexLeft = $('a.btn-left', flex);
			var flexRight = $('a.btn-right', flex);
			if(flexItemLen<=flexItems) {
				flexLeft.hide();
				flexRight.hide();
			}
			var flexWidth = 0;
			var flexItemWidth = 0;
			var flexActive = 0;
			function resetFlex() {
				flexWidth = parseInt(flexSlicer.width());
				flexItemWidth = flexWidth/flexItems;
				flexNode.css({
					left: -flexActive*flexItemWidth,
					width: flexItemWidth*flexItemLen
				});
				flexItem.css({
					width: flexItemWidth
				});
			}
			resetFlex();
			$(window).resize(function() {
				resetFlex();
			});
			$('.prtf a').click(function() {
				resetFlex();
			});
			function slideFlex() {
				flexNode
					.stop()
					.animate({
						left: -flexItemWidth*flexActive
					}, {
						duration: flexSpeed
					});
			}
			flexLeft.click(function() {
				if(flexActive>0) {
					flexActive--;
				} else {
					flexActive = flexItemLen-flexItems;
				}
				slideFlex();
				return false;
			});
			flexRight.click(function() {
				if(flexActive<flexItemLen-flexItems) {
					flexActive++;
				} else {
					flexActive = 0;
				}
				slideFlex();
				return false;
			});
			flex.addClass('flex-gallery-implemented');
		}
	});
}
function initSearch() {
	$('div.search').each(function() {
		if(!$(this).hasClass('search-implemented')) {
			var search = $(this);
			var searchInp = $('input.txt', search);
			var searchDel = $('a.del', search);
			searchDel.click(function() {
				searchInp
					.val('')
					.focus();
				return false;
			});
			searchInp
				.attr('placeholder', searchInp.val())
				.focus(function() {
					search.addClass('search-focused');
					if(searchInp.val()==searchInp.attr('placeholder')) {
						searchInp.val('');
					}
				})
				.blur(function() {
					search.removeClass('search-focused');
					if(searchInp.val()=='') {
						searchInp.val(searchInp.attr('placeholder'));
					}
				});
			search.hover(function() {
				$(this).addClass('search-hover');
			}, function() {
				$(this).removeClass('search-hover');
			});
			search.addClass('search-implemented');
		}
	});
}
$(window).load(function() {
	// custom forms
	if(typeof window.customForm=='undefined') {
		window.customForm = false;
	}
	customForm = $('div.custom-form');
	customForm.urForm({
		replaceRadios: true,
		replaceCheckboxes: true,
		replaceSelects: true,
		selectOptionHTML: '<div><ul>{options}</ul><div class="select-b"><span></span><i class="l"></i><i class="r"></i></div></div>',
		flexibleSelects: true,
		selectImplemented: function () {
			$('div.customSelect').hover(function() {
				$(this).addClass('customSelectHover');
			}, function() {
				$(this).removeClass('customSelectHover');
			});
		}
	});
	window.customForm = $('div.custom-form').data('urForm');
});

$(function() {

	$("div.newst").tabs("div.tabpane > div");
	$("div.prtf").tabs("div.tabprtfpane > div");

});
$(function() {
	$("#PrintinPopup").click(function() {
		$(".main-holder").printElement({
			leaveOpen:true, 
			printMode:'popup'
		});
	});
});
$(function() {
	$(".l-price").click(
	function () {
 	       $(".dropdownprice").addClass("hover");
 	       return false;
	});
	$(".dropdownprice").mouseleave(function(){
		$(this).removeClass("hover");
	});
});
$(function() {
	initInputPlaceholder();
	mainPromo();
	mapUkraine();
	flexGallery();
	$('a.tooltip, .flex-gallery .item a').urTip({
		offsetTop: -10,
		offsetLeft: -30,
		template:'<div class="tooltip"><div class="tooltip-top"></div><div class="tooltip-center">{text}</div><div class="tooltip-bottom"></div></div>',
		invertTop: true
	});
	initSearch();
});
