(function(){function w(a){console.log("$f.fireEvent",[].slice.call(a))}function r(a){if(!a||typeof a!="object"){return a}var c=new a.constructor();for(var b in a){if(a.hasOwnProperty(b)){c[b]=r(a[b])}}return c}function p(a,d){if(!a){return}var f,e=0,c=a.length;if(c===undefined){for(f in a){if(d.call(a[f],f,a[f])===false){break}}}else{for(var b=a[0];e<c&&d.call(b,e,b)!==false;b=a[++e]){}}return a}function A(a){return document.getElementById(a)}function t(a,b,c){if(typeof b!="object"){return a}if(a&&b){p(b,function(e,d){if(!c||typeof d!="function"){a[e]=d}})}return a}function o(a){var c=a.indexOf(".");if(c!=-1){var d=a.substring(0,c)||"*";var e=a.substring(c+1,a.length);var b=[];p(document.getElementsByTagName(d),function(){if(this.className&&this.className.indexOf(e)!=-1){b.push(this)}});return b}}function x(a){a=a||window.event;if(a.preventDefault){a.stopPropagation();a.preventDefault()}else{a.returnValue=false;a.cancelBubble=true}return false}function s(a,c,b){a[c]=a[c]||[];a[c].push(b)}function y(){return"_"+(""+Math.random()).substring(2,10)}var u=function(b,d,c){var e=this;var f={};var a={};e.index=d;if(typeof b=="string"){b={url:b}}t(this,b,true);p(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var i="on"+this;if(i.indexOf("*")!=-1){i=i.substring(0,i.length-1);var h="onBefore"+i.substring(2);e[h]=function(j){s(a,h,j);return e}}e[i]=function(j){s(a,i,j);return e};if(d==-1){if(e[h]){c[h]=e[h]}if(e[i]){c[i]=e[i]}}});t(this,{onCuepoint:function(h,i){if(arguments.length==1){f.embedded=[null,h];return e}if(typeof h=="number"){h=[h]}var j=y();f[j]=[h,i];if(c.isLoaded()){c._api().fp_addCuepoints(h,d,j)}return e},update:function(i){t(e,i);if(c.isLoaded()){c._api().fp_updateClip(i,d)}var j=c.getConfig();var h=(d==-1)?j.clip:j.playlist[d];t(h,i,true)},_fireEvent:function(k,m,j,i){if(k=="onLoad"){p(f,function(E,D){if(D[0]){c._api().fp_addCuepoints(D[0],d,E)}});return false}i=i||e;if(k=="onCuepoint"){var l=f[m];if(l){return l[1].call(c,i,j)}}if(m&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(k)!=-1){t(i,m);if(m.metaData){if(!i.duration){i.duration=m.metaData.duration}else{i.fullDuration=m.metaData.duration}}}var h=true;p(a[k],function(){h=this.call(c,i,m,j)});return h}});if(b.onCuepoint){var g=b.onCuepoint;e.onCuepoint.apply(e,typeof g=="function"?[g]:g);delete b.onCuepoint}p(b,function(i,h){if(typeof h=="function"){s(a,i,h);delete b[i]}});if(d==-1){c.onCuepoint=this.onCuepoint}};var q=function(f,d,e,b){var c={};var g=this;var a=false;if(b){t(c,b)}p(d,function(i,h){if(typeof h=="function"){c[i]=h;delete d[i]}});t(this,{animate:function(l,k,h){if(!l){return g}if(typeof k=="function"){h=k;k=500}if(typeof l=="string"){var i=l;l={};l[i]=k;k=500}if(h){var j=y();c[j]=h}if(k===undefined){k=500}d=e._api().fp_animate(f,l,k,j);return g},css:function(i,h){if(h!==undefined){var j={};j[i]=h;i=j}d=e._api().fp_css(f,i);t(g,d);return g},show:function(){this.display="block";e._api().fp_showPlugin(f);return g},hide:function(){this.display="none";e._api().fp_hidePlugin(f);return g},toggle:function(){this.display=e._api().fp_togglePlugin(f);return g},fadeTo:function(k,h,i){if(typeof h=="function"){i=h;h=500}if(i){var j=y();c[j]=i}this.display=e._api().fp_fadeTo(f,k,h,j);this.opacity=k;return g},fadeIn:function(h,i){return g.fadeTo(1,h,i)},fadeOut:function(h,i){return g.fadeTo(0,h,i)},getName:function(){return f},getPlayer:function(){return e},_fireEvent:function(i,j,h){if(i=="onUpdate"){var l=e._api().fp_getPlugin(f);if(!l){return}t(g,l);delete g.methods;if(!a){p(l.methods,function(){var m=""+this;g[m]=function(){var E=[].slice.call(arguments);var D=e._api().fp_invoke(f,m,E);return D==="undefined"||D===undefined?g:D}});a=true}}var k=c[i];if(k){k.apply(g,j);if(i.substring(0,1)=="_"){delete c[i]}}}})};function B(h,G,i){var I=this,j=null,k,F,f=[],H={},e={},b,m,l,a,g,d;t(I,{id:function(){return b},isLoaded:function(){return(j!==null)},getParent:function(){return h},hide:function(D){if(D){h.style.height="0px"}if(j){j.style.height="0px"}return I},show:function(){h.style.height=d+"px";if(j){j.style.height=g+"px"}return I},isHidden:function(){return j&&parseInt(j.style.height,10)===0},load:function(D){if(!j&&I._fireEvent("onBeforeLoad")!==false){p(C,function(){this.unload()});k=h.innerHTML;if(k&&!flashembed.isSupported(G.version)){h.innerHTML=""}flashembed(h,G,{config:i});if(D){D.cached=true;s(e,"onLoad",D)}}return I},unload:function(){if(k.replace(/\s/g,"")!==""){if(I._fireEvent("onBeforeUnload")===false){return I}try{if(j){j.fp_close();I._fireEvent("onUnload")}}catch(D){}j=null;h.innerHTML=k}return I},getClip:function(D){if(D===undefined){D=a}return f[D]},getCommonClip:function(){return F},getPlaylist:function(){return f},getPlugin:function(J){var D=H[J];if(!D&&I.isLoaded()){var E=I._api().fp_getPlugin(J);if(E){D=new q(J,E,I);H[J]=D}}return D},getScreen:function(){return I.getPlugin("screen")},getControls:function(){return I.getPlugin("controls")},getConfig:function(D){return D?r(i):i},getFlashParams:function(){return G},loadPlugin:function(N,O,E,M){if(typeof E=="function"){M=E;E={}}var P=M?y():"_";I._api().fp_loadPlugin(N,O,E,P);var Q={};Q[P]=M;var D=new q(N,null,I,Q);H[N]=D;return D},getState:function(){return j?j.fp_getState():-1},play:function(E,J){function D(){if(E!==undefined){I._api().fp_play(E,J)}else{I._api().fp_play()}}if(j){D()}else{I.load(function(){D()})}return I},getVersion:function(){var D="flowplayer.js 3.1.4";if(j){var E=j.fp_getVersion();E.push(D);return E}return D},_api:function(){if(!j){throw"Flowplayer "+I.id()+" not loaded when calling an API method"}return j},setClip:function(D){I.setPlaylist([D]);return I},getIndex:function(){return l}});p(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var E="on"+this;if(E.indexOf("*")!=-1){E=E.substring(0,E.length-1);var D="onBefore"+E.substring(2);I[D]=function(J){s(e,D,J);return I}}I[E]=function(J){s(e,E,J);return I}});p(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed").split(","),function(){var D=this;I[D]=function(J,K){if(!j){return I}var E=null;if(J!==undefined&&K!==undefined){E=j["fp_"+D](J,K)}else{E=(J===undefined)?j["fp_"+D]():j["fp_"+D](J)}return E==="undefined"||E===undefined?I:E}});I._fireEvent=function(E){if(typeof E=="string"){E=[E]}var D=E[0],R=E[1],T=E[2],U=E[3],V=0;if(i.debug){w(E)}if(!j&&D=="onLoad"&&R=="player"){j=j||A(m);g=j.clientHeight;p(f,function(){this._fireEvent("onLoad")});p(H,function(K,J){J._fireEvent("onUpdate")});F._fireEvent("onLoad")}if(D=="onLoad"&&R!="player"){return}if(D=="onError"){if(typeof R=="string"||(typeof R=="number"&&typeof T=="number")){R=T;T=U}}if(D=="onContextMenu"){p(i.contextMenu[R],function(K,J){J.call(I)});return}if(D=="onPluginEvent"){var Y=R.name||R;var X=H[Y];if(X){X._fireEvent("onUpdate",R);X._fireEvent(T,E.slice(3))}return}if(D=="onPlaylistReplace"){f=[];var S=0;p(R,function(){f.push(new u(this,S++,I))})}if(D=="onClipAdd"){if(R.isInStream){return}R=new u(R,T,I);f.splice(T,0,R);for(V=T+1;V<f.length;V++){f[V].index++}}var Q=true;if(typeof R=="number"&&R<f.length){a=R;var W=f[R];if(W){Q=W._fireEvent(D,T,U)}if(!W||Q!==false){Q=F._fireEvent(D,T,U,W)}}p(e[D],function(){Q=this.call(I,R,T);if(this.cached){e[D].splice(V,1)}if(Q===false){return false}V++});return Q};function c(){if($f(h)){$f(h).getParent().innerHTML="";l=$f(h).getIndex();C[l]=I}else{C.push(I);l=C.length-1}d=parseInt(h.style.height,10)||h.clientHeight;if(typeof G=="string"){G={src:G}}b=h.id||"fp"+y();m=G.id||b+"_api";G.id=m;i.playerId=b;if(typeof i=="string"){i={clip:{url:i}}}if(typeof i.clip=="string"){i.clip={url:i.clip}}i.clip=i.clip||{};if(h.getAttribute("href",2)&&!i.clip.url){i.clip.url=h.getAttribute("href",2)}F=new u(i.clip,-1,I);i.playlist=i.playlist||[i.clip];var E=0;p(i.playlist,function(){var J=this;if(typeof J=="object"&&J.length){J={url:""+J}}p(i.clip,function(L,K){if(K!==undefined&&J[L]===undefined&&typeof K!="function"){J[L]=K}});i.playlist[E]=J;J=new u(J,E,I);f.push(J);E++});p(i,function(K,J){if(typeof J=="function"){if(F[K]){F[K](J)}else{s(e,K,J)}delete i[K]}});p(i.plugins,function(K,J){if(J){H[K]=new q(K,J,I)}});if(!i.plugins||i.plugins.controls===undefined){H.controls=new q("controls",null,I)}H.canvas=new q("canvas",null,I);G.bgcolor=G.bgcolor||"#000000";G.version=G.version||[9,0];G.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";function D(J){if(!I.isLoaded()&&I._fireEvent("onBeforeClick")!==false){I.load()}return x(J)}k=h.innerHTML;if(k.replace(/\s/g,"")!==""){if(h.addEventListener){h.addEventListener("click",D,false)}else{if(h.attachEvent){h.attachEvent("onclick",D)}}}else{if(h.addEventListener){h.addEventListener("click",x,false)}I.load()}}if(typeof h=="string"){flashembed.domReady(function(){var D=A(h);if(!D){throw"Flowplayer cannot access element: "+h}else{h=D;c()}})}else{c()}}var C=[];function z(a){this.length=a.length;this.each=function(b){p(a,b)};this.size=function(){return a.length}}window.flowplayer=window.$f=function(){var e=null;var f=arguments[0];if(!arguments.length){p(C,function(){if(this.isLoaded()){e=this;return false}});return e||C[0]}if(arguments.length==1){if(typeof f=="number"){return C[f]}else{if(f=="*"){return new z(C)}p(C,function(){if(this.id()==f.id||this.id()==f||this.getParent()==f){e=this;return false}});return e}}if(arguments.length>1){var c=arguments[1];var d=(arguments.length==3)?arguments[2]:{};if(typeof f=="string"){if(f.indexOf(".")!=-1){var a=[];p(o(f),function(){a.push(new B(this,r(c),r(d)))});return new z(a)}else{var b=A(f);return new B(b!==null?b:f,c,d)}}else{if(f){return new B(f,c,d)}}}return null};t(window.$f,{fireEvent:function(){var b=[].slice.call(arguments);var a=$f(b[0]);return a?a._fireEvent(b.slice(1)):null},addPlugin:function(b,a){B.prototype[b]=a;return $f},each:p,extend:t});if(typeof jQuery=="function"){jQuery.prototype.flowplayer=function(a,b){if(!arguments.length||typeof arguments[0]=="number"){var c=[];this.each(function(){var d=$f(this);if(d){c.push(d)}});return arguments.length?c[arguments[0]]:new z(c)}return this.each(function(){$f(this,r(a),b?r(b):{})})}}})();(function(){var q=typeof jQuery=="function";var l={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(q){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:l}}function k(){if(s.done){return false}var a=document;if(a&&a.getElementsByTagName&&a.getElementById&&a.body){clearInterval(s.timer);s.timer=null;for(var b=0;b<s.ready.length;b++){s.ready[b].call()}s.ready=null;s.done=true}}var s=q?jQuery:function(a){if(s.done){return a()}if(s.timer){s.ready.push(a)}else{s.ready=[a];s.timer=setInterval(k,13)}};function p(a,b){if(b){for(key in b){if(b.hasOwnProperty(key)){a[key]=b[key]}}}return a}function o(c){switch(m(c)){case"string":c=c.replace(new RegExp('(["\\\\])',"g"),"\\$1");c=c.replace(/^\s?(\d+)%/,"$1pct");return'"'+c+'"';case"array":return"["+t(c,function(d){return o(d)}).join(",")+"]";case"function":return'"function()"';case"object":var b=[];for(var a in c){if(c.hasOwnProperty(a)){b.push('"'+a+'":'+o(c[a]))}}return"{"+b.join(",")+"}"}return String(c).replace(/\s/g," ").replace(/\'/g,'"')}function m(a){if(a===null||a===undefined){return false}var b=typeof a;return(b=="object"&&a.push)?"array":b}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function t(c,d){var a=[];for(var b in c){if(c.hasOwnProperty(b)){a[b]=d(c[b])}}return a}function u(e,c){var f=p({},e);var d=document.all;var h='<object width="'+f.width+'" height="'+f.height+'"';if(d&&!f.id){f.id="_"+(""+Math.random()).substring(9)}if(f.id){h+=' id="'+f.id+'"'}if(f.cachebusting){f.src+=((f.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(f.w3c||!d){h+=' data="'+f.src+'" type="application/x-shockwave-flash"'}else{h+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}h+=">";if(f.w3c||d){h+='<param name="movie" value="'+f.src+'" />'}f.width=f.height=f.id=f.w3c=f.src=null;for(var b in f){if(f[b]!==null){h+='<param name="'+b+'" value="'+f[b]+'" />'}}var g="";if(c){for(var a in c){if(c[a]!==null){g+=a+"="+(typeof c[a]=="object"?o(c[a]):c[a])+"&"}}g=g.substring(0,g.length-1);h+='<param name="flashvars" value=\''+g+"' />"}h+="</object>";return h}function r(a,f,b){var c=flashembed.getVersion();p(this,{getContainer:function(){return a},getConf:function(){return f},getVersion:function(){return c},getFlashvars:function(){return b},getApi:function(){return a.firstChild},getHTML:function(){return u(f,b)}});var e=f.version;var d=f.expressInstall;var g=!e||flashembed.isSupported(e);if(g){f.onFail=f.version=f.expressInstall=null;a.innerHTML=u(f,b)}else{if(e&&d&&flashembed.isSupported([6,65])){p(f,{src:d});b={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};a.innerHTML=u(f,b)}else{if(a.innerHTML.replace(/\s/g,"")!==""){}else{a.innerHTML="<h2>Flash version "+e+" or greater is required</h2><h3>"+(c[0]>0?"Your version is "+c:"You have no flash plugin installed")+"</h3>"+(a.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(a.tagName=="A"){a.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!g&&f.onFail){var h=f.onFail.call(this);if(typeof h=="string"){a.innerHTML=h}}if(document.all){window[f.id]=document.getElementById(f.id)}}window.flashembed=function(b,a,c){if(typeof b=="string"){var e=document.getElementById(b);if(e){b=e}else{s(function(){flashembed(b,a,c)});return}}if(!b){return}if(typeof a=="string"){a={src:a}}var d=p({},l);p(d,a);return new r(b,d,c)};p(window.flashembed,{getVersion:function(){var a=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var b=navigator.plugins["Shockwave Flash"].description;if(typeof b!="undefined"){b=b.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var h=parseInt(b.replace(/^(.*)\..*$/,"$1"),10);var d=/r/.test(b)?parseInt(b.replace(/^.*r(.*)$/,"$1"),10):0;a=[h,d]}}else{if(window.ActiveXObject){try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=[6,0];f.AllowScriptAccess="always"}catch(c){if(a[0]==6){return a}}try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(typeof f=="object"){b=f.GetVariable("$version");if(typeof b!="undefined"){b=b.replace(/^\S+\s+(.*)$/,"$1").split(",");a=[parseInt(b[0],10),parseInt(b[2],10)]}}}}return a},isSupported:function(c){var a=flashembed.getVersion();var b=(a[0]>c[0])||(a[0]==c[0]&&a[1]>=c[1]);return b},domReady:s,asString:o,getHTML:u});if(q){jQuery.fn.flashembed=function(b,c){var a=null;this.each(function(){a=flashembed(this,b,c)});return b.api===false?this:a}}})();
/*
 * jQuery Form Plugin
 * version: 2.43 (12-MAR-2010)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(b){b.fn.ajaxSubmit=function(s){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof s=="function"){s={success:s}}var e=b.trim(this.attr("action"));if(e){e=(e.match(/^([^#]+)/)||[])[1]}e=e||window.location.href||"";s=b.extend({url:e,type:this.attr("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},s||{});var u={};this.trigger("form-pre-serialize",[this,s,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(s.beforeSerialize&&s.beforeSerialize(this,s)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var m=this.formToArray(s.semantic);if(s.data){s.extraData=s.data;for(var f in s.data){if(s.data[f] instanceof Array){for(var g in s.data[f]){m.push({name:f,value:s.data[f][g]})}}else{m.push({name:f,value:s.data[f]})}}}if(s.beforeSubmit&&s.beforeSubmit(m,this,s)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[m,this,s,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var d=b.param(m);if(s.type.toUpperCase()=="GET"){s.url+=(s.url.indexOf("?")>=0?"&":"?")+d;s.data=null}else{s.data=d}var t=this,l=[];if(s.resetForm){l.push(function(){t.resetForm()})}if(s.clearForm){l.push(function(){t.clearForm()})}if(!s.dataType&&s.target){var p=s.success||function(){};l.push(function(k){var j=s.replaceTarget?"replaceWith":"html";b(s.target)[j](k).each(p,arguments)})}else{if(s.success){l.push(s.success)}}s.success=function(w,k,x){for(var q=0,j=l.length;q<j;q++){l[q].apply(s,[w,k,x||t,t])}};var c=b("input:file",this).fieldValue();var r=false;for(var i=0;i<c.length;i++){if(c[i]){r=true}}var h=false;if((c.length&&s.iframe!==false)||s.iframe||r||h){if(s.closeKeepAlive){b.get(s.closeKeepAlive,o)}else{o()}}else{b.ajax(s)}this.trigger("form-submit-notify",[this,s]);return this;function o(){var x=t[0];if(b(":input[name=submit]",x).length){alert('Error: Form elements must not be named "submit".');return}var q=b.extend({},b.ajaxSettings,s);var I=b.extend(true,{},b.extend(true,{},b.ajaxSettings),q);var w="jqFormIO"+(new Date().getTime());var E=b('<iframe id="'+w+'" name="'+w+'" src="'+q.iframeSrc+'" onload="(jQuery(this).data(\'form-plugin-onload\'))()" />');var G=E[0];E.css({position:"absolute",top:"-1000px",left:"-1000px"});var H={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;E.attr("src",q.iframeSrc)}};var F=q.global;if(F&&!b.active++){b.event.trigger("ajaxStart")}if(F){b.event.trigger("ajaxSend",[H,q])}if(I.beforeSend&&I.beforeSend(H,I)===false){I.global&&b.active--;return}if(H.aborted){return}var k=false;var B=0;var j=x.clk;if(j){var z=j.name;if(z&&!j.disabled){q.extraData=q.extraData||{};q.extraData[z]=j.value;if(j.type=="image"){q.extraData[z+".x"]=x.clk_x;q.extraData[z+".y"]=x.clk_y}}}function y(){var L=t.attr("target"),J=t.attr("action");x.setAttribute("target",w);if(x.getAttribute("method")!="POST"){x.setAttribute("method","POST")}if(x.getAttribute("action")!=q.url){x.setAttribute("action",q.url)}if(!q.skipEncodingOverride){t.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(q.timeout){setTimeout(function(){B=true;C()},q.timeout)}var K=[];try{if(q.extraData){for(var M in q.extraData){K.push(b('<input type="hidden" name="'+M+'" value="'+q.extraData[M]+'" />').appendTo(x)[0])}}E.appendTo("body");E.data("form-plugin-onload",C);x.submit()}finally{x.setAttribute("action",J);L?x.setAttribute("target",L):t.removeAttr("target");b(K).remove()}}if(q.forceSync){y()}else{setTimeout(y,10)}var A=100;function C(){if(k){return}var K=true;try{if(B){throw"timeout"}var L,O;O=G.contentWindow?G.contentWindow.document:G.contentDocument?G.contentDocument:G.document;var P=q.dataType=="xml"||O.XMLDocument||b.isXMLDoc(O);a("isXml="+P);if(!P&&(O.body==null||O.body.innerHTML=="")){if(--A){a("requeing onLoad callback, DOM not available");setTimeout(C,250);return}a("Could not access iframe DOM after 100 tries.");return}a("response detected");k=true;H.responseText=O.body?O.body.innerHTML:null;H.responseXML=O.XMLDocument?O.XMLDocument:O;H.getResponseHeader=function(R){var Q={"content-type":q.dataType};return Q[R]};if(q.dataType=="json"||q.dataType=="script"){var J=O.getElementsByTagName("textarea")[0];if(J){H.responseText=J.value}else{var N=O.getElementsByTagName("pre")[0];if(N){H.responseText=N.innerHTML}}}else{if(q.dataType=="xml"&&!H.responseXML&&H.responseText!=null){H.responseXML=D(H.responseText)}}L=b.httpData(H,q.dataType)}catch(M){a("error caught:",M);K=false;H.error=M;b.handleError(q,H,"error",M)}if(K){q.success(L,"success");if(F){b.event.trigger("ajaxSuccess",[H,q])}}if(F){b.event.trigger("ajaxComplete",[H,q])}if(F&&!--b.active){b.event.trigger("ajaxStop")}if(q.complete){q.complete(H,K?"success":"error")}setTimeout(function(){E.removeData("form-plugin-onload");E.remove();H.responseXML=null},100)}function D(J,K){if(window.ActiveXObject){K=new ActiveXObject("Microsoft.XMLDOM");K.async="false";K.loadXML(J)}else{K=(new DOMParser()).parseFromString(J,"text/xml")}return(K&&K.documentElement&&K.documentElement.tagName!="parsererror")?K:null}}};b.fn.ajaxForm=function(c){return this.ajaxFormUnbind().bind("submit.form-plugin",function(d){d.preventDefault();b(this).ajaxSubmit(c)}).bind("click.form-plugin",function(i){var h=i.target;var f=b(h);if(!(f.is(":submit,input:image"))){var d=f.closest(":submit");if(d.length==0){return}h=d[0]}var g=this;g.clk=h;if(h.type=="image"){if(i.offsetX!=undefined){g.clk_x=i.offsetX;g.clk_y=i.offsetY}else{if(typeof b.fn.offset=="function"){var j=f.offset();g.clk_x=i.pageX-j.left;g.clk_y=i.pageY-j.top}else{g.clk_x=i.pageX-h.offsetLeft;g.clk_y=i.pageY-h.offsetTop}}}setTimeout(function(){g.clk=g.clk_x=g.clk_y=null},100)})};b.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};b.fn.formToArray=function(q){var p=[];if(this.length==0){return p}var d=this[0];var h=q?d.getElementsByTagName("*"):d.elements;if(!h){return p}for(var k=0,m=h.length;k<m;k++){var e=h[k];var f=e.name;if(!f){continue}if(q&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){p.push({name:f,value:b(e).val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}continue}var r=b.fieldValue(e,true);if(r&&r.constructor==Array){for(var g=0,c=r.length;g<c;g++){p.push({name:f,value:r[g]})}}else{if(r!==null&&typeof r!="undefined"){p.push({name:f,value:r})}}}if(!q&&d.clk){var l=b(d.clk),o=l[0],f=o.name;if(f&&!o.disabled&&o.type=="image"){p.push({name:f,value:l.val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return p};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(d){var c=[];this.each(function(){var h=this.name;if(!h){return}var f=b.fieldValue(this,d);if(f&&f.constructor==Array){for(var g=0,e=f.length;g<e;g++){c.push({name:h,value:f[g]})}}else{if(f!==null&&typeof f!="undefined"){c.push({name:this.name,value:f})}}});return b.param(c)};b.fn.fieldValue=function(h){for(var g=[],e=0,c=this.length;e<c;e++){var f=this[e];var d=b.fieldValue(f,h);if(d===null||typeof d=="undefined"||(d.constructor==Array&&!d.length)){continue}d.constructor==Array?b.merge(g,d):g.push(d)}return g};b.fieldValue=function(c,j){var e=c.name,p=c.type,q=c.tagName.toLowerCase();if(typeof j=="undefined"){j=true}if(j&&(!e||c.disabled||p=="reset"||p=="button"||(p=="checkbox"||p=="radio")&&!c.checked||(p=="submit"||p=="image")&&c.form&&c.form.clk!=c||q=="select"&&c.selectedIndex==-1)){return null}if(q=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(p=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}return c.value};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,c=this.tagName.toLowerCase();if(d=="text"||d=="password"||c=="textarea"){this.value=""}else{if(d=="checkbox"||d=="radio"){this.checked=false}else{if(c=="select"){this.selectedIndex=-1}}}})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};b.fn.enable=function(c){if(c==undefined){c=true}return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c==undefined){c=true}return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var e=b(this).parent("select");if(c&&e[0]&&e[0].type=="select-one"){e.find("option").selected(false)}this.selected=c}}})};function a(){if(b.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(c)}else{if(window.opera&&window.opera.postError){window.opera.postError(c)}}}}})(jQuery);jQuery.fn.extend({everyTime:function(b,c,d,e,a){return this.each(function(){jQuery.timer.add(this,b,c,d,e,a)})},oneTime:function(a,b,c){return this.each(function(){jQuery.timer.add(this,a,b,c,1)})},stopTime:function(a,b){return this.each(function(){jQuery.timer.remove(this,a,b)})}});jQuery.extend({timer:{guid:1,global:{},regex:/^([0-9]+)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1000,das:10000,hs:100000,ks:1000000},timeParse:function(c){if(c==undefined||c==null){return null}var a=this.regex.exec(jQuery.trim(c.toString()));if(a[2]){var b=parseInt(a[1],10);var d=this.powers[a[2]]||1;return b*d}else{return c}},add:function(e,c,d,g,h,b){var a=0;if(jQuery.isFunction(d)){if(!h){h=g}g=d;d=c}c=jQuery.timer.timeParse(c);if(typeof c!="number"||isNaN(c)||c<=0){return}if(h&&h.constructor!=Number){b=!!h;h=0}h=h||0;b=b||false;if(!e.$timers){e.$timers={}}if(!e.$timers[d]){e.$timers[d]={}}g.$timerID=g.$timerID||this.guid++;var f=function(){if(b&&this.inProgress){return}this.inProgress=true;if((++a>h&&h!==0)||g.call(e,a)===false){jQuery.timer.remove(e,d,g)}this.inProgress=false};f.$timerID=g.$timerID;if(!e.$timers[d][g.$timerID]){e.$timers[d][g.$timerID]=window.setInterval(f,c)}if(!this.global[d]){this.global[d]=[]}this.global[d].push(e)},remove:function(c,b,d){var e=c.$timers,a;if(e){if(!b){for(b in e){this.remove(c,b,d)}}else{if(e[b]){if(d){if(d.$timerID){window.clearInterval(e[b][d.$timerID]);delete e[b][d.$timerID]}}else{for(var d in e[b]){window.clearInterval(e[b][d]);delete e[b][d]}}for(a in e[b]){break}if(!a){a=null;delete e[b]}}}for(a in e){break}if(!a){c.$timers=null}}}}});if(jQuery.browser.msie){jQuery(window).one("unload",function(){var d=jQuery.timer.global;for(var a in d){var c=d[a],b=c.length;while(--b){jQuery.timer.remove(c[b],a)}}})}(function(e){e.fn.fixPNG=function(){return this.each(function(){var l=e(this).css("backgroundImage");if(l.match(/^url\(["']?(.*\.png)["']?\)$/i)){l=RegExp.$1;e(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+(e(this).css("backgroundRepeat")=="no-repeat"?"crop":"scale")+", src='"+l+"')"}).each(function(){var m=e(this).css("position");if(m!="absolute"&&m!="relative"){e(this).css("position","relative")}})}})};var c,a,h=false,b=new Image,j,k=1,d=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;var i=null,g=e.browser.msie&&e.browser.version.substr(0,1)==6&&!window.XMLHttpRequest,f=g||(e.browser.msie&&e.browser.version.substr(0,1)==7);e.fn.fancybox=function(l){var q=e.extend({},e.fn.fancybox.defaults,l);var y=this;function s(){c=this;a=e.extend({},q);r();return false}function r(){if(h){return}if(e.isFunction(a.callbackOnStart)){a.callbackOnStart()}a.itemArray=[];a.itemCurrent=0;if(q.itemArray.length>0){a.itemArray=q.itemArray}else{var z={};if(!c.rel||c.rel==""){var z={href:c.href,title:c.title};if(e(c).children("img:first").length){z.orig=e(c).children("img:first")}else{z.orig=e(c)}if(z.title==""||typeof z.title=="undefined"){z.title=z.orig.attr("alt")}a.itemArray.push(z)}else{var A=e(y).filter("a[rel="+c.rel+"]");var z={};for(var o=0;o<A.length;o++){z={href:A[o].href,title:A[o].title};if(e(A[o]).children("img:first").length){z.orig=e(A[o]).children("img:first")}else{z.orig=e(A[o])}if(z.title==""||typeof z.title=="undefined"){z.title=z.orig.attr("alt")}a.itemArray.push(z)}}}while(a.itemArray[a.itemCurrent].href!=c.href){a.itemCurrent++}if(a.overlayShow){if(g){e("embed, object, select").css("visibility","hidden");e("#fancy_overlay").css("height",e(document).height())}e("#fancy_overlay").css({"background-color":a.overlayColor,opacity:a.overlayOpacity}).show()}e(window).bind("resize.fb scroll.fb",e.fn.fancybox.scrollBox);t()}function t(){e("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();var o=a.itemArray[a.itemCurrent].href;if(o.match("iframe")||c.className.indexOf("iframe")>=0){e.fn.fancybox.showLoading();p('<iframe id="fancy_frame" onload="jQuery.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+o+'"></iframe>',a.frameWidth,a.frameHeight)}else{if(o.match(/#/)){var z=window.location.href.split("#")[0];z=o.replace(z,"");z=z.substr(z.indexOf("#"));p('<div id="fancy_div">'+e(z).html()+"</div>",a.frameWidth,a.frameHeight)}else{if(o.match(d)){b=new Image;b.src=o;if(b.complete){x()}else{e.fn.fancybox.showLoading();e(b).unbind().bind("load",function(){e("#fancy_loading").hide();x()})}}else{e.fn.fancybox.showLoading();e.get(o,function(A){e("#fancy_loading").hide();p('<div id="fancy_ajax">'+A+"</div>",a.frameWidth,a.frameHeight)})}}}}function x(){var B=b.width;var o=b.height;var D=(a.padding*2)+40;var C=(a.padding*2)+60;var z=e.fn.fancybox.getViewport();if(a.imageScale&&(B>(z[0]-D)||o>(z[1]-C))){var A=Math.min(Math.min(z[0]-D,B)/B,Math.min(z[1]-C,o)/o);B=Math.round(A*B);o=Math.round(A*o)}p('<img alt="" id="fancy_img" src="'+b.src+'" />',B,o)}function u(){if((a.itemArray.length-1)>a.itemCurrent){var o=a.itemArray[a.itemCurrent+1].href||false;if(o&&o.match(d)){objNext=new Image();objNext.src=o}}if(a.itemCurrent>0){var o=a.itemArray[a.itemCurrent-1].href||false;if(o&&o.match(d)){objNext=new Image();objNext.src=o}}}function p(D,z,F){h=true;var B=a.padding;if(f||i){e("#fancy_content")[0].style.removeExpression("height");e("#fancy_content")[0].style.removeExpression("width")}if(B>0){z+=B*2;F+=B*2;e("#fancy_content").css({top:B+"px",right:B+"px",bottom:B+"px",left:B+"px",width:"auto",height:"auto"});if(f||i){e("#fancy_content")[0].style.setExpression("height","(this.parentNode.clientHeight - "+B*2+")");e("#fancy_content")[0].style.setExpression("width","(this.parentNode.clientWidth - "+B*2+")")}}else{e("#fancy_content").css({top:0,right:0,bottom:0,left:0,width:"100%",height:"100%"})}if(e("#fancy_outer").is(":visible")&&z==e("#fancy_outer").width()&&F==e("#fancy_outer").height()){e("#fancy_content").fadeOut("fast",function(){e("#fancy_content").empty().append(e(D)).fadeIn("normal",function(){m()})});return}var E=e.fn.fancybox.getViewport();var H=(F+60)>E[1]?E[3]:(E[3]+Math.round((E[1]-F-60)*0.5));var A=(z+40)>E[0]?E[2]:(E[2]+Math.round((E[0]-z-40)*0.5));var G={left:A,top:H,width:z+"px",height:F+"px"};if(e("#fancy_outer").is(":visible")){e("#fancy_content").fadeOut("normal",function(){e("#fancy_content").empty();e("#fancy_outer").animate(G,a.zoomSpeedChange,a.easingChange,function(){e("#fancy_content").append(e(D)).fadeIn("normal",function(){m()})})})}else{if(a.zoomSpeedIn>0&&a.itemArray[a.itemCurrent].orig!==undefined){e("#fancy_content").empty().append(e(D));var C=a.itemArray[a.itemCurrent].orig;var o=e.fn.fancybox.getPosition(C);e("#fancy_outer").css({left:(o.left-20-a.padding)+"px",top:(o.top-20-a.padding)+"px",width:e(C).width()+(a.padding*2),height:e(C).height()+(a.padding*2)});if(a.zoomOpacity){G.opacity="show"}e("#fancy_outer").animate(G,a.zoomSpeedIn,a.easingIn,function(){m()})}else{e("#fancy_content").hide().empty().append(e(D)).show();e("#fancy_outer").css(G).fadeIn("normal",function(){m()})}}}function w(){if(a.itemCurrent!==0){e("#fancy_left, #fancy_left_ico").unbind().bind("click",function(o){o.stopPropagation();a.itemCurrent--;t();return false});e("#fancy_left").show()}if(a.itemCurrent!=(a.itemArray.length-1)){e("#fancy_right, #fancy_right_ico").unbind().bind("click",function(o){o.stopPropagation();a.itemCurrent++;t();return false});e("#fancy_right").show()}}function m(){if(e.browser.msie){e("#fancy_content")[0].style.removeAttribute("filter");e("#fancy_outer")[0].style.removeAttribute("filter")}w();u();e(document).bind("keydown.fb",function(z){if(z.keyCode==27&&a.enableEscapeButton){e.fn.fancybox.close()}else{if(z.keyCode==37&&a.itemCurrent!==0){e(document).unbind("keydown.fb");a.itemCurrent--;t()}else{if(z.keyCode==39&&a.itemCurrent!=(a.itemArray.length-1)){e(document).unbind("keydown.fb");a.itemCurrent++;t()}}}});if(a.hideOnContentClick){e("#fancy_content").click(e.fn.fancybox.close)}if(a.overlayShow&&a.hideOnOverlayClick){e("#fancy_overlay").bind("click",e.fn.fancybox.close)}if(a.showCloseButton){e("#fancy_close").bind("click",e.fn.fancybox.close).show()}if(typeof a.itemArray[a.itemCurrent].title!=="undefined"&&a.itemArray[a.itemCurrent].title.length>0){var o=e("#fancy_outer").position();e("#fancy_title div").text(a.itemArray[a.itemCurrent].title).html();e("#fancy_title").css({top:o.top+e("#fancy_outer").outerHeight()-32,left:o.left+((e("#fancy_outer").outerWidth()*0.5)-(e("#fancy_title").width()*0.5))}).show()}if(a.overlayShow&&g){e("embed, object, select",e("#fancy_content")).css("visibility","visible")}if(e.isFunction(a.callbackOnShow)){a.callbackOnShow(a.itemArray[a.itemCurrent])}if(e.browser.msie){e("#fancy_outer")[0].style.removeAttribute("filter");e("#fancy_content")[0].style.removeAttribute("filter")}h=false}return this.unbind("click.fb").bind("click.fb",s)};e.fn.fancybox.scrollBox=function(){var l=e.fn.fancybox.getViewport();if(a.centerOnScroll&&e("#fancy_outer").is(":visible")){var m=e("#fancy_outer").outerWidth();var o=e("#fancy_outer").outerHeight();var p={top:(o>l[1]?l[3]:l[3]+Math.round((l[1]-o)*0.5)),left:(m>l[0]?l[2]:l[2]+Math.round((l[0]-m)*0.5))};e("#fancy_outer").css(p);e("#fancy_title").css({top:p.top+o-32,left:p.left+((m*0.5)-(e("#fancy_title").width()*0.5))})}if(g&&e("#fancy_overlay").is(":visible")){e("#fancy_overlay").css({height:e(document).height()})}if(e("#fancy_loading").is(":visible")){e("#fancy_loading").css({left:((l[0]-40)*0.5+l[2]),top:((l[1]-40)*0.5+l[3])})}};e.fn.fancybox.getNumeric=function(l,m){return parseInt(e.curCSS(l.jquery?l[0]:l,m,true))||0};e.fn.fancybox.getPosition=function(l){var m=l.offset();m.top+=e.fn.fancybox.getNumeric(l,"paddingTop");m.top+=e.fn.fancybox.getNumeric(l,"borderTopWidth");m.left+=e.fn.fancybox.getNumeric(l,"paddingLeft");m.left+=e.fn.fancybox.getNumeric(l,"borderLeftWidth");return m};e.fn.fancybox.showIframe=function(){e("#fancy_loading").hide();e("#fancy_frame").show()};e.fn.fancybox.getViewport=function(){return[e(window).width(),e(window).height(),e(document).scrollLeft(),e(document).scrollTop()]};e.fn.fancybox.animateLoading=function(){if(!e("#fancy_loading").is(":visible")){clearInterval(j);return}e("#fancy_loading > div").css("top",(k*-40)+"px");k=(k+1)%12};e.fn.fancybox.showLoading=function(){clearInterval(j);var l=e.fn.fancybox.getViewport();e("#fancy_loading").css({left:((l[0]-40)*0.5+l[2]),top:((l[1]-40)*0.5+l[3])}).show();e("#fancy_loading").bind("click",e.fn.fancybox.close);j=setInterval(e.fn.fancybox.animateLoading,66)};e.fn.fancybox.close=function(){h=true;e(b).unbind();e(document).unbind("keydown.fb");e(window).unbind("resize.fb scroll.fb");e("#fancy_overlay, #fancy_content, #fancy_close").unbind();e("#fancy_close, #fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();__cleanup=function(){if(e("#fancy_overlay").is(":visible")){e("#fancy_overlay").fadeOut("fast")}e("#fancy_content").empty();if(a.centerOnScroll){e(window).unbind("resize.fb scroll.fb")}if(g){e("embed, object, select").css("visibility","visible")}if(e.isFunction(a.callbackOnClose)){a.callbackOnClose()}h=false};if(e("#fancy_outer").is(":visible")!==false){if(a.zoomSpeedOut>0&&a.itemArray[a.itemCurrent].orig!==undefined){var m=a.itemArray[a.itemCurrent].orig;var l=e.fn.fancybox.getPosition(m);var o={left:(l.left-20-a.padding)+"px",top:(l.top-20-a.padding)+"px",width:e(m).width()+(a.padding*2),height:e(m).height()+(a.padding*2)};if(a.zoomOpacity){o.opacity="hide"}e("#fancy_outer").stop(false,true).animate(o,a.zoomSpeedOut,a.easingOut,__cleanup)}else{e("#fancy_outer").stop(false,true).fadeOut("fast",__cleanup)}}else{__cleanup()}return false};e.fn.fancybox.build=function(){var l="";l+='<div id="fancy_overlay"></div>';l+='<div id="fancy_loading"><div></div></div>';l+='<div id="fancy_outer">';l+='<div id="fancy_inner">';l+='<div id="fancy_close"></div>';l+='<div id="fancy_bg"><div class="fancy_bg" id="fancy_bg_n"></div><div class="fancy_bg" id="fancy_bg_ne"></div><div class="fancy_bg" id="fancy_bg_e"></div><div class="fancy_bg" id="fancy_bg_se"></div><div class="fancy_bg" id="fancy_bg_s"></div><div class="fancy_bg" id="fancy_bg_sw"></div><div class="fancy_bg" id="fancy_bg_w"></div><div class="fancy_bg" id="fancy_bg_nw"></div></div>';l+='<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>';l+='<div id="fancy_content"></div>';l+="</div>";l+="</div>";l+='<div id="fancy_title"></div>';e(l).appendTo("body");e('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo("#fancy_title");if(e.browser.msie){e(".fancy_bg").fixPNG()}if(g){e("div#fancy_overlay").css("position","absolute");e("#fancy_loading div, #fancy_close, .fancy_title, .fancy_ico").fixPNG();e("#fancy_inner").prepend('<iframe id="fancy_bigIframe" src="javascript:false;" scrolling="no" frameborder="0"></iframe>');var m=e("#fancy_bigIframe")[0].contentWindow.document;m.open();m.close()}};e.fn.fancybox.defaults={padding:10,imageScale:true,zoomOpacity:true,zoomSpeedIn:0,zoomSpeedOut:0,zoomSpeedChange:300,easingIn:"swing",easingOut:"swing",easingChange:"swing",frameWidth:560,frameHeight:340,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",enableEscapeButton:true,showCloseButton:true,hideOnOverlayClick:true,hideOnContentClick:true,centerOnScroll:true,itemArray:[],callbackOnStart:null,callbackOnShow:null,callbackOnClose:null};e(document).ready(function(){i=e.browser.msie&&!e.boxModel;if(e("#fancy_outer").length<1){e.fn.fancybox.build()}})})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(b.value)},filled:function(b){return !!a.trim(b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend({},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(f){var e=a.data(this[0].form,"validator");e.settings["on"+f.type]&&e.settings["on"+f.type].call(e,this[0])}a(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",c).delegate("click",":radio, :checkbox",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.formSubmitted=false;this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var h=a(c).rules();var d=false;for(method in h){var g={method:method,parameters:h[method]};try{var b=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method");throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,d){var c=this.defaultMessage(b,d.method);if(typeof c=="function"){c=c.call(this,d.parameters,b)}this.errorList.push({message:c,element:b});this.errorMap[b.name]=c;this.submitted[b.name]=c},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(b){return this.errors().filter("[for='"+this.idOrName(b)+"']")},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit()}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this])}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(method in a.validator.methods){var d=b.attr(method);if(d){e[method]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c||a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(d,c,e){if(!this.depend(e,c)){return"dependency-mismatch"}switch(c.nodeName.toLowerCase()){case"select":var b=a("option:selected",c);return b.length>0&&(c.type=="select-multiple"||(a.browser.msie&&!(b[0].attributes.value.specified)?b[0].text:b[0].value).length>0);case"input":if(this.checkable(c)){return this.getLength(d,c)>0}default:return a.trim(d).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}this.settings.messages[c.name].remote=typeof d.message=="function"?d.message(f):d.message;g=typeof g=="string"&&{url:g}||g;if(d.old!==f){d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){var j=i===true;if(j){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var k={};k[c.name]=d.message=i||b.defaultMessage(c,"remote");b.showErrors(k)}d.valid=j;b.stopRequest(c,j)}},g));return"pending"}else{if(this.pending[c.name]){return"pending"}}return d.valid},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},dateDE:function(c,b){return this.optional(b)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},numberDE:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(n=f.length-1;n>=0;n--){var d=f.charAt(n);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,d){return c==a(d).val()}}});a.format=a.validator.format})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){if(a.browser.msie){return false}this.addEventListener(c,a.event.special[b].handler,true)},teardown:function(){if(a.browser.msie){return false}this.removeEventListener(c,a.event.special[b].handler,true)},handler:function(d){arguments[0]=a.event.fix(d);arguments[0].type=b;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(d,c,b){return this.bind(d,function(e){var f=a(e.target);if(f.is(c)){return b.apply(f,arguments)}})},triggerEvent:function(b,c){return this.triggerHandler(b,[a.event.fix({type:b,target:c})])}})})(jQuery);(function(a){a.jGrowl=function(b,c){if(a("#jGrowl").size()==0){a('<div id="jGrowl"></div>').addClass(a.jGrowl.defaults.position).appendTo("body")}a("#jGrowl").jGrowl(b,c)};a.fn.jGrowl=function(b,d){if(a.isFunction(this.each)){var c=arguments;return this.each(function(){var e=this;if(a(this).data("jGrowl.instance")==undefined){a(this).data("jGrowl.instance",new a.fn.jGrowl());a(this).data("jGrowl.instance").startup(this)}if(a.isFunction(a(this).data("jGrowl.instance")[b])){a(this).data("jGrowl.instance")[b].apply(a(this).data("jGrowl.instance"),a.makeArray(c).slice(1))}else{a(this).data("jGrowl.instance").create(b,d)}})}};a.extend(a.fn.jGrowl.prototype,{defaults:{pool:0,header:"",group:"",sticky:false,position:"top-right",glue:"after",theme:"default",corners:"10px",check:250,life:3000,speed:"normal",easing:"swing",closer:true,closeTemplate:"&times;",closerTemplate:"<div>[ закрыть все ]</div>",log:function(c,b,d){},beforeOpen:function(c,b,d){},open:function(c,b,d){},beforeClose:function(c,b,d){},close:function(c,b,d){},animateOpen:{opacity:"show"},animateClose:{opacity:"hide"}},notifications:[],element:null,interval:null,create:function(b,c){var c=a.extend({},this.defaults,c);this.notifications[this.notifications.length]={message:b,options:c};c.log.apply(this.element,[this.element,b,c])},render:function(b){var d=this;var c=b.message;var e=b.options;var b=a('<div class="jGrowl-notification'+((e.group!=undefined&&e.group!="")?" "+e.group:"")+'"><div class="close">'+e.closeTemplate+'</div><div class="header">'+e.header+'</div><div class="message">'+c+"</div></div>").data("jGrowl",e).addClass(e.theme).children("div.close").bind("click.jGrowl",function(){a(this).parent().trigger("jGrowl.close")}).parent();(e.glue=="after")?a("div.jGrowl-notification:last",this.element).after(b):a("div.jGrowl-notification:first",this.element).before(b);a(b).bind("mouseover.jGrowl",function(){a(this).data("jGrowl").pause=true}).bind("mouseout.jGrowl",function(){a(this).data("jGrowl").pause=false}).bind("jGrowl.beforeOpen",function(){e.beforeOpen.apply(d.element,[d.element,c,e])}).bind("jGrowl.open",function(){e.open.apply(d.element,[d.element,c,e])}).bind("jGrowl.beforeClose",function(){e.beforeClose.apply(d.element,[d.element,c,e])}).bind("jGrowl.close",function(){a(this).trigger("jGrowl.beforeClose").animate(e.animateClose,e.speed,e.easing,function(){a(this).remove();e.close.apply(d.element,[d.element,c,e])})}).trigger("jGrowl.beforeOpen").animate(e.animateOpen,e.speed,e.easing,function(){a(this).data("jGrowl").created=new Date()}).trigger("jGrowl.open");if(a.fn.corner!=undefined){a(b).corner(e.corners)}if(a("div.jGrowl-notification:parent",this.element).size()>1&&a("div.jGrowl-closer",this.element).size()==0&&this.defaults.closer!=false){a(this.defaults.closerTemplate).addClass("jGrowl-closer").addClass(this.defaults.theme).appendTo(this.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){a(this).siblings().children("div.close").trigger("click.jGrowl");if(a.isFunction(d.defaults.closer)){d.defaults.closer.apply(a(this).parent()[0],[a(this).parent()[0]])}})}},update:function(){a(this.element).find("div.jGrowl-notification:parent").each(function(){if(a(this).data("jGrowl")!=undefined&&a(this).data("jGrowl").created!=undefined&&(a(this).data("jGrowl").created.getTime()+a(this).data("jGrowl").life)<(new Date()).getTime()&&a(this).data("jGrowl").sticky!=true&&(a(this).data("jGrowl").pause==undefined||a(this).data("jGrowl").pause!=true)){a(this).trigger("jGrowl.close")}});if(this.notifications.length>0&&(this.defaults.pool==0||a(this.element).find("div.jGrowl-notification:parent").size()<this.defaults.pool)){this.render(this.notifications.shift())}if(a(this.element).find("div.jGrowl-notification:parent").size()<2){a(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){a(this).remove()})}},startup:function(b){this.element=a(b).addClass("jGrowl").append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){jQuery(b).data("jGrowl.instance").update()},this.defaults.check);if(a.browser.msie&&parseInt(a.browser.version)<7&&!window.XMLHttpRequest){a(this.element).addClass("ie6")}},shutdown:function(){a(this.element).removeClass("jGrowl").find("div.jGrowl-notification").remove();clearInterval(this.interval)}});a.jGrowl.defaults=a.fn.jGrowl.prototype.defaults})(jQuery);(function(f){var e=["DOMMouseScroll","mousewheel"];f.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var a=e.length;a;){this.addEventListener(e[--a],d,false)}}else{this.onmousewheel=d}},teardown:function(){if(this.removeEventListener){for(var a=e.length;a;){this.removeEventListener(e[--a],d,false)}}else{this.onmousewheel=null}}};f.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}});function d(b){var h=[].slice.call(arguments,1),a=0,c=true;b=f.event.fix(b||window.event);b.type="mousewheel";if(b.wheelDelta){a=b.wheelDelta/120}if(b.detail){a=-b.detail/3}h.unshift(b,a);return f.event.handle.apply(this,h)}})(jQuery);(function(d){d.fn.jCarouselLite=function(e){e=d.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},e||{});return this.each(function(){var o=false,l=e.vertical?"top":"left",g=e.vertical?"height":"width";var f=d(this),q=d("ul",f),i=d("li",q),u=i.size(),t=e.visible;if(e.circular){q.prepend(i.slice(u-t-1+1).clone()).append(i.slice(0,t).clone());e.start+=t}var s=d("li",q),p=s.size(),w=e.start;f.css("visibility","visible");s.css({overflow:"hidden","float":e.vertical?"none":"left"});q.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});f.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var k=e.vertical?a(s):c(s);var r=k*p;var m=k*t;s.css({width:s.width(),height:s.height()});q.css(g,r+"px").css(l,-(w*k));f.css(g,m+"px");if(e.btnPrev){d(e.btnPrev).click(function(){return j(w-e.scroll)})}if(e.btnNext){d(e.btnNext).click(function(){return j(w+e.scroll)})}if(e.btnGo){d.each(e.btnGo,function(x,y){d(y).click(function(){return j(e.circular?e.visible+x:x)})})}if(e.mouseWheel&&f.mousewheel){f.mousewheel(function(x,y){return y>0?j(w-e.scroll):j(w+e.scroll)})}if(e.auto){setInterval(function(){j(w+e.scroll)},e.auto+e.speed)}function h(){return s.slice(w).slice(0,t)}function j(x){if(!o){if(e.beforeStart){e.beforeStart.call(this,h())}if(e.circular){if(x<=e.start-t-1){q.css(l,-((p-(t*2))*k)+"px");w=x==e.start-t-1?p-(t*2)-1:p-(t*2)-e.scroll}else{if(x>=p-t+1){q.css(l,-((t)*k)+"px");w=x==p-t+1?t+1:t+e.scroll}else{w=x}}}else{if(x<0||x>p-t){return}else{w=x}}o=true;q.animate(l=="left"?{left:-(w*k)}:{top:-(w*k)},e.speed,e.easing,function(){if(e.afterEnd){e.afterEnd.call(this,h())}o=false});if(!e.circular){d(e.btnPrev+","+e.btnNext).removeClass("disabled");d((w-e.scroll<0&&e.btnPrev)||(w+e.scroll>p-t&&e.btnNext)||[]).addClass("disabled")}}return false}})};function b(e,f){return parseInt(d.css(e[0],f))||0}function c(e){return e[0].offsetWidth+b(e,"marginLeft")+b(e,"marginRight")}function a(e){return e[0].offsetHeight+b(e,"marginTop")+b(e,"marginBottom")}})(jQuery);var map=false;var currentMarker=false;var geocoder=null;function gen_uuid(){var b="";for(var a=0;a<32;a++){b+=Math.floor(Math.random()*16).toString(16)}return b}function initForFormPage(){$.ajaxSettings.cache=false;initImageUploading();initVideoUploading();initTabs()}function initImageUploading(){$("#add_photo_btn").click(function(){var dst=$("#photos");var img_form=$("#uploadImageForm");img_form.css("top",dst.position().top-10+"px");img_form.css("left",dst.position().left+"px");$("#pic_file").val("");img_form.toggle()});$("#id_file").change(function(){$(this).submit()});$("#pic_file").change(function(){$(this).submit()});$("#uploadImageFormCancel").click(function(){img_form=$("#uploadImageForm");img_form.toggle()});var options={target:"#loading",url:"/notices/ajax_upload/",dataType:"json",success:function(data){$("#uploadImageForm").resetForm();$("#uploadImageFormCancel").click();drawPhoto(data)}};function drawPhoto(data){if(!data){return}if(data!="False"){var free_cells=data.free_cells;if(free_cells==0){$("#add_photo_btn").attr("disabled","disabled")}else{$("#add_photo_btn").removeAttr("disabled")}var images=data.files;var code="";for(var n=0;n<6;n++){if(images[n]){code+="<div class='photo_cell'>";code+="<img class='image_upload_preview' id='preview_img_"+n+"' src='/static/images/tmp/"+images[n]+"'/>";code+="<div style='position: absolute; right: 0px; top:0px; margin: 5px;'>";code+="<a class='delete_image_icon' id='del_img_"+n+"' href='#'>";code+="<img class='image_upload_delete' src='/static/images/delete.png' alt='delete image' title='Удалить фото'/>";code+="</a>";code+="</div>";code+="</div>"}else{code+="<div class='photo_cell'>";code+="<img class='image_upload_preview' src='/static/images/no_photo.gif'>";code+="</div>"}}$("#uploadOutput").html(code);$(".delete_image_icon").each(function(){$(this).click(function(data){var idx=this.id.split("_").slice(-1);$("#preview_img_"+idx).fadeOut("fast");$.ajax({target:"#loading",url:"/notices/delete_image/"+idx+"/",success:function(data){var data=eval("("+data+")");drawPhoto(data)}});return false})})}}$("#uploadImageForm").ajaxForm(options);$("#loading").ajaxStart(function(){$(this).show()}).ajaxComplete(function(){$(this).hide()});var jsonText=$("#images").val();var data=eval("("+jsonText+")");drawPhoto(data)}function initVideoUploading(){function a(b){var c="<a href="+b+" style='display:block;width:500px;height:340px' id='player'></a>";$("#video_content").html(c);flowplayer("player","/static/swf/flowplayer-3.1.5.swf",{clip:{autoPlay:false,autoBuffering:true},play:{replayLabel:"Повторить"},plugins:{controls:{url:"/static/swf/flowplayer.controls-3.1.5.swf",tooltips:{buttons:true,play:"Воспроизведение",pause:"Пауза",mute:"Без звука",unmute:"Включить звук",fullscreen:"Полноэкранный режим",fullscreenExit:"Выход из полноэкранного режима",repeat:"Повторить?"}}}})}$("#uploader").submit(function(){$(this).hide();var i="3000ms";var e=gen_uuid();var b="/video/uploader_progress/";var h="/video/uploader/";var c={target:"#loading",url:h+"?X-Progress-ID="+e,dataType:"json",iframe:true,success:function(j){f();$("#processInfo").stopTime("convertProcessTimer");$("#uploader").show();$("#id_file").val("");if(j.success){$("#video_hint").hide();a("/static/"+j.text)}else{$("#video_hint").show();alert("Ошибка "+j.text)}}};function g(){$.getJSON(b,{"X-Progress-ID":e},function(l,j){if(l&&l.uploaded&&l.length){var k=Math.floor(100*parseInt(l.uploaded)/parseInt(l.length));$("#uploadProgressBar").progressbar("option","value",k);$("#uploadProgressInfo").html("Загружено "+k+"%")}if(l&&l.complete){$("#uploadProgressInfo").html("<p>Загрузка завершена</p>")}if(l&&l.conv_progress){$("#convertProgressBar").progressbar("option","value",l.conv_progress);$("#convertProgressInfo").html("Конвертирование "+l.conv_progress+"%")}if(l&&l.conv_complete){$("#convertProgressBar").progressbar("option","value",100);$("#convertProgressInfo").html("Конвертация завершена")}})}function d(){$("#uploadProgressBar").progressbar({value:0});$("#uploadProgressBar").progressbar("option","value",0);$("#uploadProgressInfo").text("Загрузка 0%");$("#convertProgressBar").progressbar({value:0});$("#convertProgressInfo").text("Конвертирование 0%");$("#convertProgressBar").progressbar("option","value",0);$("#processInfo").fadeIn()}function f(){$("#processInfo").fadeOut("slow")}$("#video_hint").hide();d();$("#processInfo").everyTime(i,"convertProcessTimer",g);$(this).ajaxSubmit(c);return false})}function initGoogleMap(){var b=$("#site_id").text();if(map){map.checkResize();return}var e=$("#id_lat").val();var c=$("#id_lng").val();if(e!=0&&c!=0){var d=[e,c]}else{if(b==1){var d=[51.65969957223876,39.19740486162483]}else{var d=[50.59640893909709,36.60502195401932]}}if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl());map.addControl(new GOverviewMapControl());map.addControl(new GScaleControl());map.setCenter(new GLatLng(d[0],d[1]),14);map.setMapType(G_HYBRID_MAP);map.enableDoubleClickZoom();map.enableScrollWheelZoom();map.setZoom(13);new GKeyboardHandler(map);GEvent.addListener(map,"click",g);GEvent.addListener(map,"click",a);geocoder=new GClientGeocoder()}function g(i,h){if(!currentMarker){currentMarker=new GMarker(h,{draggable:true});GEvent.addListener(currentMarker,"drag",function(){a(false,currentMarker.getLatLng())});map.addOverlay(currentMarker)}else{currentMarker.setPoint(h)}}function a(i,h){currentMarker.setLatLng(h);var k=currentMarker.getLatLng().lat();var j=currentMarker.getLatLng().lng();$("div#info").show("slow");$("#lat_label").html(k+" °");$("#lng_label").html(j+" °");$("#id_lat").attr("value",k);$("#id_lng").attr("value",j)}jQuery("#search_pos_btn").click(function(){var h=$("#search_position_text").val();if(geocoder){geocoder.getLatLng(h,function(i){if(!i){alert(h+" не найдено")}else{map.setCenter(i,14)}})}return false});jQuery("#search_position_text").bind("keypress",function(i){var h=(i.keyCode?i.keyCode:i.which);if(h==13){jQuery("#search_pos_btn").click();return false}});if(e!=0&&c!=0){var f=new GLatLng(e,c);currentMarker=new GMarker(f,{draggable:true});map.addOverlay(currentMarker);GEvent.addListener(currentMarker,"drag",function(){a(false,currentMarker.getLatLng())})}}function initTabs(){$("#tabs").tabs({selected:0,select:function(f,g){$("#uploadImageForm").hide();$("#uploader").hide();$("#processInfo").hide()}});$("#tabs").bind("tabsshow",function(g,h){if(h.index==2){initGoogleMap()}else{if(h.index==4){var i=$("#video_content");var f=$("#uploader");f.css("top",i.position().top+"px");f.css("left",i.position().left+"px");$("#pic_file").val("");f.toggle()}}});function b(){var g=$("#id_realty_type").val();var f=$("#id_type").val();$("#common_info").load("/notices/ajax_change_form/"+g+"/"+f+"/1");$("#additional_info").load("/notices/ajax_change_form/"+g+"/"+f+"/0")}function e(){var g=$("#id_realty_type").val();var f=$("#id_type").val();if(f==0||f==2||f==4){$("#tabs").data("disabled.tabs",[])}else{$("#tabs").data("disabled.tabs",[2,3,4])}}function d(){var f=$("#id_type").val();if(f==0||f==2||f==4){$("#advice").fadeIn()}else{$("#advice").fadeOut()}}$("#id_realty_type").change(function(){b();e()});$("#id_type").change(function(){b();e();d()});e();var a=$("#site_id").text();$("#id_location").change(function(){var h=$(this).val();var g=$("#id_location :selected").text();var f="";if(h<10){if(a==1){f+="Воронеж, "+g}else{f+="Белгород, "+g}}else{if(a==1){f+="Воронежская область, "+g}else{f+="Белгородская область, "+g}}jQuery("#search_position_text").val(f);jQuery("#search_pos_btn").click()});var c={target:"#output",timeout:3000};jQuery.validator.addMethod("chislo",function(g,f){return this.optional(f)||/^[0-9]*\.?[0-9]{1,2}$/.test(g)},"Please specify the correct domain for your documents");$("#notice_form").validate({submitHandler:function(f){$("#submit_button").attr("disabled",true);f.submit()},invalidHandler:function(h,g){var i=g.numberOfInvalids();if(i){var f=$("#tabs").tabs();f.tabs("select",1)}},focusInvalid:true,focusCleanup:false,rules:{title:{required:true,minlength:5,maxlength:200},lifetime:{required:true},rooms:{required:true},living_space:{chislo:true},total_space:{chislo:true},kitchen_space:{chislo:true},price:{chislo:true},ground:{chislo:true}},messages:{title:"Введите заголовок для вашего объявления",rooms:"Выберите кол-во комнат в помещении",lifetime:"Актуальность объявления",living_space:"Ведите число (целое или через точку)",total_space:"Ведите число (целое или через точку)",kitchen_space:"Ведите число (целое или через точку)",ground:"Ведите число (целое или через точку)",price:"Введите стоимость (если число не целое - разделитель точка)"}})}function setMaxZoomCenter(a,b){a.getCurrentMapType().getMaxZoomAtLatLng(b,function(c){if(c&&c.status==G_GEO_SUCCESS){a.setCenter(b,c.zoom)}else{a.setCenter(b,13)}})}function drawLargeMap(){var e=$("#title").text();var d=$("#lat").text();var b=$("#lng").text();if(!d||!b){return}if(GBrowserIsCompatible()){var c=new GMap2(document.getElementById("large_map"));c.setUIToDefault();c.removeMapType(G_NORMAL_MAP);c.removeMapType(G_PHYSICAL_MAP);c.addControl(new GLargeMapControl());c.addControl(new GMapTypeControl());c.addControl(new GOverviewMapControl());c.addControl(new GScaleControl());c.setCenter(new GLatLng(d,b));c.enableDoubleClickZoom();c.enableScrollWheelZoom();var a=new GLatLng(d,b);setMaxZoomCenter(c,a);c.setMapType(G_HYBRID_MAP);new GKeyboardHandler(c);var f=new GLatLng(d,b);marker=new GMarker(f,{title:e});c.addOverlay(marker)}}function flash(c,a,b,d){document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+a+'" height="'+b+'"><param name="scale" value="noscale"><param name="movie" value="'+c+'"><param name="quality" value="high"><param name="bgcolor" value="'+d+'"><param name="wmode" value="opaque"><embed src="'+c+'" quality="high" bgcolor="'+d+'" swLiveConnect="false" width="'+a+'" height="'+b+'" scale="noscale" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="opaque"></embed></object>')}function initForEveryPage(){$(".notice_line").hover(function(){$(this).css({backgroundColor:"#F7F7F7"})},function(){$(this).css({backgroundColor:"#FFF"})});$(".banner").click(function(b){var a=$(this).attr("id").split("_").slice(-1);$.post("/banners/click_handler/",{banner_id:a},function(){return true})});$.ajaxSettings.cache=false;$(".mouse_hover_table tr ").hover(function(){$(this).css({backgroundColor:"#EEE"})},function(){$(this).css({backgroundColor:"white"})});$("a.mapcontent, a.videocontent").each(function(){$(this).fancybox({frameWidth:642,frameHeight:490})});$(".add_to_compare_link").each(function(){$(this).bind("click",function(){var a=this.id.split("_").slice(-1);$.getJSON("/notices/add_compare/"+a+"/",function(b){if(b.res=="ok"){$.jGrowl("Объявление #"+a+" добавлено в список сравнения");$("#compare_count").text(b.count);$("#compare_list_info").show()}else{if(b.res=="already_exist"){$.jGrowl("Объявление #"+a+" уже добавлено в список сравнения. Для перехода к выбранным объявлениям кликните по ссылке в верхней части экрана")}else{if(b.res=="type_not_correct"){$.jGrowl("Тип объявления #"+a+" отличается от типов объявлений уже находящихся в списке сравнения (т.е. попытка сравнить дом и гараж и т.п.)")}else{if(b.res=="max_count"){$.jGrowl("Не помещается в список для сравнения (максимум 4 объекта). Удалите неинтересные объекты из сравнения.")}}}}});return false})});$(".remove_from_compare_link").each(function(){$(this).bind("click",function(){var b=this.id.split("_").slice(-1);var a=this.id;$.getJSON("/notices/del_compare/"+b+"/",function(c){$.jGrowl("Объявление #"+b+" из списка сравнения удалено");$("#compare_count").text(c.count);if(c.count==0){$("#compare_list_info").hide()}col=$("#"+a).parents()[0].cellIndex+1;$("#"+a).parent().parent().parent().parent().removeCol(col,function(){if($(".remove_from_compare_link:visible").size()==0){$("#compare_table").remove();$("#empty_message").show()}})});return false})});$("#clear_compare_list").bind("click",function(){var a=confirm("Удалить все объявления из списка сравнения?");if(a){$.getJSON("/notices/erase_compare/",function(b){$.jGrowl("Список сравнения пуст");$("#compare_list_info").hide();$("#compare_table").remove();$("#empty_message").show()})}return false});$(".add_to_bookmarks_link").each(function(){$(this).bind("click",function(){var a=this.id.split("_").slice(-1);$.getJSON("/notices/add_bookmark/"+a+"/",function(b){if(b.res=="ok"){$.jGrowl("Объявление #"+a+" добавлено в блокнот")}else{$.jGrowl("Объявление #"+a+" уже добавлено в блокнот. Для перехода к выбранным объявлениям кликните на кнопке 'Блокнот' в верхней части экрана")}});return false})});$(".remove_from_bookmarks_link").each(function(){$(this).bind("click",function(){var b=this.id.split("_").slice(-1);var a=this.id;$.getJSON("/notices/del_bookmark/"+b+"/",function(c){$.jGrowl("Объявление #"+b+" из блокнота удалено");$("#"+a).parent().parent().fadeOut("slow",function(){this.remove;if($(".remove_from_bookmarks_link:visible").size()==0){$("#empty_message").show()}})});return false})});jQuery.extend(jQuery.validator.messages,{required:"Это поле необходимо заполнить",remote:"Исправьте это поле чтобы продолжить",email:"Введите правильный email адрес.",url:"Введите верный URL.",date:"Введите правильную дату.",dateISO:"Введите правильную дату (ISO).",number:"Введите число.",digits:"Введите только цифры.",creditcard:"Введите правильный номер вашей кредитной карты.",equalTo:"Повторите ввод значения еще раз.",accept:"Пожалуйста, введите значение с правильным расширением.",maxlength:jQuery.format("Нельзя вводить более {0} символов."),minlength:jQuery.format("Должно быть не менее {0} символов."),rangelength:jQuery.format("Введите от {0} до {1} символов."),range:jQuery.format("Введите число от {0} до {1}."),max:jQuery.format("Введите число меньше или равное {0}."),min:jQuery.format("Введите число больше или равное {0}.")})}$.fn.removeCol=function(a,b){if(!a){a=1}$("tr td:nth-child("+a+"), tr th:nth-child("+a+")",this).fadeOut("slow",function(){this.remove;b()})};function initForViewPage(){var a={success:showResponse,timeout:3000,dataType:"json"};$("#feedback_form").validate({submitHandler:function(b){$("#feedback_form").ajaxSubmit(a)},invalidHandler:function(c,b){var d=b.numberOfInvalids()},focusInvalid:true,focusCleanup:false,rules:{sender_name:{required:true,minlength:3,maxlength:100},sender_email:{required:true,email:true},message:{required:true,minlength:3,maxlength:1500}},message:{sender_email:"Введите свой email для обратной связи",sender_name:"Введите ваше имя",message:"Введите текст сообщения"}});makeCarousel();drawSmallMap()}function makeCarousel(){img_count=parseInt($("#images_count").text());if(img_count>3){img_count=3}$(".jCarouselLite").jCarouselLite({btnNext:"#next",btnPrev:"#prev",circular:true,visible:img_count,mouseWheel:true});$(".jCarouselLite img").click(function(){v=$(this);$("img.photo").fadeOut("slow",function(){$("#main_img_link").attr("href",v.attr("rel"));$("img.photo").attr("src",v.attr("src"))}).fadeIn("slow");return false});$("#main_img_link").click(function(){a();return false});function a(c){var c=$("#main_img_link");var b=[];$(".jCarouselLite a").each(function(d){var d=$(this);if($.inArray(d.attr("href"),b)==-1){b.push(d.attr("href"));if(d.attr("href")!=c.attr("href")){d.attr("rel","prettyPhotoImage[gallery]")}else{d.attr("rel","")}}else{d.attr("rel","")}})}a();$("a[rel^='prettyPhotoImage']").fancybox({hideOnContentClick:false})}function drawSmallMap(){var c=$("#lat").text();var a=$("#lng").text();var d=$("#title").text();if(!c||!a){return}if(GBrowserIsCompatible()){var b=new GMap2(document.getElementById("small_map"));b.addControl(new GSmallMapControl());b.setCenter(new GLatLng(c,a),15);var e=new GLatLng(c,a);marker=new GMarker(e,{title:d});b.addOverlay(marker)}}function showResponse(a,b){if(a.success){$.jGrowl("Ваше сообщение успешно отправлено");$("#feedback_form").clearForm()}else{$.jGrowl("Извините. При отправке сообщения возникли технические неполадки. Попробуйте отправить снова через какое то время.")}};