/*
 
 jQuery Tools 1.2.0 / Flashembed - New wave Flash embedding

 NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.

 http://flowplayer.org/tools/toolbox/flashembed.html

 Since : March 2008
 Date  :    Tue Apr 20 19:26:58 2010 +0000 
 
 jQuery Tools 1.2.0 / Mask - Dim the lights

 NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.

 http://flowplayer.org/tools/toolbox/mask.html

 Since: Mar 2010
 Date:    Tue Apr 20 19:26:58 2010 +0000 
 
 jQuery Tools 1.2.0 Overlay - Overlay base. Extend it.

 NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.

 http://flowplayer.org/tools/overlay/

 Since: March 2008
 Date:    Tue Apr 20 19:26:58 2010 +0000 
*/
var preventError=function(){if(typeof loadFirebugConsole=="function")loadFirebugConsole();else console={log:function(){},debug:function(){},info:function(){},warn:function(){},assert:function(){}}};try{console.assert(1)}catch(e){preventError()}
jQuery.ui||function(a){a.ui={version:"1.8.1",plugin:{add:function(c,b,d){c=a.ui[c].prototype;for(var f in d){c.plugins[f]=c.plugins[f]||[];c.plugins[f].push([b,d[f]])}},call:function(c,b,d){if((b=c.plugins[b])&&c.element[0].parentNode)for(var f=0;f<b.length;f++)c.options[b[f][0]]&&b[f][1].apply(c.element,d)}},contains:function(c,b){return document.compareDocumentPosition?c.compareDocumentPosition(b)&16:c!==b&&c.contains(b)},hasScroll:function(c,b){if(a(c).css("overflow")=="hidden")return false;b=
b&&b=="left"?"scrollLeft":"scrollTop";var d=false;if(c[b]>0)return true;c[b]=1;d=c[b]>0;c[b]=0;return d},isOverAxis:function(c,b,d){return c>b&&c<b+d},isOver:function(c,b,d,f,g,i){return a.ui.isOverAxis(c,d,g)&&a.ui.isOverAxis(b,f,i)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,
RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};a.fn.extend({_focus:a.fn.focus,focus:function(c,b){return typeof c==="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();b&&b.call(d)},c)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var c;c=a.browser.msie&&/(static|relative)/.test(this.css("position"))||
/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):c},zIndex:function(c){if(c!==
undefined)return this.css("zIndex",c);if(this.length){c=a(this[0]);for(var b;c.length&&c[0]!==document;){b=c.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){b=parseInt(c.css("zIndex"));if(!isNaN(b)&&b!=0)return b}c=c.parent()}}return 0}});a.extend(a.expr[":"],{data:function(c,b,d){return!!a.data(c,d[3])},focusable:function(c){var b=c.nodeName.toLowerCase(),d=a.attr(c,"tabindex");return(/input|select|textarea|button|object/.test(b)?!c.disabled:"a"==b||"area"==b?c.href||!isNaN(d):!isNaN(d))&&
!a(c)["area"==b?"parents":"closest"](":hidden").length},tabbable:function(c){var b=a.attr(c,"tabindex");return(isNaN(b)||b>=0)&&a(c).is(":focusable")}})}(jQuery);
(function(a){var c=a.fn.remove;a.fn.remove=function(b,d){return this.each(function(){if(!d)if(!b||a.filter(b,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")});return c.call(a(this),b,d)})};a.widget=function(b,d,f){var g=b.split(".")[0],i;b=b.split(".")[1];i=g+"-"+b;if(!f){f=d;d=a.Widget}a.expr[":"][i]=function(n){return!!a.data(n,b)};a[g]=a[g]||{};a[g][b]=function(n,r){arguments.length&&this._createWidget(n,r)};d=new d;d.options=a.extend({},d.options);a[g][b].prototype=
a.extend(true,d,{namespace:g,widgetName:b,widgetEventPrefix:a[g][b].prototype.widgetEventPrefix||b,widgetBaseClass:i},f);a.widget.bridge(b,a[g][b])};a.widget.bridge=function(b,d){a.fn[b]=function(f){var g=typeof f==="string",i=Array.prototype.slice.call(arguments,1),n=this;f=!g&&i.length?a.extend.apply(null,[true,f].concat(i)):f;if(g&&f.substring(0,1)==="_")return n;g?this.each(function(){var r=a.data(this,b),h=r&&a.isFunction(r[f])?r[f].apply(r,i):r;if(h!==r&&h!==undefined){n=h;return false}}):this.each(function(){var r=
a.data(this,b);if(r){f&&r.option(f);r._init()}else a.data(this,b,new d(f,this))});return n}};a.Widget=function(b,d){arguments.length&&this._createWidget(b,d)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,d){this.element=a(d).data(this.widgetName,this);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(d)[this.widgetName],b);var f=this;this.element.bind("remove."+this.widgetName,function(){f.destroy()});this._create();
this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,d){var f=b,g=this;if(arguments.length===0)return a.extend({},g.options);if(typeof b==="string"){if(d===undefined)return this.options[b];f={};f[b]=d}a.each(f,function(i,
n){g._setOption(i,n)});return g},_setOption:function(b,d){this.options[b]=d;if(b==="disabled")this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",d);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,d,f){var g=this.options[b];d=a.Event(d);d.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();f=f||{};if(d.originalEvent){b=
a.event.props.length;for(var i;b;){i=a.event.props[--b];d[i]=d.originalEvent[i]}}this.element.trigger(d,f);return!(a.isFunction(g)&&g.call(this.element[0],d,f)===false||d.isDefaultPrevented())}}})(jQuery);
(function(a){var c=0,b=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'},_create:function(){this._tabify(true)},_setOption:function(d,f){if(d=="selected")this.options.collapsible&&f==this.options.selected||
this.select(f);else{this.options[d]=f;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+ ++c},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++b);return a.cookie.apply(null,[d].concat(a.makeArray(arguments)))},_ui:function(d,f){return{tab:d,panel:f,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=
a(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(d){function f(k,j){k.css({display:""});!a.support.opacity&&j.opacity&&k[0].style.removeAttribute("filter")}this.list=this.element.find("ol,ul").eq(0);this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var g=this,i=this.options,n=/^#.+/;this.anchors.each(function(k,j){var s=a(j).attr("href"),m=s.split("#")[0],B;if(m&&(m===location.toString().split("#")[0]||
(B=a("base")[0])&&m===B.href)){s=j.hash;j.href=s}if(n.test(s))g.panels=g.panels.add(g._sanitizeSelector(s));else if(s!="#"){a.data(j,"href.tabs",s);a.data(j,"load.tabs",s.replace(/#.*$/,""));s=g._tabId(j);j.href="#"+s;j=a("#"+s);if(!j.length){j=a(i.panelTemplate).attr("id",s).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(g.panels[k-1]||g.list);j.data("destroy.tabs",true)}g.panels=g.panels.add(j)}else i.disabled.push(k)});if(d){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(i.selected===undefined){location.hash&&this.anchors.each(function(k,j){if(j.hash==location.hash){i.selected=k;return false}});if(typeof i.selected!="number"&&i.cookie)i.selected=parseInt(g._cookie(),10);if(typeof i.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)i.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));i.selected=i.selected||(this.lis.length?0:-1)}else if(i.selected===null)i.selected=-1;i.selected=i.selected>=0&&this.anchors[i.selected]||i.selected<0?i.selected:0;i.disabled=a.unique(i.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(k){return g.lis.index(k)}))).sort();a.inArray(i.selected,i.disabled)!=-1&&i.disabled.splice(a.inArray(i.selected,i.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
if(i.selected>=0&&this.anchors.length){this.panels.eq(i.selected).removeClass("ui-tabs-hide");this.lis.eq(i.selected).addClass("ui-tabs-selected ui-state-active");g.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[i.selected],g.panels[i.selected]))});this.load(i.selected)}a(window).bind("unload",function(){g.lis.add(g.anchors).unbind(".tabs");g.lis=g.anchors=g.panels=null})}else i.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[i.collapsible?"addClass":
"removeClass"]("ui-tabs-collapsible");i.cookie&&this._cookie(i.selected,i.cookie);d=0;for(var r;r=this.lis[d];d++)a(r)[a.inArray(d,i.disabled)!=-1&&!a(r).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");i.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(i.event!="mouseover"){var h=function(k,j){j.is(":not(.ui-state-disabled)")&&j.addClass("ui-state-"+k)},o=function(k,j){j.removeClass("ui-state-"+k)};this.lis.bind("mouseover.tabs",
function(){h("hover",a(this))});this.lis.bind("mouseout.tabs",function(){o("hover",a(this))});this.anchors.bind("focus.tabs",function(){h("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){o("focus",a(this).closest("li"))})}var v,w;if(i.fx)if(a.isArray(i.fx)){v=i.fx[0];w=i.fx[1]}else v=w=i.fx;var D=w?function(k,j){a(k).closest("li").addClass("ui-tabs-selected ui-state-active");j.hide().removeClass("ui-tabs-hide").animate(w,w.duration||"normal",function(){f(j,w);g._trigger("show",
null,g._ui(k,j[0]))})}:function(k,j){a(k).closest("li").addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");g._trigger("show",null,g._ui(k,j[0]))},l=v?function(k,j){j.animate(v,v.duration||"normal",function(){g.lis.removeClass("ui-tabs-selected ui-state-active");j.addClass("ui-tabs-hide");f(j,v);g.element.dequeue("tabs")})}:function(k,j){g.lis.removeClass("ui-tabs-selected ui-state-active");j.addClass("ui-tabs-hide");g.element.dequeue("tabs")};this.anchors.bind(i.event+".tabs",
function(){var k=this,j=a(this).closest("li"),s=g.panels.filter(":not(.ui-tabs-hide)"),m=a(g._sanitizeSelector(this.hash));if(j.hasClass("ui-tabs-selected")&&!i.collapsible||j.hasClass("ui-state-disabled")||j.hasClass("ui-state-processing")||g._trigger("select",null,g._ui(this,m[0]))===false){this.blur();return false}i.selected=g.anchors.index(this);g.abort();if(i.collapsible)if(j.hasClass("ui-tabs-selected")){i.selected=-1;i.cookie&&g._cookie(i.selected,i.cookie);g.element.queue("tabs",function(){l(k,
s)}).dequeue("tabs");this.blur();return false}else if(!s.length){i.cookie&&g._cookie(i.selected,i.cookie);g.element.queue("tabs",function(){D(k,m)});g.load(g.anchors.index(this));this.blur();return false}i.cookie&&g._cookie(i.selected,i.cookie);if(m.length){s.length&&g.element.queue("tabs",function(){l(k,s)});g.element.queue("tabs",function(){D(k,m)});g.load(g.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()});this.anchors.bind("click.tabs",
function(){return false})},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var f=a.data(this,"href.tabs");if(f)this.href=f;var g=a(this).unbind(".tabs");a.each(["href","load","cache"],function(i,n){g.removeData(n+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,
"destroy.tabs")?a(this).remove():a(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(d,f,g){if(g===undefined)g=this.anchors.length;var i=this,n=this.options;f=a(n.tabTemplate.replace(/#\{href\}/g,d).replace(/#\{label\}/g,f));d=!d.indexOf("#")?d.replace("#",""):this._tabId(a("a",f)[0]);f.addClass("ui-state-default ui-corner-top").data("destroy.tabs",
true);var r=a("#"+d);r.length||(r=a(n.panelTemplate).attr("id",d).data("destroy.tabs",true));r.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(g>=this.lis.length){f.appendTo(this.list);r.appendTo(this.list[0].parentNode)}else{f.insertBefore(this.lis[g]);r.insertBefore(this.panels[g])}n.disabled=a.map(n.disabled,function(h){return h>=g?++h:h});this._tabify();if(this.anchors.length==1){n.selected=0;f.addClass("ui-tabs-selected ui-state-active");r.removeClass("ui-tabs-hide");
this.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[0],i.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[g],this.panels[g]));return this},remove:function(d){var f=this.options,g=this.lis.eq(d).remove(),i=this.panels.eq(d).remove();if(g.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(d+(d+1<this.anchors.length?1:-1));f.disabled=a.map(a.grep(f.disabled,function(n){return n!=d}),function(n){return n>=d?--n:n});this._tabify();this._trigger("remove",
null,this._ui(g.find("a")[0],i[0]));return this},enable:function(d){var f=this.options;if(a.inArray(d,f.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");f.disabled=a.grep(f.disabled,function(g){return g!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){var f=this.options;if(d!=f.selected){this.lis.eq(d).addClass("ui-state-disabled");f.disabled.push(d);f.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},
select:function(d){if(typeof d=="string")d=this.anchors.index(this.anchors.filter("[href$="+d+"]"));else if(d===null)d=-1;if(d==-1&&this.options.collapsible)d=this.options.selected;this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(d){var f=this,g=this.options,i=this.anchors.eq(d)[0],n=a.data(i,"load.tabs");this.abort();if(!n||this.element.queue("tabs").length!==0&&a.data(i,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(d).addClass("ui-state-processing");
if(g.spinner){var r=a("span",i);r.data("label.tabs",r.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:n,success:function(h,o){a(f._sanitizeSelector(i.hash)).html(h);f._cleanup();g.cache&&a.data(i,"cache.tabs",true);f._trigger("load",null,f._ui(f.anchors[d],f.panels[d]));try{g.ajaxOptions.success(h,o)}catch(v){}},error:function(h,o){f._cleanup();f._trigger("load",null,f._ui(f.anchors[d],f.panels[d]));try{g.ajaxOptions.error(h,o,d,i)}catch(v){}}}));f.element.dequeue("tabs");return this}},
abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(d,f){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",f);return this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.1"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var g=this,i=this.options,n=g._rotate||(g._rotate=
function(r){clearTimeout(g.rotation);g.rotation=setTimeout(function(){var h=i.selected;g.select(++h<g.anchors.length?h:0)},d);r&&r.stopPropagation()});f=g._unrotate||(g._unrotate=!f?function(r){r.clientX&&g.rotate(null)}:function(){t=i.selected;n()});if(d){this.element.bind("tabsshow",n);this.anchors.bind(i.event+".tabs",f);n()}else{clearTimeout(g.rotation);this.element.unbind("tabsshow",n);this.anchors.unbind(i.event+".tabs",f);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
(function(){function a(l){console.log("$f.fireEvent",[].slice.call(l))}function c(l){if(!l||typeof l!="object")return l;var k=new l.constructor;for(var j in l)if(l.hasOwnProperty(j))k[j]=c(l[j]);return k}function b(l,k){if(l){var j,s=0,m=l.length;if(m===undefined)for(j in l){if(k.call(l[j],j,l[j])===false)break}else for(j=l[0];s<m&&k.call(j,s,j)!==false;j=l[++s]);return l}}function d(l){return document.getElementById(l)}function f(l,k,j){if(typeof k!="object")return l;l&&k&&b(k,function(s,m){if(!j||
typeof m!="function")l[s]=m});return l}function g(l){var k=l.indexOf(".");if(k!=-1){var j=l.slice(0,k)||"*",s=l.slice(k+1,l.length),m=[];b(document.getElementsByTagName(j),function(){this.className&&this.className.indexOf(s)!=-1&&m.push(this)});return m}}function i(l){l=l||window.event;if(l.preventDefault){l.stopPropagation();l.preventDefault()}else{l.returnValue=false;l.cancelBubble=true}return false}function n(l,k,j){l[k]=l[k]||[];l[k].push(j)}function r(){return"_"+(""+Math.random()).slice(2,10)}
function h(l,k,j){function s(){function p(y){var E=m.hasiPadSupport&&m.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(z[0].url)&&!E)return true;!m.isLoaded()&&m._fireEvent("onBeforeClick")!==false&&m.load();return i(y)}function A(){if(q.replace(/\s/g,"")!=="")if(l.addEventListener)l.addEventListener("click",p,false);else l.attachEvent&&l.attachEvent("onclick",p);else{l.addEventListener&&l.addEventListener("click",i,false);m.load()}}if($f(l)){$f(l).getParent().innerHTML=
"";I=$f(l).getIndex();D[I]=m}else{D.push(m);I=D.length-1}N=parseInt(l.style.height,10)||l.clientHeight;J=l.id||"fp"+r();L=k.id||J+"_api";k.id=L;j.playerId=J;if(typeof j=="string")j={clip:{url:j}};if(typeof j.clip=="string")j.clip={url:j.clip};j.clip=j.clip||{};if(l.getAttribute("href",2)&&!j.clip.url)j.clip.url=l.getAttribute("href",2);u=new v(j.clip,-1,m);j.playlist=j.playlist||[j.clip];var x=0;b(j.playlist,function(){var y=this;if(typeof y=="object"&&y.length)y={url:""+y};b(j.clip,function(E,H){if(H!==
undefined&&y[E]===undefined&&typeof H!="function")y[E]=H});j.playlist[x]=y;y=new v(y,x,m);z.push(y);x++});b(j,function(y,E){if(typeof E=="function"){u[y]?u[y](E):n(F,y,E);delete j[y]}});b(j.plugins,function(y,E){if(E)C[y]=new w(y,E,m)});if(!j.plugins||j.plugins.controls===undefined)C.controls=new w("controls",null,m);C.canvas=new w("canvas",null,m);q=l.innerHTML;setTimeout(A,0)}var m=this,B=null,G=false,q,u,z=[],C={},F={},J,L,I,O,P,N;f(m,{id:function(){return J},isLoaded:function(){return B!==null&&
B.fp_play!==undefined&&!G},getParent:function(){return l},hide:function(p){if(p)l.style.height="0px";if(m.isLoaded())B.style.height="0px";return m},show:function(){l.style.height=N+"px";if(m.isLoaded())B.style.height=P+"px";return m},isHidden:function(){return m.isLoaded()&&parseInt(B.style.height,10)===0},load:function(p){if(!m.isLoaded()&&m._fireEvent("onBeforeLoad")!==false){var A=function(){if((q=l.innerHTML)&&!flashembed.isSupported(k.version))l.innerHTML="";if(p){p.cached=true;n(F,"onLoad",
p)}flashembed(l,k,{config:j})},x=0;b(D,function(){this.unload(function(){++x==D.length&&A()})})}return m},unload:function(p){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){p&&p(false);return m}if(q.replace(/\s/g,"")!==""){if(m._fireEvent("onBeforeUnload")===false){p&&p(false);return m}G=true;try{if(B){B.fp_close();m._fireEvent("onUnload")}}catch(A){}setTimeout(function(){B=null;l.innerHTML=q;G=false;p&&p(true)},50)}else p&&p(false);return m},getClip:function(p){if(p===undefined)p=O;
return z[p]},getCommonClip:function(){return u},getPlaylist:function(){return z},getPlugin:function(p){var A=C[p];if(!A&&m.isLoaded()){var x=m._api().fp_getPlugin(p);if(x){A=new w(p,x,m);C[p]=A}}return A},getScreen:function(){return m.getPlugin("screen")},getControls:function(){return m.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return m.getPlugin("logo")._fireEvent("onUpdate")}catch(p){}},getPlay:function(){return m.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(p){return p?
c(j):j},getFlashParams:function(){return k},loadPlugin:function(p,A,x,y){if(typeof x=="function"){y=x;x={}}var E=y?r():"_";m._api().fp_loadPlugin(p,A,x,E);A={};A[E]=y;y=new w(p,null,m,A);return C[p]=y},getState:function(){return m.isLoaded()?B.fp_getState():-1},play:function(p,A){var x=function(){p!==undefined?m._api().fp_play(p,A):m._api().fp_play()};if(m.isLoaded())x();else G?setTimeout(function(){m.play(p,A)},50):m.load(function(){x()});return m},getVersion:function(){if(m.isLoaded()){var p=B.fp_getVersion();
p.push("flowplayer.js @VERSION");return p}return"flowplayer.js @VERSION"},_api:function(){if(!m.isLoaded())throw"Flowplayer "+m.id()+" not loaded when calling an API method";return B},setClip:function(p){m.setPlaylist([p]);return m},getIndex:function(){return I},_swfHeight:function(){return B.clientHeight}});b("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),function(){var p="on"+this;if(p.indexOf("*")!=-1){p=
p.slice(0,p.length-1);var A="onBefore"+p.slice(2);m[A]=function(x){n(F,A,x);return m}}m[p]=function(x){n(F,p,x);return m}});b("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled".split(","),function(){var p=this;m[p]=function(A,x){if(!m.isLoaded())return m;var y=null;y=A!==undefined&&x!==undefined?
B["fp_"+p](A,x):A===undefined?B["fp_"+p]():B["fp_"+p](A);return y==="undefined"||y===undefined?m:y}});m._fireEvent=function(p){if(typeof p=="string")p=[p];var A=p[0],x=p[1],y=p[2],E=p[3],H=0;j.debug&&a(p);if(!m.isLoaded()&&A=="onLoad"&&x=="player"){B=B||d(L);P=m._swfHeight();b(z,function(){this._fireEvent("onLoad")});b(C,function(Q,M){M._fireEvent("onUpdate")});u._fireEvent("onLoad")}if(!(A=="onLoad"&&x!="player")){if(A=="onError")if(typeof x=="string"||typeof x=="number"&&typeof y=="number"){x=y;
y=E}if(A=="onContextMenu")b(j.contextMenu[x],function(Q,M){M.call(m)});else if(A=="onPluginEvent"||A=="onBeforePluginEvent"){if(E=C[x.name||x]){E._fireEvent("onUpdate",x);return E._fireEvent(y,p.slice(3))}}else{if(A=="onPlaylistReplace"){z=[];var R=0;b(x,function(){z.push(new v(this,R++,m))})}if(A=="onClipAdd"){if(x.isInStream)return;x=new v(x,y,m);z.splice(y,0,x);for(H=y+1;H<z.length;H++)z[H].index++}var K=true;if(typeof x=="number"&&x<z.length){O=x;if(p=z[x])K=p._fireEvent(A,y,E);if(!p||K!==false)K=
u._fireEvent(A,y,E,p)}b(F[A],function(){K=this.call(m,x,y);this.cached&&F[A].splice(H,1);if(K===false)return false;H++});return K}}};typeof l=="string"?flashembed.domReady(function(){var p=d(l);if(p){l=p;s()}else throw"Flowplayer cannot access element: "+l;}):s()}function o(l){this.length=l.length;this.each=function(k){b(l,k)};this.size=function(){return l.length}}var v=function(l,k,j){var s=this,m={},B={};s.index=k;if(typeof l=="string")l={url:l};f(this,l,true);b("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),
function(){var q="on"+this;if(q.indexOf("*")!=-1){q=q.slice(0,q.length-1);var u="onBefore"+q.slice(2);s[u]=function(z){n(B,u,z);return s}}s[q]=function(z){n(B,q,z);return s};if(k==-1){if(s[u])j[u]=s[u];if(s[q])j[q]=s[q]}});f(this,{onCuepoint:function(q,u){if(arguments.length==1){m.embedded=[null,q];return s}if(typeof q=="number")q=[q];var z=r();m[z]=[q,u];j.isLoaded()&&j._api().fp_addCuepoints(q,k,z);return s},update:function(q){f(s,q);j.isLoaded()&&j._api().fp_updateClip(q,k);var u=j.getConfig();
f(k==-1?u.clip:u.playlist[k],q,true)},_fireEvent:function(q,u,z,C){if(q=="onLoad"){b(m,function(L,I){I[0]&&j._api().fp_addCuepoints(I[0],k,L)});return false}C=C||s;if(q=="onCuepoint"){var F=m[u];if(F)return F[1].call(j,C,z)}if(u&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(q)!=-1){f(C,u);if(u.metaData)if(C.duration)C.fullDuration=u.metaData.duration;else C.duration=u.metaData.duration}var J=true;b(B[q],function(){J=this.call(j,C,u,z)});return J}});if(l.onCuepoint){var G=l.onCuepoint;
s.onCuepoint.apply(s,typeof G=="function"?[G]:G);delete l.onCuepoint}b(l,function(q,u){if(typeof u=="function"){n(B,q,u);delete l[q]}});if(k==-1)j.onCuepoint=this.onCuepoint},w=function(l,k,j,s){var m=this,B={},G=false;s&&f(B,s);b(k,function(q,u){if(typeof u=="function"){B[q]=u;delete k[q]}});f(this,{animate:function(q,u,z){if(!q)return m;if(typeof u=="function"){z=u;u=500}if(typeof q=="string"){var C=q;q={};q[C]=u;u=500}if(z){var F=r();B[F]=z}if(u===undefined)u=500;k=j._api().fp_animate(l,q,u,F);
return m},css:function(q,u){if(u!==undefined){var z={};z[q]=u;q=z}k=j._api().fp_css(l,q);f(m,k);return m},show:function(){this.display="block";j._api().fp_showPlugin(l);return m},hide:function(){this.display="none";j._api().fp_hidePlugin(l);return m},toggle:function(){this.display=j._api().fp_togglePlugin(l);return m},fadeTo:function(q,u,z){if(typeof u=="function"){z=u;u=500}if(z){var C=r();B[C]=z}this.display=j._api().fp_fadeTo(l,q,u,C);this.opacity=q;return m},fadeIn:function(q,u){return m.fadeTo(1,
q,u)},fadeOut:function(q,u){return m.fadeTo(0,q,u)},getName:function(){return l},getPlayer:function(){return j},_fireEvent:function(q,u){if(q=="onUpdate"){var z=j._api().fp_getPlugin(l);if(!z)return;f(m,z);delete m.methods;if(!G){b(z.methods,function(){var C=""+this;m[C]=function(){var F=[].slice.call(arguments);F=j._api().fp_invoke(l,C,F);return F==="undefined"||F===undefined?m:F}});G=true}}if(z=B[q]){u=z.apply(m,u);q.slice(0,1)=="_"&&delete B[q];return u}return m}})},D=[];window.flowplayer=window.$f=
function(){var l=null,k=arguments[0];if(!arguments.length){b(D,function(){if(this.isLoaded()){l=this;return false}});return l||D[0]}if(arguments.length==1)if(typeof k=="number")return D[k];else{if(k=="*")return new o(D);b(D,function(){if(this.id()==k.id||this.id()==k||this.getParent()==k){l=this;return false}});return l}if(arguments.length>1){var j=arguments[1],s=arguments.length==3?arguments[2]:{};if(typeof j=="string")j={src:j};j=f({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",
cachebusting:true},j);if(typeof k=="string")if(k.indexOf(".")!=-1){var m=[];b(g(k),function(){m.push(new h(this,c(j),c(s)))});return new o(m)}else{var B=d(k);return new h(B!==null?B:k,j,s)}else if(k)return new h(k,j,s)}return null};f(window.$f,{fireEvent:function(){var l=[].slice.call(arguments),k=$f(l[0]);return k?k._fireEvent(l.slice(1)):null},addPlugin:function(l,k){h.prototype[l]=k;return $f},each:b,extend:f});if(typeof jQuery=="function")jQuery.fn.flowplayer=function(l,k){if(!arguments.length||
typeof arguments[0]=="number"){var j=[];this.each(function(){var s=$f(this);s&&j.push(s)});return arguments.length?j[arguments[0]]:new o(j)}return this.each(function(){$f(this,c(l),k?c(k):{})})}})();
(function(){function a(h,o){if(o)for(key in o)if(o.hasOwnProperty(key))h[key]=o[key];return h}function c(h,o){var v=[];for(var w in h)if(h.hasOwnProperty(w))v[w]=o(h[w]);return v}function b(h,o,v){if(n.isSupported(o.version))h.innerHTML=n.getHTML(o,v);else{if(!h.innerHTML.replace(/\s/g,""))h.innerHTML='<div id="error_info"><a href="http://get.adobe.com/flashplayer/" target="_blank"><img src="http://cache.madthumbs.com/madthumbs/images/flashplayer_100x100.jpg" alt="Flash Player"/></a><h3>You need Adobe Flash Player to watch this video.</h3><p><a href="http://get.adobe.com/flashplayer/" target="_blank">Download</a> the latest version of Flash player.</p></div>';
if(o.onFail){var w=o.onFail.call(this);if(typeof w=="string")h.innerHTML=w}}if(d)window[o.id]=document.getElementById(o.id);a(this,{getRoot:function(){return h},getOptions:function(){return o},getConf:function(){return v},getApi:function(){return h.firstChild}})}var d=document.all,f=typeof jQuery=="function",g=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,i={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,
w3c:false,cachebusting:false};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(h,o,v){if(typeof h=="string")h=document.getElementById(h.replace("#",""));if(h){if(typeof o=="string")o={src:o};return new b(h,a(a({},i),o),v)}};var n=a(window.flashembed,{conf:i,getVersion:function(){var h;try{h=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{var v=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
h=v&&v.GetVariable("$version")}catch(w){}}h=g.exec(h);return h!==null?[h[1],h[3]]:[0,0]},asString:function(h){if(h===null||h===undefined)return null;var o=typeof h;if(o=="object"&&h.push)o="array";switch(o){case "string":h=h.replace(new RegExp('(["\\\\])',"g"),"\\$1");h=h.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+h+'"';case "array":return"["+c(h,function(w){return n.asString(w)}).join(",")+"]";case "function":return'"function()"';case "object":o=[];for(var v in h)h.hasOwnProperty(v)&&o.push('"'+
v+'":'+n.asString(h[v]));return"{"+o.join(",")+"}"}return String(h).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(h,o){h=a({},h);var v='<object width="'+h.width+'" height="'+h.height+'" id="'+h.id+'"" name="'+h.id+'"';if(h.cachebusting)h.src+=(h.src.indexOf("?")!=-1?"&":"?")+Math.random();v+=h.w3c||!d?' data="'+h.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';v+=">";if(h.w3c||d)v+='<param name="movie" value="'+h.src+'" />';h.width=h.height=
h.id=h.w3c=h.src=null;h.onFail=h.version=h.expressInstall=null;for(var w in h)if(h[w])v+='<param name="'+w+'" value="'+h[w]+'" />';h="";if(o){for(var D in o)if(o[D]){w=o[D];h+=D+"="+(/function|object/.test(typeof w)?n.asString(w):w)+"&"}h=h.slice(0,-1);v+='<param name="flashvars" value=\''+h+"' />"}v+="</object>";return v},isSupported:function(h){return r[0]>h[0]||r[0]==h[0]&&r[1]>=h[1]}}),r=n.getVersion();if(f){jQuery.tools=jQuery.tools||{version:"1.2.0"};jQuery.tools.flashembed={conf:i};jQuery.fn.flashembed=
function(h,o){return this.each(function(){$(this).data("flashembed",flashembed(this,h,o))})}}})();
(function(a){function c(){if(a.browser.msie){var h=a(document).height(),o=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h-o<20?o:h]}return[a(window).width(),a(document).height()]}function b(h){if(h)return h.call(a.mask)}a.tools=a.tools||{version:"1.2.0"};var d;d=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
onClose:null}};var f,g,i,n,r;a.mask={load:function(h,o){if(i)return this;if(typeof h=="string")h={color:h};h=h||n;n=h=a.extend(a.extend({},d.conf),h);f=a("#"+h.maskId);if(!f.length){f=a("<div/>").attr("id",h.maskId);a("body").append(f)}var v=c();f.css({position:"absolute",top:0,left:0,width:v[0],height:v[1],display:"none",opacity:h.startOpacity,zIndex:h.zIndex});v=f.css("backgroundColor");if(!v||v=="transparent"||v=="rgba(0, 0, 0, 0)")f.css("backgroundColor",h.color);if(b(h.onBeforeLoad)===false)return this;
h.closeOnEsc&&a(document).bind("keydown.mask",function(w){w.keyCode==27&&a.mask.close(w)});h.closeOnClick&&f.bind("click.mask",function(w){a.mask.close(w)});a(window).bind("resize.mask",function(){a.mask.fit()});if(o&&o.length){r=o.eq(0).css("zIndex");a.each(o,function(){var w=a(this);/relative|absolute|fixed/i.test(w.css("position"))||w.css("position","relative")});g=o.css({zIndex:Math.max(h.zIndex+1,r=="auto"?0:r)})}f.css({display:"block"}).fadeTo(h.loadSpeed,h.opacity,function(){a.mask.fit();b(h.onLoad)});
i=true;return this},close:function(){if(i){if(b(n.onBeforeClose)===false)return this;f.fadeOut(n.closeSpeed,function(){b(n.onClose);g&&g.css({zIndex:r})});a(document).unbind("keydown.mask");f.unbind("click.mask");a(window).unbind("resize.mask");i=false}return this},fit:function(){if(i){var h=c();f.css({width:h[0],height:h[1]})}},getMask:function(){return f},isLoaded:function(){return i},getConf:function(){return n},getExposed:function(){return g}};a.fn.mask=function(h){a.mask.load(h);return this};
a.fn.expose=function(h){a.mask.load(h,this);return this}})(jQuery);
(function(a){function c(f,g){var i=this,n=f.add(i),r=a(window),h,o,v,w=a.tools.expose&&(g.mask||g.expose),D=Math.random().toString().slice(10);if(w){if(typeof w=="string")w={color:w};w.closeOnClick=w.closeOnEsc=false}var l=g.target||f.attr("rel");o=l?a(l):f;if(!o.length)throw"Could not find Overlay: "+l;f&&f.index(o)==-1&&f.click(function(k){i.load(k);return k.preventDefault()});a.extend(i,{load:function(k){if(i.isOpened())return i;var j=d[g.effect];if(!j)throw'Overlay: cannot find effect : "'+g.effect+
'"';g.oneInstance&&a.each(b,function(){this.close(k)});k=k||a.Event();k.type="onBeforeLoad";n.trigger(k);if(k.isDefaultPrevented())return i;v=true;w&&a(o).expose(w);var s=g.top,m=g.left,B=o.outerWidth({margin:true}),G=o.outerHeight({margin:true});if(typeof s=="string")s=s=="center"?Math.max((r.height()-G)/2,0):parseInt(s,10)/100*r.height();if(m=="center")m=Math.max((r.width()-B)/2,0);j[0].call(i,{top:s,left:m},function(){if(v){k.type="onLoad";n.trigger(k)}});w&&g.closeOnClick&&a.mask.getMask().one("click",
i.close);g.closeOnClick&&a(document).bind("click."+D,function(q){a(q.target).parents(o).length||i.close(q)});g.closeOnEsc&&a(document).bind("keydown."+D,function(q){q.keyCode==27&&i.close(q)});return i},close:function(k){if(!i.isOpened())return i;k=k||a.Event();k.type="onBeforeClose";n.trigger(k);if(!k.isDefaultPrevented()){v=false;d[g.effect][1].call(i,function(){k.type="onClose";n.trigger(k)});a(document).unbind("click."+D).unbind("keydown."+D);w&&a.mask.close();return i}},getOverlay:function(){return o},
getTrigger:function(){return f},getClosers:function(){return h},isOpened:function(){return v},getConf:function(){return g}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(k,j){a.isFunction(g[j])&&a(i).bind(j,g[j]);i[j]=function(s){a(i).bind(j,s);return i}});h=o.find(g.close||".close");if(!h.length&&!g.close){h=a('<div class="close"></div>');o.prepend(h)}h.click(function(k){i.close(k)});g.load&&i.load()}a.tools=a.tools||{version:"1.2.0"};a.tools.overlay={addEffect:function(f,
g,i){d[f]=[g,i]},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 b=[],d={};a.tools.overlay.addEffect("default",function(f,g){var i=this.getConf(),n=a(window);if(!i.fixed){f.top+=n.scrollTop();f.left+=n.scrollLeft()}f.position=i.fixed?"fixed":"absolute";this.getOverlay().css(f).fadeIn(i.speed,g)},function(f){this.getOverlay().fadeOut(this.getConf().closeSpeed,
f)});a.fn.overlay=function(f){var g=this.data("overlay");if(g)return g;if(a.isFunction(f))f={onBeforeLoad:f};f=a.extend(true,{},a.tools.overlay.conf,f);this.each(function(){g=new c(a(this),f);b.push(g);a(this).data("overlay",g)});return f.api?g:this}})(jQuery);
(function(a){a.extend(a.fn,{validate:function(c){if(this.length){var b=a.data(this[0],"validator");if(b)return b;b=new a.validator(c,this[0]);a.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function f(){if(b.settings.submitHandler){if(b.submitButton)var g=a("<input type='hidden'/>").attr("name",
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&g.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return f()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return f()}else{b.focusInvalid();return false}})}return b}else c&&c.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(a(this[0]).is("form"))return this.validate().form();
else{var c=true,b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(c){var b={},d=this;a.each(c.split(/\s/),function(f,g){b[g]=d.attr(g);d.removeAttr(g)});return b},rules:function(c,b){var d=this[0];if(c){var f=a.data(d.form,"validator").settings,g=f.rules,i=a.validator.staticRules(d);switch(c){case "add":a.extend(i,a.validator.normalizeRule(b));g[d.name]=i;if(b.messages)f.messages[d.name]=a.extend(f.messages[d.name],b.messages);break;case "remove":if(!b){delete g[d.name];
return i}var n={};a.each(b.split(/\s/),function(r,h){n[h]=i[h];delete i[h]});return n}}c=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(d),a.validator.classRules(d),a.validator.attributeRules(d),a.validator.staticRules(d)),d);if(c.required){b=c.required;delete c.required;c=a.extend({required:b},c)}return c}});a.extend(a.expr[":"],{blank:function(c){return!a.trim(""+c.value)},filled:function(c){return!!a.trim(""+c.value)},unchecked:function(c){return!c.checked}});a.validator=function(c,
b){this.settings=a.extend({},a.validator.defaults,c);this.currentForm=b;this.init()};a.validator.format=function(c,b){if(arguments.length==1)return function(){var d=a.makeArray(arguments);d.unshift(c);return a.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=a.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];a.each(b,function(d,f){c=c.replace(new RegExp("\\{"+d+"\\}","g"),f)});return c};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(c){this.lastActive=c;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,c,this.settings.errorClass,this.settings.validClass);this.errorsFor(c).hide()}},onfocusout:function(c){if(!this.checkable(c)&&(c.name in this.submitted||!this.optional(c)))this.element(c)},onkeyup:function(c){if(c.name in
this.submitted||c==this.lastElement)this.element(c)},onclick:function(c){if(c.name in this.submitted)this.element(c);else c.parentNode.name in this.submitted&&this.element(c.parentNode)},highlight:function(c,b,d){a(c).addClass(b).removeClass(d)},unhighlight:function(c,b,d){a(c).removeClass(b).addClass(d)}},setDefaults:function(c){a.extend(a.validator.defaults,c)},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).",number:"Please enter a valid number.",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(){function c(f){var g=a.data(this[0].form,"validator");g.settings["on"+f.type]&&g.settings["on"+f.type].call(g,this[0])}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(f,g){a.each(g.split(/\s/),function(i,n){b[n]=f})});var d=this.settings.rules;a.each(d,function(f,g){d[f]=a.validator.normalizeRule(g)});a(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",
c).delegate("click",":radio, :checkbox, select, option",c);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);this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var c=0,b=this.currentElements=this.elements();b[c];c++)this.check(b[c]);
return this.valid()},element:function(c){this.lastElement=c=this.clean(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(){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(c){var b=0;for(var d in c)b++;return b},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(c){}},findLastActive:function(){var c=this.lastActive;return c&&a.grep(this.errorList,function(b){return b.element.name==c.name}).length==1&&c},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;return b[this.name]=true})},clean:function(c){return a(c)[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.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(c){this.reset();this.toHide=this.errorsFor(c)},check:function(c){c=this.clean(c);if(this.checkable(c))c=this.findByName(c.name)[0];var b=a(c).rules(),d=false;for(method in b){var f={method:method,parameters:b[method]};try{var g=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!g){this.formatAndAdd(c,f);return false}}}catch(i){this.settings.debug&&
window.console&&console.log("exception occured when checking element "+c.id+", check the '"+f.method+"' method",i);throw i;}}if(!d){this.objectLength(b)&&this.successList.push(c);return true}},customMetaMessage:function(c,b){if(a.metadata)return(c=this.settings.meta?a(c).metadata()[this.settings.meta]:a(c).metadata())&&c.messages&&c.messages[b]},customMessage:function(c,b){return(c=this.settings.messages[c])&&(c.constructor==String?c:c[b])},findDefined:function(){for(var c=0;c<arguments.length;c++)if(arguments[c]!==
undefined)return arguments[c]},defaultMessage:function(c,b){return this.findDefined(this.customMessage(c.name,b),this.customMetaMessage(c,b),!this.settings.ignoreTitle&&c.title||undefined,a.validator.messages[b],"<strong>Warning: No message defined for "+c.name+"</strong>")},formatAndAdd:function(c,b){var d=this.defaultMessage(c,b.method),f=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,c);else if(f.test(d))d=jQuery.format(d.replace(f,"{$1}"),b.parameters);this.errorList.push({message:d,
element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(c){if(this.settings.wrapper)c=c.add(c.parent(this.settings.wrapper));return c},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(c=
0;this.successList[c];c++)this.showLabel(this.successList[c]);if(this.settings.unhighlight){c=0;for(b=this.validElements();b[c];c++)this.settings.unhighlight.call(this,b[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,
b){var d=this.errorsFor(c);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,a(c)):d.insertAfter(c))}if(!b&&this.settings.success){d.text("");
typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(c){return this.groups[c.name]||(this.checkable(c)?c.name:c.id||c.name)},checkable:function(c){return/radio|checkbox/i.test(c.type)},findByName:function(c){var b=this.currentForm;return a(document.getElementsByName(c)).map(function(d,f){return f.form==
b&&f.name==c&&f||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){return c},string:function(c,b){return!!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(c){return!a.validator.methods.required.call(this,
a.trim(c.value),c)&&"dependency-mismatch"},startRequest:function(c){if(!this.pending[c.name]){this.pendingRequest++;this.pending[c.name]=true}},stopRequest:function(c,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[c.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(c){return a.data(c,"previousValue")||a.data(c,"previousValue",{old:null,valid:true,message:this.defaultMessage(c,"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(c,b){c.constructor==String?(this.classRuleSettings[c]=b):a.extend(this.classRuleSettings,
c)},classRules:function(c){var b={};(c=a(c).attr("class"))&&a.each(c.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(b,a.validator.classRuleSettings[this])});return b},attributeRules:function(c){var b={};c=a(c);for(method in a.validator.methods){var d=c.attr(method);if(d)b[method]=d}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(c){if(!a.metadata)return{};var b=a.data(c.form,"validator").settings.meta;return b?a(c).metadata()[b]:
a(c).metadata()},staticRules:function(c){var b={},d=a.data(c.form,"validator");if(d.settings.rules)b=a.validator.normalizeRule(d.settings.rules[c.name])||{};return b},normalizeRules:function(c,b){a.each(c,function(d,f){if(f===false)delete c[d];else if(f.param||f.depends){var g=true;switch(typeof f.depends){case "string":g=!!a(f.depends,b.form).length;break;case "function":g=f.depends.call(b,b);break}if(g)c[d]=f.param!==undefined?f.param:true;else delete c[d]}});a.each(c,function(d,f){c[d]=a.isFunction(f)?
f(b):f});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}}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(c,b,d){a.validator.methods[c]=b;a.validator.messages[c]=d!=undefined?d:a.validator.messages[c];b.length<3&&a.validator.addClassRules(c,a.validator.normalizeRule(c))},methods:{required:function(c,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(c=a(b).val())&&c.length>0;case "input":if(this.checkable(b))return this.getLength(c,b)>0;default:return a.trim(c).length>
0}},remote:function(c,b,d){if(this.optional(b))return"dependency-mismatch";var f=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});f.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=f.message;d=typeof d=="string"&&{url:d}||d;if(f.old!==c){f.old=c;var g=this;this.startRequest(b);var i={};i[b.name]=c;a.ajax(a.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:i,success:function(n){g.settings.messages[b.name].remote=
f.originalMessage;var r=n===true;if(r){var h=g.formSubmitted;g.prepareElement(b);g.formSubmitted=h;g.successList.push(b);g.showErrors()}else{h={};n=f.message=n||g.defaultMessage(b,"remote");h[b.name]=a.isFunction(n)?n(c):n;g.showErrors(h)}f.valid=r;g.stopRequest(b,r)}},d));return"pending"}else if(this.pending[b.name])return"pending";return f.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(c,b,d){c=this.getLength(a.trim(c),b);return this.optional(b)||c>=d[0]&&c<=d[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)},number: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(c,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(c))return false;var d=b=0,f=false;c=c.replace(/\D/g,"");for(var g=c.length-1;g>=
0;g--){d=c.charAt(g);d=parseInt(d,10);if(f)if((d*=2)>9)d-=9;b+=d;f=!f}return b%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){d=a(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);
(function(a){var c=a.ajax,b={};a.ajax=function(d){d=a.extend(d,a.extend({},a.ajaxSettings,d));var f=d.port;if(d.mode=="abort"){b[f]&&b[f].abort();return b[f]=c.apply(this,arguments)}return c.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(c,b,d){return this.bind(c,function(f){var g=a(f.target);
if(g.is(b))return d.apply(g,arguments)})},triggerEvent:function(c,b){return this.triggerHandler(c,[a.event.fix({type:c,target:b})])}})})(jQuery);
(function(a){a.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(c,b){this.defaults.type=c;this.defaults.name=b},get:function(c,b){b=a.extend({},this.defaults,b);if(!b.single.length)b.single="metadata";var d=a.data(c,b.single);if(d)return d;d="{}";if(b.type=="class"){var f=b.cre.exec(c.className);if(f)d=f[1]}else if(b.type=="elem"){if(!c.getElementsByTagName)return;f=c.getElementsByTagName(b.name);if(f.length)d=a.trim(f[0].innerHTML)}else if(c.getAttribute!=
undefined)if(f=c.getAttribute(b.name))d=f;if(d.indexOf("{")<0)d="{"+d+"}";d=eval("("+d+")");a.data(c,b.single,d);return d}}});a.fn.metadata=function(c){return a.metadata.get(this[0],c)}})(jQuery);
window.jQuery&&function(a){if(a.browser.msie)try{document.execCommand("BackgroundImageCache",false,true)}catch(c){}a.fn.rating=function(b){if(this.length==0)return this;if(typeof arguments[0]=="string"){if(this.length>1){var d=arguments;return this.each(function(){a.fn.rating.apply(a(this),d)})}a.fn.rating[arguments[0]].apply(this,a.makeArray(arguments).slice(1)||[]);return this}b=a.extend({},a.fn.rating.options,b||{});a.fn.rating.calls++;this.not(".star-rating-applied").addClass("star-rating-applied").each(function(){var f,
g=a(this),i=(this.name||"unnamed-rating").replace(/\[|\]/g,"_").replace(/^\_+|\_+$/g,""),n=a(this.form||document.body),r=n.data("rating");if(!r||r.call!=a.fn.rating.calls)r={count:0,call:a.fn.rating.calls};var h=r[i];if(h)f=h.data("rating");if(h&&f)f.count++;else{f=a.extend({},b||{},(a.metadata?g.metadata():a.meta?g.data():null)||{},{count:0,stars:[],inputs:[]});f.serial=r.count++;h=a('<span class="star-rating-control"/>');g.before(h);h.addClass("rating-to-be-drawn");if(g.attr("disabled"))f.readOnly=
true;h.append(f.cancel=a('<div class="rating-cancel"><a title="'+f.cancel+'">'+f.cancelValue+"</a></div>").mouseover(function(){a(this).rating("drain");a(this).addClass("cancel-hover")}).mouseout(function(){a(this).rating("draw");a(this).removeClass("cancel-hover")}).click(function(){a(this).rating("select")}).data("rating",f))}var o=a('<div class="star-rating rater-'+f.serial+'"><a title="'+(this.title||this.value)+'">'+this.value+"</a></div>");h.append(o);this.id&&o.attr("id",this.id);this.className&&
o.addClass(this.className);if(f.half)f.split=2;if(typeof f.split=="number"&&f.split>0){var v=(a.fn.width?o.width():0)||f.starWidth,w=f.count%f.split;v=Math.floor(v/f.split);o.width(v).find("a").css({"margin-left":"-"+w*v+"px"})}f.readOnly?o.addClass("star-rating-readonly"):o.addClass("star-rating-live").mouseover(function(){a(this).rating("fill");a(this).rating("focus")}).mouseout(function(){a(this).rating("draw");a(this).rating("blur")}).click(function(){a(this).rating("select")});if(this.checked)f.current=
o;g.hide();g.change(function(){a(this).rating("select")});o.data("rating.input",g.data("rating.star",o));f.stars[f.stars.length]=o[0];f.inputs[f.inputs.length]=g[0];f.rater=r[i]=h;f.context=n;g.data("rating",f);h.data("rating",f);o.data("rating",f);n.data("rating",r)});a(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn");return this};a.extend(a.fn.rating,{calls:0,focus:function(){var b=this.data("rating");if(!b)return this;if(!b.focus)return this;var d=a(this).data("rating.input")||
a(this.tagName=="INPUT"?this:null);b.focus&&b.focus.apply(d[0],[d.val(),a("a",d.data("rating.star"))[0]])},blur:function(){var b=this.data("rating");if(!b)return this;if(!b.blur)return this;var d=a(this).data("rating.input")||a(this.tagName=="INPUT"?this:null);b.blur&&b.blur.apply(d[0],[d.val(),a("a",d.data("rating.star"))[0]])},fill:function(){var b=this.data("rating");if(!b)return this;if(!b.readOnly){this.rating("drain");this.prevAll().andSelf().filter(".rater-"+b.serial).addClass("star-rating-hover")}},
drain:function(){var b=this.data("rating");if(!b)return this;b.readOnly||b.rater.children().filter(".rater-"+b.serial).removeClass("star-rating-on").removeClass("star-rating-hover")},draw:function(){var b=this.data("rating");if(!b)return this;this.rating("drain");if(b.current){b.current.data("rating.input").attr("checked","checked");b.current.prevAll().andSelf().filter(".rater-"+b.serial).addClass("star-rating-on")}else a(b.inputs).removeAttr("checked");b.cancel[b.readOnly||b.required?"hide":"show"]();
this.siblings()[b.readOnly?"addClass":"removeClass"]("star-rating-readonly")},select:function(b,d){var f=this.data("rating");if(!f)return this;if(!f.readOnly){f.current=null;if(typeof b!="undefined"){if(typeof b=="number")return a(f.stars[b]).rating("select",undefined,d);typeof b=="string"&&a.each(f.stars,function(){a(this).data("rating.input").val()==b&&a(this).rating("select",undefined,d)})}else f.current=this[0].tagName=="INPUT"?this.data("rating.star"):this.is(".rater-"+f.serial)?this:null;this.data("rating",
f);this.rating("draw");var g=a(f.current?f.current.data("rating.input"):null);if((d||d==undefined)&&f.callback)f.callback.apply(g[0],[g.val(),a("a",f.current)[0]])}},readOnly:function(b,d){var f=this.data("rating");if(!f)return this;f.readOnly=b||b==undefined?true:false;d?a(f.inputs).attr("disabled","disabled"):a(f.inputs).removeAttr("disabled");this.data("rating",f);this.rating("draw")},disable:function(){this.rating("readOnly",true,true)},enable:function(){this.rating("readOnly",false,false)}});
a.fn.rating.options={cancel:"Cancel Rating",cancelValue:"",split:0,starWidth:19};a(function(){a("input[type=radio].star").rating()})}(jQuery);

