(function(c){function p(d,a,b){var e=this,l=d.add(this),h=d.find(b.tabs),j=a.jquery?a:d.children(a),i;h.length||(h=d.children());j.length||(j=d.parent().find(a));j.length||(j=c(a));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=Math.max(h.index(k),0)}if(b.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(i>=0)return e;f=b.initialIndex;k=h.eq(f)}if(f===i)return e;g=g||c.Event();g.type="onBeforeClick";l.trigger(g,[f]);if(!g.isDefaultPrevented()){o[b.effect].call(e,f,function(){g.type="onClick";l.trigger(g,[f])});i=f;h.removeClass(b.current);k.addClass(b.current);return e}},getConf:function(){return b},getTabs:function(){return h},getPanes:function(){return j},getCurrentPane:function(){return j.eq(i)},getCurrentTab:function(){return h.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)}});c.each("onBeforeClick,onClick".split(","),function(f,g){c.isFunction(b[g])&&c(e).bind(g,b[g]);e[g]=function(k){c(e).bind(g,k);return e}});if(b.history&&c.fn.history){c.tools.history.init(h);b.event="history"}h.each(function(f){c(this).bind(b.event,function(g){e.click(f,g);return g.preventDefault()})});j.find("a[href^=#]").click(function(f){e.click(c(this).attr("href"),f)});if(location.hash)e.click(location.hash);else if(b.initialIndex===0||b.initialIndex>0)e.click(b.initialIndex)}c.tools=c.tools||{version:"1.2.1"};c.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(d,a){o[d]=a}};var o={"default":function(d,a){this.getPanes().hide().eq(d).show();a.call()},fade:function(d,a){var b=this.getConf(),e=b.fadeOutSpeed,l=this.getPanes();e?l.fadeOut(e):l.hide();l.eq(d).fadeIn(b.fadeInSpeed,a)},slide:function(d,a){this.getPanes().slideUp(200);this.getPanes().eq(d).slideDown(400,a)},ajax:function(d,a){this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),a)}},m;c.tools.tabs.addEffect("horizontal",function(d,a){m||(m=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:m},function(){c(this).show();a.call()})});c.fn.tabs=function(d,a){var b=this.data("tabs");if(b)return b;if(c.isFunction(a))a={onBeforeClick:a};a=c.extend({},c.tools.tabs.conf,a);this.each(function(){b=new p(c(this),d,a);c(this).data("tabs",b)});return a.api?b:this}})(jQuery);(function(f){function p(a,b,c){var h=c.relative?a.position().top:a.offset().top,e=c.relative?a.position().left:a.offset().left,i=c.position[0];h-=b.outerHeight()-c.offset[0];e+=a.outerWidth()+c.offset[1];var j=b.outerHeight()+a.outerHeight();if(i=="center")h+=j/2;if(i=="bottom")h+=j;i=c.position[1];a=b.outerWidth()+a.outerWidth();if(i=="center")e-=a/2;if(i=="left")e-=a;return{top:h,left:e}}function t(a,b){var c=this,h=a.add(c),e,i=0,j=0,m=a.attr("title"),q=n[b.effect],k,r=a.is(":input"),u=r&&a.is(":checkbox, :radio, select, :button"),s=a.attr("type"),l=b.events[s]||b.events[r?u?"widget":"input":"def"];if(!q)throw'Nonexistent effect "'+b.effect+'"';l=l.split(/,\s*/);if(l.length!=2)throw"Tooltip: bad events configuration for "+s;a.bind(l[0],function(d){if(b.predelay){clearTimeout(i);j=setTimeout(function(){c.show(d)},b.predelay)}else c.show(d)}).bind(l[1],function(d){if(b.delay){clearTimeout(j);i=setTimeout(function(){c.hide(d)},b.delay)}else c.hide(d)});if(m&&b.cancelDefault){a.removeAttr("title");a.data("title",m)}f.extend(c,{show:function(d){if(!e){if(m)e=f(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(m);else if(b.tip)e=f(b.tip).eq(0);else{e=a.next();e.length||(e=a.parent().next())}if(!e.length)throw"Cannot find tooltip for "+a;}if(c.isShown())return c;e.stop(true,true);var g=p(a,e,b);d=d||f.Event();d.type="onBeforeShow";h.trigger(d,[g]);if(d.isDefaultPrevented())return c;g=p(a,e,b);e.css({position:"absolute",top:g.top,left:g.left});k=true;q[0].call(c,function(){d.type="onShow";k="full";h.trigger(d)});g=b.events.tooltip.split(/,\s*/);e.bind(g[0],function(){clearTimeout(i);clearTimeout(j)});g[1]&&!a.is("input:not(:checkbox, :radio), textarea")&&e.bind(g[1],function(o){o.relatedTarget!=a[0]&&a.trigger(l[1].split(" ")[0])});return c},hide:function(d){if(!e||!c.isShown())return c;d=d||f.Event();d.type="onBeforeHide";h.trigger(d);if(!d.isDefaultPrevented()){k=false;n[b.effect][1].call(c,function(){d.type="onHide";k=false;h.trigger(d)});return c}},isShown:function(d){return d?k=="full":k},getConf:function(){return b},getTip:function(){return e},getTrigger:function(){return a}});f.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(d,g){f.isFunction(b[g])&&f(c).bind(g,b[g]);c[g]=function(o){f(c).bind(g,o);return c}})}f.tools=f.tools||{version:"1.2.1"};f.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,b,c){n[a]=[b,c]}};var n={toggle:[function(a){var b=this.getConf(),c=this.getTip();b=b.opacity;b<1&&c.css({opacity:b});c.show();a.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){this.getTip().fadeIn(this.getConf().fadeInSpeed,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};f.fn.tooltip=function(a){var b=this.data("tooltip");if(b)return b;a=f.extend(true,{},f.tools.tooltip.conf,a);if(typeof a.position=="string")a.position=a.position.split(/,?\s/);this.each(function(){b=new t(f(this),a);f(this).data("tooltip",b)});return a.api?b:this}})(jQuery);(function(e){function n(f,c){var a=e(c);return a.length<2?a:f.parent().find(c)}function t(f,c){var a=this,k=f.add(a),g=f.children(),l=0,m=c.vertical;j||(j=a);if(g.length>1)g=e(c.items,f);e.extend(a,{getConf:function(){return c},getIndex:function(){return l},getSize:function(){return a.getItems().size()},getNaviButtons:function(){return o.add(p)},getRoot:function(){return f},getItemWrap:function(){return g},getItems:function(){return g.children(c.item).not("."+c.clonedClass)},move:function(b,d){return a.seekTo(l+
b,d)},next:function(b){return a.move(1,b)},prev:function(b){return a.move(-1,b)},begin:function(b){return a.seekTo(0,b)},end:function(b){return a.seekTo(a.getSize()-1,b)},focus:function(){return j=a},addItem:function(b){b=e(b);if(c.circular){e(".cloned:last").before(b);e(".cloned:first").replaceWith(b.clone().addClass(c.clonedClass))}else g.append(b);k.trigger("onAddItem",[b]);return a},seekTo:function(b,d,h){if(!c.circular&&b<0||b>a.getSize())return a;var i=b;if(b.jquery)b=a.getItems().index(b);else i=a.getItems().eq(b);var q=e.Event("onBeforeSeek");if(!h){k.trigger(q,[b,d]);if(q.isDefaultPrevented()||!i.length)return a}i=m?{top:-i.position().top}:{left:-i.position().left};l=b;j=a;g.animate(i,d,c.easing,h||function(){k.trigger("onSeek",[b])});return a}});e.each(["onBeforeSeek","onSeek","onAddItem"],function(b,d){e.isFunction(c[d])&&e(a).bind(d,c[d]);a[d]=function(h){e(a).bind(d,h);return a}});if(c.circular){var r=a.getItems().slice(-1).clone().prependTo(g),s=a.getItems().eq(1).clone().appendTo(g);r.add(s).addClass(c.clonedClass);a.onBeforeSeek(function(b,d,h){if(!b.isDefaultPrevented())if(d==-1){a.seekTo(r,h,function(){a.end(0)});return b.preventDefault()}else d==a.getSize()&&a.seekTo(s,h,function(){a.begin(0)})});a.seekTo(0,0)}var o=n(f,c.prev).click(function(){a.prev()}),p=n(f,c.next).click(function(){a.next()});!c.circular&&a.getSize()>1&&a.onBeforeSeek(function(b,d){o.toggleClass(c.disabledClass,d<=0);p.toggleClass(c.disabledClass,d>=a.getSize()-1)});c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(b,d){if(c.mousewheel){a.move(d<0?1:-1,c.wheelSpeed||50);return false}});c.keyboard&&e(document).bind("keydown.scrollable",function(b){if(!(!c.keyboard||b.altKey||b.ctrlKey||e(b.target).is(":input")))if(!(c.keyboard!="static"&&j!=a)){var d=b.keyCode;if(m&&(d==38||d==40)){a.move(d==38?-1:1);return b.preventDefault()}if(!m&&(d==37||d==39)){a.move(d==37?-1:1);return b.preventDefault()}}});e(a).trigger("onBeforeSeek",[c.initialIndex])}e.tools=e.tools||{version:"1.2.1"};e.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,wheelSpeed:0}};var j;e.fn.scrollable=function(f){var c=this.data("scrollable");if(c)return c;f=e.extend({},e.tools.scrollable.conf,f);this.each(function(){c=new t(e(this),f);e(this).data("scrollable",c)});return f.api?c:this}})(jQuery);(function(a){function t(d,b){var c=this,i=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";i.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var j=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof j=="string")j=j=="center"?Math.max((o.height()-v)/2,0):parseInt(j,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:j,left:r},function(){if(m){e.type="onLoad";i.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";i.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";i.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(j){a(c).bind(h,j);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<div class="close"></div>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.1"};a.tools.overlay={addEffect:function(d,b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),i=a(window);if(!c.fixed){d.top+=i.scrollTop();d.left+=i.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);(function(b){function l(){if(b.browser.msie){var a=b(document).height(),d=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[b(window).width(),b(document).height()]}function i(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"1.2.1"};var m;m=b.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 c,j,f,g,k;b.mask={load:function(a,d){if(f)return this;if(typeof a=="string")a={color:a};a=a||g;g=a=b.extend(b.extend({},m.conf),a);c=b("#"+a.maskId);if(!c.length){c=b("<div/>").attr("id",a.maskId);b("body").append(c)}var h=l();c.css({position:"absolute",top:0,left:0,width:h[0],height:h[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});h=c.css("backgroundColor");if(!h||h=="transparent"||h=="rgba(0, 0, 0, 0)")c.css("backgroundColor",a.color);if(i(a.onBeforeLoad)===false)return this;a.closeOnEsc&&b(document).bind("keydown.mask",function(e){e.keyCode==27&&b.mask.close(e)});a.closeOnClick&&c.bind("click.mask",function(e){b.mask.close(e)});b(window).bind("resize.mask",function(){b.mask.fit()});if(d&&d.length){k=d.eq(0).css("zIndex");b.each(d,function(){var e=b(this);/relative|absolute|fixed/i.test(e.css("position"))||e.css("position","relative")});j=d.css({zIndex:Math.max(a.zIndex+1,k=="auto"?0:k)})}c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();i(a.onLoad)});f=true;return this},close:function(){if(f){if(i(g.onBeforeClose)===false)return this;c.fadeOut(g.closeSpeed,function(){i(g.onClose);j&&j.css({zIndex:k})});b(document).unbind("keydown.mask");c.unbind("click.mask");b(window).unbind("resize.mask");f=false}return this},fit:function(){if(f){var a=l();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(){return f},getConf:function(){return g},getExposed:function(){return j}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);(function($){var pageTracker;$.trackPage=function(account_id,options){var host=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");var script;var settings=$.extend({},{onload:true,status_code:200},options);var src=host+'google-analytics.com/ga.js';function init_analytics(){if(typeof _gat!=undefined){debug('Google Analytics loaded');pageTracker=_gat._getTracker(account_id);if(settings.status_code==null||settings.status_code==200){pageTracker._trackPageview();}else{debug('Tracking error '+settings.status_code);pageTracker._trackPageview("/"+settings.status_code+".html?page="+document.location.pathname+document.location.search+"&from="+document.referrer);}
if($.isFunction(settings.callback)){settings.callback();}}
else{throw"_gat is undefined";}}
load_script=function(){$.ajax({type:"GET",url:src,success:function(){init_analytics();},dataType:"script",cache:true});}
if(settings.onload==true||settings.onload==null){$(window).load(load_script);}else{load_script();}}
$.trackEvent=function(category,action,label,value){if(typeof pageTracker=='undefined'){debug('FATAL: pageTracker is not defined');}else{pageTracker._trackEvent(category,action,label,value);}};$.trackPageview=function(uri){if(typeof pageTracker=='undefined'){debug('FATAL: pageTracker is not defined');}else{pageTracker._trackPageview(uri);}}
$.fn.track=function(options){return this.each(function(){var element=$(this);if(element.hasClass('tracked')){return false;}else{element.addClass('tracked');}
var settings=$.extend({},$.fn.track.defaults,options);var category=evaluate(element,settings.category);var action=evaluate(element,settings.action);var label=evaluate(element,settings.label);var value=evaluate(element,settings.value);var event_name=evaluate(element,settings.event_name);var message="category:'"+category+"' action:'"+action+"' label:'"+label+"' value:'"+value+"'";debug('Tracking '+event_name+' '+message);element.bind(event_name+'.track',function(){var skip=settings.skip_internal&&(element[0].hostname==location.hostname);if(!skip){$.trackEvent(category,action,label,value);debug('Tracked '+message);}else{debug('Skipped '+message);}
return true;});});function evaluate(element,text_or_function){if(typeof text_or_function=='function'){text_or_function=text_or_function(element);}
return text_or_function;};};function debug(message){if(typeof console!='undefined'&&typeof console.debug!='undefined'&&$.fn.track.defaults.debug){console.debug(message);}};$.fn.track.defaults={category:function(element){return(element[0].hostname==location.hostname)?'internal':'external';},action:'click',label:function(element){return element.attr('href');},value:null,skip_internal:true,event_name:'click',debug:false};})(jQuery);(function($){$.timeago=function(timestamp){if(timestamp instanceof Date)return inWords(timestamp);else if(typeof timestamp=="string")return inWords($.timeago.parse(timestamp));else return inWords($.timeago.datetime(timestamp));};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:60000,allowFuture:false,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(distanceMillis){var $l=this.settings.strings;var prefix=$l.prefixAgo;var suffix=$l.suffixAgo;if(this.settings.allowFuture){if(distanceMillis<0){prefix=$l.prefixFromNow;suffix=$l.suffixFromNow;}
distanceMillis=Math.abs(distanceMillis);}
var seconds=distanceMillis/1000;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;function substitute(stringOrFunction,number){var string=$.isFunction(stringOrFunction)?stringOrFunction(number,distanceMillis):stringOrFunction;var value=($l.numbers&&$l.numbers[number])||number;return string.replace(/%d/i,value);}
var words=seconds<45&&substitute($l.seconds,Math.round(seconds))||seconds<90&&substitute($l.minute,1)||minutes<45&&substitute($l.minutes,Math.round(minutes))||minutes<90&&substitute($l.hour,1)||hours<24&&substitute($l.hours,Math.round(hours))||hours<48&&substitute($l.day,1)||days<30&&substitute($l.days,Math.floor(days))||days<60&&substitute($l.month,1)||days<365&&substitute($l.months,Math.floor(days/30))||years<2&&substitute($l.year,1)||substitute($l.years,Math.floor(years));return $.trim([prefix,words,suffix].join(" "));},parse:function(iso8601){var s=$.trim(iso8601);s=s.replace(/\.\d\d\d+/,"");s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(s);},datetime:function(elem){var isTime=$(elem).get(0).tagName.toLowerCase()=="time";var iso8601=isTime?$(elem).attr("datetime"):$(elem).attr("data-isodate");return $t.parse(iso8601);}});$.fn.timeago=function(){var self=this;self.each(refresh);var $s=$t.settings;if($s.refreshMillis>0){setInterval(function(){self.each(refresh);},$s.refreshMillis);}
return self;};function refresh(){var data=prepareData(this);if(!isNaN(data.datetime)){$(this).text(inWords(data.datetime));}
return this;}
function prepareData(element){element=$(element);if(!element.data("timeago")){element.data("timeago",{datetime:$t.datetime(element)});var text=$.trim(element.text());if(text.length>0)element.attr("title",text);}
return element.data("timeago");}
function inWords(date){return $t.inWords(distance(date));}
function distance(date){return(new Date().getTime()-date.getTime());}
document.createElement("abbr");document.createElement("time");})(jQuery);(function($){var PREFIX='data-',PATTERN=/^data\-(.*)$/;function dataset(name,value){if(value!==undefined){return this.attr(PREFIX+name,value);}
switch(typeof name){case'string':return this.attr(PREFIX+name);case'object':return set_items.call(this,name);case'undefined':return get_items.call(this);default:throw'dataset: invalid argument '+name;}}
function get_items(){return this.foldAttr(function(index,attr,result){var match=PATTERN.exec(this.name);if(match)result[match[1]]=this.value;});}
function set_items(items){for(var key in items){this.attr(PREFIX+key,items[key]);}
return this;}
function remove(name){if(typeof name=='string'){return this.removeAttr(PREFIX+name);}
return remove_names(name);}
function remove_names(obj){var idx,length=obj&&obj.length;if(length===undefined){for(idx in obj){this.removeAttr(PREFIX+idx);}}
else{for(idx=0;idx<length;idx++){this.removeAttr(PREFIX+obj[idx]);}}
return this;}
$.fn.dataset=dataset;$.fn.removeDataset=remove_names;})(jQuery);(function($){function each_attr(proc){if(this.length>0){$.each(this[0].attributes,proc);}
return this;}
function fold_attr(proc,acc){return fold((this.length>0)&&this[0].attributes,proc,acc);}
function fold(object,proc,acc){var length=object&&object.length;if(acc===undefined)acc={};if(!object)return acc;if(length!==undefined){for(var i=0,value=object[i];(i<length)&&(proc.call(value,i,value,acc)!==false);value=object[++i])
{}}
else{for(var name in object){if(proc.call(object[name],name,object[name],acc)===false)break;}}
return acc;}
function fold_jquery(proc,acc){if(acc===undefined)acc=[];return fold(this,proc,acc);}
$.fn.eachAttr=each_attr;$.fn.foldAttr=fold_attr;$.fn.fold=fold_jquery;$.fold=fold;})(jQuery);(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(!fx.colorInit){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);fx.colorInit=true;}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color))
return colors['transparent'];return colors[jQuery.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};})(jQuery);﻿
(function($){$.fn.stickyPanel=function(options){var options=$.extend({},$.fn.stickyPanel.defaults,options);return this.each(function(){$(window).bind("scroll.stickyPanel",{selected:$(this),options:options},Scroll);});};function Scroll(event){var node=event.data.selected;var o=event.data.options;if($(document).scrollTop()>node.offset().top){var top=0;if(o.topPadding!="undefined"){top=top+o.topPadding;}
node.data("PanelsTop",node.offset().top-top);if(o.afterDetachCSSClass!=""){node.addClass(o.afterDetachCSSClass);}
if(o.savePanelSpace==true){var width=node.outerWidth(true);var height=node.outerHeight(true);var float=node.css("float");var randomNum=Math.ceil(Math.random()*9999);node.data("PanelSpaceID","stickyPanelSpace"+randomNum);node.before("<div id='"+node.data("PanelSpaceID")+"' style='width:"+width+"px;height:"+height+"px;float:"+float+";'></div>");}
node.css({"top":top,"position":"fixed"});}
if($(document).scrollTop()<=node.data("PanelsTop")){if(o.savePanelSpace==true){$("#"+node.data("PanelSpaceID")).remove();}
node.css({"top":"auto","position":"static"});if(o.afterDetachCSSClass!=""){node.removeClass(o.afterDetachCSSClass);}}};$.fn.stickyPanel.defaults={topPadding:0,afterDetachCSSClass:"",savePanelSpace:false};})(jQuery);(function($){var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();$.client={os:BrowserDetect.OS,browser:BrowserDetect.browser,version:BrowserDetect.version};})(jQuery);var PluginDetect={version:"0.7.5",name:"PluginDetect",handler:function(c,b,a){return function(){c(b,a)}},isDefined:function(b){return typeof b!="undefined"},isArray:function(b){return(/array/i).test(Object.prototype.toString.call(b))},isFunc:function(b){return typeof b=="function"},isString:function(b){return typeof b=="string"},isNum:function(b){return typeof b=="number"},isStrNum:function(b){return(typeof b=="string"&&(/\d/).test(b))},getNumRegx:/[\d][\d\.\_,-]*/,splitNumRegx:/[\.\_,-]/g,getNum:function(b,c){var d=this,a=d.isStrNum(b)?(d.isDefined(c)?new RegExp(c):d.getNumRegx).exec(b):null;return a?a[0]:null},compareNums:function(h,f,d){var e=this,c,b,a,g=parseInt;if(e.isStrNum(h)&&e.isStrNum(f)){if(e.isDefined(d)&&d.compareNums){return d.compareNums(h,f)}c=h.split(e.splitNumRegx);b=f.split(e.splitNumRegx);for(a=0;a<Math.min(c.length,b.length);a++){if(g(c[a],10)>g(b[a],10)){return 1}if(g(c[a],10)<g(b[a],10)){return-1}}}return 0},formatNum:function(b,c){var d=this,a,e;if(!d.isStrNum(b)){return null}if(!d.isNum(c)){c=4}c--;e=b.replace(/\s/g,"").split(d.splitNumRegx).concat(["0","0","0","0"]);for(a=0;a<4;a++){if(/^(0+)(.+)$/.test(e[a])){e[a]=RegExp.$2}if(a>c||!(/\d/).test(e[a])){e[a]="0"}}return e.slice(0,4).join(",")},$$hasMimeType:function(a){return function(d){if(!a.isIE&&d){var c,b,e,f=a.isString(d)?[d]:d;if(!f||!f.length){return null}for(e=0;e<f.length;e++){if(/[^\s]/.test(f[e])&&(c=navigator.mimeTypes[f[e]])&&(b=c.enabledPlugin)&&(b.name||b.description)){return c}}}return null}},findNavPlugin:function(l,e,c){var j=this,h=new RegExp(l,"i"),d=(!j.isDefined(e)||e)?/\d/:0,k=c?new RegExp(c,"i"):0,a=navigator.plugins,g="",f,b,m;for(f=0;f<a.length;f++){m=a[f].description||g;b=a[f].name||g;if((h.test(m)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))||(h.test(b)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))){if(!k||!(k.test(m)||k.test(b))){return a[f]}}}return null},getMimeEnabledPlugin:function(a,f){var e=this,b,c=new RegExp(f,"i"),d="";if((b=e.hasMimeType(a))&&(b=b.enabledPlugin)&&(c.test(b.description||d)||c.test(b.name||d))){return b}return 0},AXO:window.ActiveXObject,getAXO:function(b){var f=null,d,c=this,a;try{f=new c.AXO(b)}catch(d){}return f},convertFuncs:function(g){var a,h,f,b=/^[\$][\$]/,d={},c=this;for(a in g){if(b.test(a)){d[a]=1}}for(a in d){try{h=a.slice(2);if(h.length>0&&!g[h]){g[h]=g[a](g);delete g[a]}}catch(f){}}},initScript:function(){var c=this,a=navigator,e="/",i=a.userAgent||"",g=a.vendor||"",b=a.platform||"",h=a.product||"";c.OS=100;if(b){var f,d=["Win",1,"Mac",2,"Linux",3,"FreeBSD",4,"iPhone",21.1,"iPod",21.2,"iPad",21.3,"Win.*CE",22.1,"Win.*Mobile",22.2,"Pocket\\s*PC",22.3,"",100];for(f=d.length-2;f>=0;f=f-2){if(d[f]&&new RegExp(d[f],"i").test(b)){c.OS=d[f+1];break}}}c.convertFuncs(c);c.isIE=new Function("return "+e+"*@cc_on!@*"+e+"false")();c.verIE=c.isIE&&(/MSIE\s*(\d+\.?\d*)/i).test(i)?parseFloat(RegExp.$1,10):null;c.ActiveXEnabled=false;if(c.isIE){var f,j=["Msxml2.XMLHTTP","Msxml2.DOMDocument","Microsoft.XMLDOM","ShockwaveFlash.ShockwaveFlash","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary","wmplayer.ocx"];for(f=0;f<j.length;f++){if(c.getAXO(j[f])){c.ActiveXEnabled=true;break}}c.head=c.isDefined(document.getElementsByTagName)?document.getElementsByTagName("head")[0]:null}c.isGecko=(/Gecko/i).test(h)&&(/Gecko\s*\/\s*\d/i).test(i);c.verGecko=c.isGecko?c.formatNum((/rv\s*\:\s*([\.\,\d]+)/i).test(i)?RegExp.$1:"0.9"):null;c.isSafari=(/Safari\s*\/\s*\d/i).test(i)&&(/Apple/i).test(g);c.isChrome=(/Chrome\s*\/\s*(\d[\d\.]*)/i).test(i);c.verChrome=c.isChrome?c.formatNum(RegExp.$1):null;c.isOpera=(/Opera\s*[\/]?\s*(\d+\.?\d*)/i).test(i);c.verOpera=c.isOpera&&((/Version\s*\/\s*(\d+\.?\d*)/i).test(i)||1)?parseFloat(RegExp.$1,10):null;c.addWinEvent("load",c.handler(c.runWLfuncs,c))},init:function(c){var b=this,a,c;if(!b.isString(c)){return-3}if(c.length==1){b.getVersionDelimiter=c;return-3}c=c.toLowerCase().replace(/\s/g,"");a=b[c];if(!a||!a.getVersion){return-3}b.plugin=a;if(!b.isDefined(a.installed)){a.installed=a.version=a.version0=a.getVersionDone=null;a.$=b;a.pluginName=c}b.garbage=false;if(b.isIE&&!b.ActiveXEnabled){if(a!==b.java){return-2}}return 1},fPush:function(b,a){var c=this;if(c.isArray(a)&&(c.isFunc(b)||(c.isArray(b)&&b.length>0&&c.isFunc(b[0])))){a.push(b)}},callArray:function(b){var c=this,a;if(c.isArray(b)){for(a=0;a<b.length;a++){if(b[a]===null){return}c.call(b[a]);b[a]=null}}},call:function(c){var b=this,a=b.isArray(c)?c.length:-1;if(a>0&&b.isFunc(c[0])){c[0](b,a>1?c[1]:0,a>2?c[2]:0,a>3?c[3]:0)}else{if(b.isFunc(c)){c(b)}}},$$isMinVersion:function(a){return function(h,g,d,c){var e=a.init(h),f,b=-1,j;if(e<0){return e}f=a.plugin;g=a.formatNum(a.isNum(g)?g.toString():(a.isStrNum(g)?a.getNum(g):"0"));if(f.getVersionDone!=1){f.getVersion(g,d,c);if(f.getVersionDone===null){f.getVersionDone=1}}a.cleanup();if(f.installed!==null){b=f.installed<=0.5?f.installed:(f.installed==0.7?1:(f.version===null?0:(a.compareNums(f.version,g,f)>=0?1:-1)))};return b}},getVersionDelimiter:",",$$getVersion:function(a){return function(g,d,c){var e=a.init(g),f,b,h;if(e<0){return null};f=a.plugin;if(f.getVersionDone!=1){f.getVersion(null,d,c);if(f.getVersionDone===null){f.getVersionDone=1}}a.cleanup();b=(f.version||f.version0);b=b?b.replace(a.splitNumRegx,a.getVersionDelimiter):b;return b}},$$getInfo:function(a){return function(g,d,c){var b={},e=a.init(g),f;if(e<0){return b};f=a.plugin;if(f.getInfo){if(f.getVersionDone===null){a.isMinVersion?a.isMinVersion(g,"0",d,c):a.getVersion(g,d,c)}b=f.getInfo()}return b}},cleanup:function(){var a=this;if(a.garbage&&a.isDefined(window.CollectGarbage)){window.CollectGarbage()}},addWinEvent:function(d,c){var e=this,a=window,b;if(e.isFunc(c)){if(a.addEventListener){a.addEventListener(d,c,false)}else{if(a.attachEvent){a.attachEvent("on"+d,c)}else{b=a["on"+d];a["on"+d]=e.winHandler(c,b)}}}},winHandler:function(d,c){return function(){d();if(typeof c=="function"){c()}}},WLfuncs0:[],WLfuncs:[],runWLfuncs:function(a){a.winLoaded=true;a.callArray(a.WLfuncs0);a.callArray(a.WLfuncs);if(a.onDoneEmptyDiv){a.onDoneEmptyDiv()}},winLoaded:false,$$onWindowLoaded:function(a){return function(b){if(a.winLoaded){a.call(b)}else{a.fPush(b,a.WLfuncs)}}},$$beforeInstantiate:function(a){return function(e,d){var b=a.init(e),c=a.plugin;if(b==-3){return};if(!a.isArray(c.BIfuncs)){c.BIfuncs=[]}a.fPush(d,c.BIfuncs)}},$$onDetectionDone:function(a){return function(h,g,c,b){var d=a.init(h),j,e;if(d==-3){return-1}e=a.plugin;if(!a.isArray(e.funcs)){e.funcs=[]}if(e.getVersionDone!=1){j=a.isMinVersion?a.isMinVersion(h,"0",c,b):a.getVersion(h,c,b)}if(e.installed!=-0.5&&e.installed!=0.5){a.call(g);return 1}if(e.NOTF){a.fPush(g,e.funcs);return 0}return 1}},div:null,divWidth:50,pluginSize:1,emptyDiv:function(){var c=this,a,e,b,d=0;if(c.div&&c.div.childNodes){for(a=c.div.childNodes.length-1;a>=0;a--){b=c.div.childNodes[a];if(b&&b.childNodes){if(d==0){for(e=b.childNodes.length-1;e>=0;e--){b.removeChild(b.childNodes[e])}c.div.removeChild(b)}else{}}}}},DONEfuncs:[],onDoneEmptyDiv:function(){var c=this,a,b;if(!c.winLoaded){return}if(c.WLfuncs&&c.WLfuncs.length&&c.WLfuncs[c.WLfuncs.length-1]!==null){return}for(a in c){b=c[a];if(b&&b.funcs){if(b.OTF==3){return}if(b.funcs.length&&b.funcs[b.funcs.length-1]!==null){return}}}for(a=0;a<c.DONEfuncs.length;a++){c.callArray(c.DONEfuncs)}c.emptyDiv()},getWidth:function(c){if(c){var a=c.scrollWidth||c.offsetWidth,b=this;if(b.isNum(a)){return a}}return-1},getTagStatus:function(m,g,a,b){var c=this,f,k=m.span,l=c.getWidth(k),h=a.span,j=c.getWidth(h),d=g.span,i=c.getWidth(d);if(!k||!h||!d||!c.getDOMobj(m)){return-2}if(j<i||l<0||j<0||i<0||i<=c.pluginSize||c.pluginSize<1){return 0}if(l>=i){return-1}try{if(l==c.pluginSize&&(!c.isIE||c.getDOMobj(m).readyState==4)){if(!m.winLoaded&&c.winLoaded){return 1}if(m.winLoaded&&c.isNum(b)){if(!c.isNum(m.count)){m.count=b}if(b-m.count>=10){return 1}}}}catch(f){}return 0},getDOMobj:function(g,a){var f,d=this,c=g?g.span:0,b=c&&c.firstChild?1:0;try{if(b&&a){c.firstChild.focus()}}catch(f){}return b?c.firstChild:null},setStyle:function(b,g){var f=b.style,a,d,c=this;if(f&&g){for(a=0;a<g.length;a=a+2){try{f[g[a]]=g[a+1]}catch(d){}}}},insertDivInBody:function(i){var g,d=this,h="pd33993399",c=null,f=document,b="<",a=(f.getElementsByTagName("body")[0]||f.body);if(!a){try{f.write(b+'div id="'+h+'">o'+b+"/div>");c=f.getElementById(h)}catch(g){}}a=(f.getElementsByTagName("body")[0]||f.body);if(a){if(a.firstChild&&d.isDefined(a.insertBefore)){a.insertBefore(i,a.firstChild)}else{a.appendChild(i)}if(c){a.removeChild(c)}}else{}},insertHTML:function(g,b,h,a,k){var l,m=document,j=this,q,o=m.createElement("span"),n,i,f="<";var c=["outlineStyle","none","borderStyle","none","padding","0px","margin","0px","visibility","visible"];if(!j.isDefined(a)){a=""}if(j.isString(g)&&(/[^\s]/).test(g)){q=f+g+' width="'+j.pluginSize+'" height="'+j.pluginSize+'" ';for(n=0;n<b.length;n=n+2){if(/[^\s]/.test(b[n+1])){q+=b[n]+'="'+b[n+1]+'" '}}q+=">";for(n=0;n<h.length;n=n+2){if(/[^\s]/.test(h[n+1])){q+=f+'param name="'+h[n]+'" value="'+h[n+1]+'" />'}}q+=a+f+"/"+g+">"}else{q=a}if(!j.div){j.div=m.createElement("div");i=m.getElementById("plugindetect");if(i){j.div=i}else{j.div.id="plugindetect";j.insertDivInBody(j.div)}j.setStyle(j.div,c.concat(["width",j.divWidth+"px","height",(j.pluginSize+3)+"px","fontSize",(j.pluginSize+3)+"px","lineHeight",(j.pluginSize+3)+"px","verticalAlign","baseline","display","block"]));if(!i){j.setStyle(j.div,["position","absolute","right","0px","top","0px"])}}if(j.div&&j.div.parentNode){if(k&&k.BIfuncs&&k.BIfuncs.length&&k.BIfuncs[k.BIfuncs.length-1]!==null){j.callArray(k.BIfuncs)};j.div.appendChild(o);j.setStyle(o,c.concat(["fontSize",(j.pluginSize+3)+"px","lineHeight",(j.pluginSize+3)+"px","verticalAlign","baseline","display","inline"]));try{if(o&&o.parentNode){o.focus()}}catch(l){}try{o.innerHTML=q}catch(l){}if(o.childNodes.length==1&&!(j.isGecko&&j.compareNums(j.verGecko,"1,5,0,0")<0)){j.setStyle(o.firstChild,c.concat(["display","inline"]))}return{span:o,winLoaded:j.winLoaded,tagName:(j.isString(g)?g:"")}}return{span:null,winLoaded:j.winLoaded,tagName:""}},java:{mimeType:["application/x-java-applet","application/x-java-vm","application/x-java-bean"],mimeTypeJPI:"application/x-java-applet;jpi-version=",classID:"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93",DTKclassID:"clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA",DTKmimeType:["application/java-deployment-toolkit","application/npruntime-scriptable-plugin;DeploymentToolkit"],forceVerifyTag:[],jar:[],Enabled:navigator.javaEnabled(),VENDORS:["Sun Microsystems Inc.","Apple Computer, Inc."],OTF:null,All_versions:[],mimeTypeJPIresult:"",JavaPlugin_versions:[],JavaVersions:[[1,9,2,30],[1,8,2,30],[1,7,2,30],[1,6,1,30],[1,5,1,30],[1,4,2,30],[1,3,1,30]],searchJavaPluginAXO:function(){var h=null,a=this,c=a.$,g=[],j=[1,5,0,14],i=[1,6,0,2],f=[1,3,1,0],e=[1,4,2,0],d=[1,5,0,7],b=false;if(!c.ActiveXEnabled){return null};b=true;if(c.verIE>=a.minIEver){g=a.searchJavaAXO(i,i,b);if(g.length>0&&b){g=a.searchJavaAXO(j,j,b)}}else{if(b){g=a.searchJavaAXO(d,d,true)};if(g.length==0){g=a.searchJavaAXO(f,e,false)}}if(g.length>0){h=g[0]}a.JavaPlugin_versions=[].concat(g);return h},searchJavaAXO:function(l,i,m){var n,f,h=this.$,q,k,a,e,g,j,b,r=[];if(h.compareNums(l.join(","),i.join(","))>0){i=l}i=h.formatNum(i.join(","));var o,d="1,4,2,0",c="JavaPlugin."+l[0]+""+l[1]+""+l[2]+""+(l[3]>0?("_"+(l[3]<10?"0":"")+l[3]):"");for(n=0;n<this.JavaVersions.length;n++){f=this.JavaVersions[n];q="JavaPlugin."+f[0]+""+f[1];g=f[0]+"."+f[1]+".";for(a=f[2];a>=0;a--){b="JavaWebStart.isInstalled."+g+a+".0";if(h.compareNums(f[0]+","+f[1]+","+a+",0",i)>=0&&!h.getAXO(b)){continue}o=h.compareNums(f[0]+","+f[1]+","+a+",0",d)<0?true:false;for(e=f[3];e>=0;e--){k=a+"_"+(e<10?"0"+e:e);j=q+k;if(h.getAXO(j)&&(o||h.getAXO(b))){r.push(g+k);if(!m){return r}}if(j==c){return r}}if(h.getAXO(q+a)&&(o||h.getAXO(b))){r.push(g+a);if(!m){return r}}if(q+a==c){return r}}}return r},minIEver:7,getMimeJPIversion:function(){var h,a=this,d=a.$,c=new RegExp("("+a.mimeTypeJPI+")(\\d.*)","i"),k=new RegExp("Java","i"),e,j,f="",i={},g=0,b;for(h=0;h<navigator.mimeTypes.length;h++){j=navigator.mimeTypes[h];if(c.test(j.type)&&(e=j.enabledPlugin)&&(j=RegExp.$2)&&(k.test(e.description||f)||k.test(e.name||f))){i["a"+d.formatNum(j)]=j}}b="0,0,0,0";for(h in i){g++;e=h.slice(1);if(d.compareNums(e,b)>0){b=e}}a.mimeTypeJPIresult=g>0?a.mimeTypeJPI+i["a"+b]:"";return g>0?b:null},getVersion:function(m,d,l){var f,c=this,e=c.$,h=c.NOTF,b=c.applet,j=c.verify,i=vendor=versionEnabled=null;if(c.getVersionDone===null){c.OTF=0;c.mimeObj=e.hasMimeType(c.mimeType);c.deployTK.$=e;c.deployTK.parentNode=c;b.$=e;b.parentNode=c;if(h){h.$=e;h.parentNode=c}if(j){j.parentNode=c;j.$=e;j.init()}}var k;if(e.isArray(l)){for(k=0;k<b.allowed.length;k++){if(e.isNum(l[k])){b.allowed[k]=l[k]}}}for(k=0;k<c.forceVerifyTag.length;k++){b.allowed[k]=c.forceVerifyTag[k]}if(e.isString(d)){c.jar.push(d)}if(c.getVersionDone==0){if(!c.version||b.canTryAny()){f=b.insertHTMLQueryAll(d);if(f[0]){c.installed=1;c.EndGetVersion(f[0],f[1])}}return}var g=c.deployTK.query();if(g.JRE){i=g.JRE;vendor=c.VENDORS[0]}if(!e.isIE){var q,n,a,o;o=(c.mimeObj&&c.Enabled)?true:false;if(!i&&(f=c.getMimeJPIversion())!==null){i=f}if(!i&&c.mimeObj){f="Java[^\\d]*Plug-in";a=e.findNavPlugin(f);if(a){f=new RegExp(f,"i");q=f.test(a.description||"")?e.getNum(a.description):null;n=f.test(a.name||"")?e.getNum(a.name):null;if(q&&n){i=(e.compareNums(e.formatNum(q),e.formatNum(n))>=0)?q:n}else{i=q||n}}}if(!i&&c.mimeObj&&e.isSafari&&e.OS==2){a=e.findNavPlugin("Java.*\\d.*Plug-in.*Cocoa",0);if(a){q=e.getNum(a.description);if(q){i=q}}}if(i){c.version0=i;if(c.Enabled){versionEnabled=i}}}else{if(!i&&g.status==0){i=c.searchJavaPluginAXO();if(i){vendor=c.VENDORS[0]}}if(i){c.version0=i;if(c.Enabled&&e.ActiveXEnabled){versionEnabled=i}}}if(!versionEnabled||b.canTryAny()){f=b.insertHTMLQueryAll(d);if(f[0]){versionEnabled=f[0];vendor=f[1]}}if(!versionEnabled&&(f=c.queryWithoutApplets())[0]){c.version0=versionEnabled=f[0];vendor=f[1];if(c.installed==-0.5){c.installed=0.5}}if(e.isSafari&&e.OS==2){if(!versionEnabled&&o){if(c.installed===null){c.installed=0}else{if(c.installed==-0.5){c.installed=0.5}}}}if(c.jreDisabled()){versionEnabled=null};if(c.isPlugin2==0&&(f=c.mimeObj)&&(f=f.enabledPlugin)&&(f=f.description)){if((/Next.*Generation.*Java.*Plug-in/i).test(f)){c.isPlugin2=1}else{if((/Classic.*Java.*Plug-in/i).test(f)){c.isPlugin2=-1}}};if(c.installed===null){c.installed=versionEnabled?1:(i?-0.2:-1)}c.EndGetVersion(versionEnabled,vendor)},EndGetVersion:function(b,d){var a=this,c=a.$;if(a.version0){a.version0=c.formatNum(c.getNum(a.version0))}if(b){a.version=c.formatNum(c.getNum(b));a.vendor=(c.isString(d)?d:"")}if(a.getVersionDone!=1){a.getVersionDone=0}},jreDisabled:function(){var b=this,d=b.$,c=b.deployTK.query().JRE,a;if(c&&d.OS==1){if((d.isGecko&&d.compareNums(d.verGecko,"1,9,2,0")>=0&&d.compareNums(c,"1,6,0,12")<0)||(d.isChrome&&d.compareNums(c,"1,6,0,12")<0)){return 1}};if(d.OS==3&&(a=b.mimeObj)&&(a=a.enabledPlugin)&&(a=a.description)&&(/Next.*Generation.*Java.*Plug-in/i).test(a)&&b.isPlugin2<2&&!b.Browser4Plugin2()){return 1};if(d.isOpera&&d.verOpera>=9&&!b.Enabled&&!b.mimeObj&&!b.queryWithoutApplets()[0]){return 1}if((d.isGecko||d.isChrome)&&!b.mimeObj&&!b.queryWithoutApplets()[0]){return 1}return 0},deployTK:{status:null,JREall:[],JRE:null,HTML:null,query:function(){var f=this,h=f.$,c=f.parentNode,i,a,b,g=len=null;if(f.status!==null){return f}f.status=0;if((h.isGecko&&h.compareNums(h.verGecko,h.formatNum("1.6"))<=0)||h.isSafari||h.isChrome||(h.isIE&&!h.ActiveXEnabled)){return f}if(h.isIE&&h.verIE>=6){f.HTML=h.insertHTML("object",[],[]);g=h.getDOMobj(f.HTML)}else{if(!h.isIE&&(b=h.hasMimeType(c.DTKmimeType))&&b.type){f.HTML=h.insertHTML("object",["type",b.type],[]);g=h.getDOMobj(f.HTML)}}if(g){if(h.isIE&&h.verIE>=6){try{g.classid=c.DTKclassID}catch(i){}};try{if(Math.abs(c.isPlugin2)<2){c.isPlugin2=g.isPlugin2()?2:-2}}catch(i){};try{var d=g.jvms;if(d){len=d.getLength();if(h.isNum(len)){f.status=len>0?1:-1;for(a=0;a<len;a++){b=h.getNum(d.get(len-1-a).version);if(b){f.JREall[a]=b}}}}}catch(i){}}if(f.JREall.length>0){f.JRE=h.formatNum(f.JREall[0])}return f}},queryWithoutApplets00:function(c,a){var b=window.java,d;try{if(b&&b.lang&&b.lang.System){a.value=[b.lang.System.getProperty("java.version")+" ",b.lang.System.getProperty("java.vendor")+" "]}}catch(d){}},queryWithoutApplets:function(){var c=this,f=c.$,g,a=c.queryWithoutApplets;if(!a.value){a.value=[null,null];if(!f.isIE&&window.java){if(f.OS==2&&f.isOpera&&f.verOpera<9.2&&f.verOpera>=9){}else{if(f.isGecko&&f.compareNums(f.verGecko,"1,9,0,0")<0&&f.compareNums(f.verGecko,"1,8,0,0")>=0){}else{if(f.isGecko){var i,b,h=document;if(h.createElement&&h.createEvent){try{i=h.createElement("div"),b=h.createEvent("HTMLEvents");b.initEvent("change",false,false);i.addEventListener("change",f.handler(c.queryWithoutApplets00,f,a),false);i.dispatchEvent(b)}catch(g){}}}else{c.queryWithoutApplets00(f,a)}}}}}return a.value},applet:{results:[[null,null],[null,null],[null,null]],HTML:[0,0,0],active:[0,0,0],allowed:[2,2,2],DummyObjTagHTML:0,DummySpanTagHTML:0,getResult:function(){var c=this.results,a,b;for(a=0;a<c.length;a++){b=c[a];if(b[0]){break}}return[].concat(b)},canTry:function(d){var b=this,c=b.$,a=b.parentNode;if(b.allowed[d]==3){return true}if(!a.version0||!a.Enabled||(c.isIE&&!c.ActiveXEnabled)){if(b.allowed[d]==2){return true}if(b.allowed[d]==1&&!b.getResult()[0]){return true}}return false},canTryAny:function(){var b=this,a;for(a=0;a<b.allowed.length;a++){if(b.canTry(a)){return true}}return false},canUseAppletTag:function(){var b=this,c=b.$,a=b.parentNode;return(!c.isIE||a.Enabled)},canUseObjectTag:function(){var a=this,b=a.$;return(!b.isIE||b.ActiveXEnabled)},queryThis:function(h){var g,c=this,b=c.parentNode,f=b.$,a=vendor=null,d=f.getDOMobj(c.HTML[h],true);if(d){try{a=d.getVersion()+" ";vendor=d.getVendor()+" ";d.statusbar(f.winLoaded?" ":" ")}catch(g){}if(f.isStrNum(a)){c.results[h]=[a,vendor]}try{if(f.isIE&&a&&d.readyState!=4){f.garbage=true;d.parentNode.removeChild(d)}}catch(g){};if(a&&Math.abs(b.isPlugin2)<2){b.isPlugin2=-2;try{if(b.minJRE4Plugin2(a)&&d.Packages.java.applet){b.isPlugin2=2}}catch(g){}}}},insertHTMLQueryAll:function(e){var g=this,n=g.parentNode,d=n.$,o=g.results,q=g.HTML,h="&nbsp;&nbsp;&nbsp;&nbsp;",u="A.class";if(!d.isString(e)||!(/\.jar\s*$/).test(e)||(/\\/).test(e)){return[null,null]}if(n.OTF<1){n.OTF=1}if(n.jreDisabled()){return[null,null]}if(n.OTF<2){n.OTF=2}var c=e,t="",m;if((/[\/]/).test(e)){m=e.split("/");c=m[m.length-1];m[m.length-1]="";t=m.join("/")}var j=["archive",c,"code",u],l=["mayscript","true"],r=["scriptable","true"].concat(l),f=!d.isIE&&n.mimeObj&&n.mimeObj.type?n.mimeObj.type:n.mimeType[0];if(!q[0]&&g.canUseObjectTag()&&g.canTry(0)){q[0]=d.isIE?d.insertHTML("object",["type",f].concat(j),["codebase",t].concat(j).concat(r),h,n):d.insertHTML("object",["type",f,"archive",c,"classid","java:"+u],["codebase",t,"archive",c].concat(r),h,n);o[0]=[0,0];g.queryThis(0)}if(!q[1]&&g.canUseAppletTag()&&g.canTry(1)){q[1]=d.isIE?d.insertHTML("applet",["alt",h].concat(l).concat(j),["codebase",t].concat(l),h,n):d.insertHTML("applet",["codebase",t,"alt",h].concat(l).concat(j),[].concat(l),h,n);o[1]=[0,0];g.queryThis(1)}if(!q[2]&&g.canUseObjectTag()&&g.canTry(2)){q[2]=d.isIE?d.insertHTML("object",["classid",n.classID],["codebase",t].concat(j).concat(r),h,n):d.insertHTML();o[2]=[0,0];g.queryThis(2)}if(!g.DummyObjTagHTML&&g.canUseObjectTag()){g.DummyObjTagHTML=d.insertHTML("object",[],[],h)}if(!g.DummySpanTagHTML){g.DummySpanTagHTML=d.insertHTML("",[],[],h)};if(n.OTF<3&&((q[0]&&!o[0][0])||(q[1]&&!o[1][0])||(d.isIE&&q[2]&&!o[2][0]))){var i=n.NOTF,b=i.isJavaActive();if(b>=0){n.OTF=3;n.installed=b==1?0.5:-0.5;i.onIntervalQuery=d.handler(i.$$onIntervalQuery,i);if(!d.winLoaded){d.WLfuncs0.push([i.winOnLoadQuery,i])}setTimeout(i.onIntervalQuery,i.intervalLength)}};var k,a=0;for(k=0;k<o.length;k++){if(q[k]||g.canTry(k)){a++}else{break}}if(a==o.length){n.getVersionDone=n.forceVerifyTag.length>0?0:1}return g.getResult()}},NOTF:{count:0,countMax:25,intervalLength:250,isJavaActive:function(){var e=this,c=e.parentNode,a,b,d=-9;for(a=0;a<c.applet.HTML.length;a++){b=e.isAppletActive(a);c.applet.active[a]=b;if(b>d){d=b}}return d},isAppletActive:function(g){var h=this,d=h.$,c=h.parentNode,b=c.applet,f,a=d.getTagStatus(b.HTML[g],b.DummySpanTagHTML,b.DummyObjTagHTML,h.count);if(a==-2){return-2}try{if(d.isIE&&d.verIE>=c.minIEver&&d.getDOMobj(b.HTML[g]).object){return 1}}catch(f){}if(a==1&&(d.isIE||((c.version0&&c.Enabled&&c.Enabled)||c.queryWithoutApplets()[0]))){return 1}if(a<0){return-1}return 0},winOnLoadQuery:function(c,d){var b=d.parentNode,a;if(b.OTF==3){a=d.queryAllApplets();d.queryCompleted(a[1],a[2])}},$$onIntervalQuery:function(d){var c=d.$,b=d.parentNode,a;if(b.OTF==3){a=d.queryAllApplets();if(a[0]||(c.winLoaded&&d.count>d.countMax)){d.queryCompleted(a[1],a[2])}}d.count++;if(b.OTF==3){setTimeout(d.onIntervalQuery,d.intervalLength)}},queryAllApplets:function(){var g=this,f=g.$,e=g.parentNode,d=e.applet,b,a,c;for(b=0;b<d.results.length;b++){d.queryThis(b)}a=d.getResult();c=(a[0]||g.isJavaActive()<0)?true:false;return[c,a[0],a[1]]},queryCompleted:function(c,f){var e=this,d=e.$,b=e.parentNode;if(b.OTF==4){return}b.OTF=4;var a=e.isJavaActive()==1?true:false;if(c||b.queryWithoutApplets()[0]){b.installed=1}else{if(a){if(b.version0){b.installed=1;c=b.version0}else{b.installed=0}}else{if(b.installed==0.5){b.installed=0}else{if(b.version0){b.installed=-0.2}else{b.installed=-1}}}}b.EndGetVersion(c,f);if(b.funcs){d.callArray(b.funcs)}if(d.onDoneEmptyDiv){d.onDoneEmptyDiv()}}},append:function(e,d){for(var c=0;c<d.length;c++){e.push(d[c])}},isPlugin2:0,minJRE4Plugin2:function(a){var c=this.$,b=c.formatNum(c.getNum(a));return b?(c.compareNums(b,"1,6,0,10")>=0):0},Browser4Plugin2:function(){var a=this.$;if(a.isIE){if(a.verIE<6){return 0}}else{if(a.isGecko&&a.compareNums(a.verGecko,"1,9,0,0")<0){return 0}}return 1},getInfo:function(){var b=this,e=b.$,a=b.applet,j,o=b.installed,i=b.deployTK.query(),h=a.results,m=-1,q={All_versions:[],DeployTK_versions:[],DeploymentToolkitPlugin:(i.status==0?null:e.getDOMobj(i.HTML)),vendor:(e.isString(b.vendor)?b.vendor:""),OTF:(b.OTF<3?0:(b.OTF==3?1:2)),PLUGIN:null};if(o==1&&b.minJRE4Plugin2(b.version)){if(b.isPlugin2<0||(b.isPlugin2<2&&!b.Browser4Plugin2())){}else{m=b.isPlugin2>0?1:0}}q.isPlugin2=m;for(j=0;j<h.length;j++){if(h[j][0]){q.PLUGIN=e.getDOMobj(a.HTML[j]);break}}var g=[null,null,null];for(j=0;j<h.length;j++){if(h[j][0]){g[j]=1}else{if(a.active[j]==1){g[j]=0}else{if(a.allowed[j]>=1&&b.OTF!=3){if((j==1&&!a.canUseAppletTag())||(j!=1&&!a.canUseObjectTag())||o==-0.2||o==-1||a.active[j]<0||(j==2&&(!e.isIE||(/Microsoft/i).test(q.vendor)))){g[j]=-1}}}}}q.objectTag=g[0];q.appletTag=g[1];q.objectTagActiveX=g[2];var d=q.All_versions,n=q.DeployTK_versions,c=b.JavaPlugin_versions;b.append(n,i.JREall);b.append(d,(n.length>0?n:(c.length>0?c:(e.isString(b.version)?[b.version]:[]))));for(j=0;j<d.length;j++){d[j]=e.formatNum(e.getNum(d[j]))}var k,f=null;if(!e.isIE){k=b.mimeObj||e.hasMimeType(b.mimeTypeJPIresult);if(k){f=k.enabledPlugin}}q.name=f?f.name:"";q.description=f?f.description:"";var l=null;if((o==0||o==1)&&q.vendor==""){if(e.OS==2){l=b.VENDORS[1]}else{if(!e.isIE&&e.OS==1){l=b.VENDORS[0]}else{if(e.OS==3){l=b.VENDORS[0]}}}if(l){q.vendor=l}}return q},JavaFix:function(){}},zz:0};PluginDetect.initScript();if(!$.skiclubz)$.skiclubz={};$.skiclubz.checkJavaCompatibility=function(compatibleCallback){var javaVersion=-1,javaStatus=-1;javaStatus=PluginDetect.isMinVersion('Java','1.5.0',$.skiclubz.CDNBaseUrl+'/java/uploader/getJavaInfo.jar',[0,2,0]);var showWarning=function(title,message){$(function(){$('body').prepend('\
    <div class="overlay section" id="uploaderWarning">\
     <a class="close closex" href="#close">close</a>\
     <div class="in">\
      <h2 class="title">'+title+'</h2>\
      <div class="message">'+message+'</div>\
     </div>\
    </div>\
   ').find('#uploaderWarning').overlay({top:'20%',load:true});});};PluginDetect.onDetectionDone('Java',function(){var compatible=true;switch(PluginDetect.OS){case 1:break;case 2:if(PluginDetect.isChrome){showWarning('Google Chrome Warning','There is a bug in Java for Google Chrome on Mac OS X which causes the uploaders to not work. We currently recommend using Safari to upload videos.');compatible=false;}
break;default:showWarning('Sorry!','<p>Our video uploaders are currently only supported on Windows and OS X 10.4.9 and higher.  Please <a href="'+$.skiclubz.baseUrl+'/site/contact" target="_blank">contact us<a/> if you would like us to add support for your operating system.</p>');compatible=false;break;};if(compatible){javaStatus=PluginDetect.isMinVersion('Java','1.5.0');javaVersion=PluginDetect.getVersion('Java');if(javaStatus!=1){compatible=false;switch(PluginDetect.OS){case 1:showWarning('Please Install Java','<p>To use our video uploaders, you must install <strong>Java</strong>.<br>Please download &amp; install the Java plugin from the link below:</p> <a href="http://www.java.com/download/" target="_blank"><img src="'+$.skiclubz.CDNBaseUrl+'/images/style/java-logo.png">Java Plugin</a>');break;case 2:showWarning('Please Update Java','<p>To use our video uploaders, you must update <strong>Java</strong>.<br>Please run <a href="http://support.apple.com/kb/HT1338" target="_blank">Apple Software Update</a> (<strong>Apple Menu &raquo; Software Update</strong>).  For more information, visit the link below:</p> <a href="http://www.java.com/en/download/apple_manual.jsp" target="_blank"><img src="'+$.skiclubz.CDNBaseUrl+'/images/style/java-logo.png">Java Plugin</a>');break;default:showWarning('Sorry!','<p>Our video uploaders are currently only supported on Windows and OS X 10.4.9 and higher.  Please <a href="'+$.skiclubz.baseUrl+'/site/contact" target="_blank">contact us<a/> if you would like us to add support for your operating system.</p>');break;}}}
if(compatible)compatibleCallback();});};if(!$.skiclubz)$.skiclubz={};jQuery.extend($.skiclubz,{overlays:{},videos:{},eventToCopy:{},copiedEvent:{},baseUrl:'',user:{},notificationsShown:0,initializeTabs:function(){$('ul.tabs').show().tabs('#panes > .in',{tabs:'a:not(.not-a-tab)'});},loadAssignableAthletesOnChange:function(){if(console)console.err('Not initialized yet!');},flash:function(message,type){if(typeof(message)=='object'){$.each(['success','notice','error'],function(n,type){$.skiclubz.flash(message[type],type);});}else if(typeof(message)=='string'){type=type||'notice';var flash=$('<div class="section">'+message+'</div>').addClass(type).hide();$('#flashes').append(flash.fadeIn());}},replaceFlash:function(message,type){$('#flashes').empty();$.skiclubz.flash(message,type);},imageCache:[],preloadImage:function(src){$.skiclubz.imageCache.push($('<img>').attr('src',src));},preloadImages:function(srcs){jQuery.each(srcs,function(index,src){$.skiclubz.preloadImage(src);});},initGroupTreeSelect:function(){if(console)console.log('Did you forget to include groupTreeSelect.js?');},stripNonNumeric:function(str){return str.replace(/[^0-9]/g,'');},scrollTo:function(id){if(typeof id=='string')
id='#'+id;var offsetTop=$(id).offset().top;if($(window).scrollTop()>offsetTop+50)
$(window).scrollTop(offsetTop);},cycleDots:function(element){element=$(element);var removeDots=function(){element.text(element.text().replace(/\.+$/,''));};var addDot=function(){element.append('.');};var lastThreeChars=element.text().substr(element.text().length-3,3);if(lastThreeChars=='...')removeDots();else addDot();}});$(function(){$.trackPage('UA-9026940-1');$('a').track({label:function($e){return $e.attr('title')}});$('button').track({label:function($e){return $e.parents('form').attr('action')}});$.skiclubz.initializeTabs();$(document).bind('onBeforeLoad, onLoad',function(event){var overlay=$(event.target).data('overlay');if(overlay)
$.skiclubz.overlays[overlay.getOverlay().attr('id')]=overlay;});$(document).bind('onClose',function(event){var overlay=$(event.target).data('overlay');if(overlay)
delete $.skiclubz.overlays[overlay.getOverlay().attr('id')];});$('#aside .sticky').stickyPanel({topPadding:10});$(window).load(function(){if(location.hash.search(/^#[A-Za-z][A-Za-z0-9_:\.-]*$/)!=-1&&$(location.hash).data('overlay')){$(location.hash).data('overlay').load();}});$('.overlay .close').live('click',function(){var overlay=$.skiclubz.overlays[$(this).closest('.overlay').attr('id')];if(overlay)
overlay.close();});$(document.body).ajaxComplete(function(event,xhr,ajaxOptions){if(xhr){if(xhr.getResponseHeader('X-SkiClubZ-BrowserLocation')){document.location=xhr.getResponseHeader('X-SkiClubZ-BrowserLocation');}else if(xhr.getResponseHeader('X-SkiClubZ-OpenInBlank')){window.open(xhr.getResponseHeader('X-SkiClubZ-OpenInBlank'));}}});$(document.body).ajaxSend(function(event,xhr,ajaxOptions){xhr.setRequestHeader('X-SkiClubZ-Referer',document.location);});if($.browser.msie&&parseInt($.browser.version)<8){if(document.documentMode!=undefined&&document.documentMode<8){var message='\
     <h2>Compatibility View Not Supported</h2>\
     <p>\
      Internet Explorer\'s <strong>Compatibility View</strong> is not supported by SkiClubZ. Please disable Compatibility View by going to the Tools menu and clicking the "Compatibility View" item. Please watch this <a href="http://www.youtube.com/watch?v=YSs1ulZKgCA">Internet Explorer 8 video</a> for more information.\
     </p>\
     <p>\
      Preferably, we recommend using <a href="http://google.com/chrome">Google Chrome</a> or <a href="http://apple.com/safari">Safari 4.0</a> or higher to get the best SkiClubZ video analysis experience, including keyboard shortcuts and overlays .\
     </p>';}else{var message='\
     <h2>Browser Not Supported</h2>\
     <p>\
      <strong>Internet Explorer '+parseFloat($.browser.version)+'</strong> is not supported by SkiClubZ. \
      Please upgrade your browser to one of the following:\
     </p>\
     <div class="browser-options">\
      <a class="btnalt" href="http://www.apple.com/safari/">\
       <img src="'+$.skiclubz.CDNBaseUrl+'/images/style/safari.png">\
       <br>\
       Safari\
      </a>\
      <a class="btnalt" href="http://google.com/chrome">\
       <img src="'+$.skiclubz.CDNBaseUrl+'/images/style/google-chrome.png">\
       <br>\
       Google Chrome\
      </a>\
      <a class="btnalt" href="http://microsoft.com/windows/internet-explorer">\
       <img src="'+$.skiclubz.CDNBaseUrl+'/images/style/internet-explorer.png">\
       <br>\
       Internet Explorer 8\
      </a>\
      <a class="btnalt" href="http://mozilla.com/firefox">\
       <img src="'+$.skiclubz.CDNBaseUrl+'/images/style/firefox.png">\
       <br>\
       Firefox\
      </a>\
     </div>\
     <div class="browser-experience">\
       <strong>Best video analysis experience, including keyboard shortcuts and overlays</strong>\
     </div>';}
$('body').prepend('\
   <div id="exposeMask"> </div>\
   <div class="overlay section" id="browserWarning">\
    <div class="in">\
     '+message+'\
    </div>\
   </div>\
  ').find('#browserWarning').overlay({top:'30%',load:true});}
$('.calendar .add-event a[rel]').live('click',function(event){$(this).overlay({top:'20%',load:true,onBeforeLoad:function(event){var overlay=this.getOverlay();var day=this.getTrigger().parents('.day');var dataDate=day.dataset('date');overlay.find('input.startDate').attr('value',dataDate);var prettyDate=day.attr('title');overlay.find('.startDate:not(input)').text(prettyDate);},onLoad:function(){this.getOverlay().find('.groupTreeSelect').updateText();},onClose:function(){this.getOverlay().find('form')[0].reset();}});event.preventDefault();});$('.calendar .events a[rel]').live('click',function(event){$(this).overlay({top:'20%',load:true,onBeforeLoad:function(){var event=this.getTrigger();var overlay=this.getOverlay();$.skiclubz.eventToCopy=event.dataset();$.each(event.dataset(),function(name,value){var element=overlay.find('.'+name.toLowerCase());if(element.size()){if(value)element.removeClass('null').text(value);else element.addClass('null').text('Not Set');}});overlay.find('a.view').attr('href',event.dataset('viewUrl'));var editUrl=event.dataset('editUrl');var editLink=overlay.find('a.edit');if(editUrl)editLink.show().attr('href',editUrl);else editLink.hide();}});event.preventDefault();});$('.copy').click(function(){$.skiclubz.copiedEvent=$.skiclubz.eventToCopy;delete $.skiclubz.copiedEvent.startdate;delete $.skiclubz.copiedEvent.startDate;$.skiclubz.copiedEvent.attendees=$.parseJSON($.skiclubz.copiedEvent.attendees);$('.paste').show();$.skiclubz.overlays.eventsummary.close();});$('.paste').click(function(event){event.preventDefault();var findInput=function(attribute){var name='Event['+attribute+']';return $('input, select').filter(function(){var lowercaseAttribute=$(this).attr('name').toLowerCase();return lowercaseAttribute.indexOf(name.toLowerCase())!=-1;});};$.each($.skiclubz.copiedEvent,function(name,value){var input=findInput(name);if(input)input.val(value);});var groupInputs=$('.control.attendees');$.skiclubz.overlays.createevent.getTrigger().one('onClose',function(){if($('#createevent').data('missingGroups')){$('#createevent').find('.control.attendees').replaceWith(groupInputs);$('#createevent').data('missingGroups',false);}});groupInputs.after('<div class="control attendees"><label class="list-label">Attendees</label></div>').detach();$('#createevent').data('missingGroups',true);var invited=$.skiclubz.copiedEvent.attendees.length;if(invited==1)invited+=' person';else invited+=' people';$('.control.attendees').append('<p>'+invited+'</p>');$.each($.skiclubz.copiedEvent.attendees,function(index,attendeeId){$('.control.attendees').append('<input type="hidden" name="Event[attendees][]" value="'+attendeeId+'">');});});$('.paste').hide();$("a[rel].eventinvite").overlay({top:'20%'});$(".group-view a[rel].invite").overlay({top:'20%',onBeforeLoad:function(){var form=this.getOverlay().find('div.form');form.html('Loading...');form.load(this.getTrigger().attr('href'),function(){form.find('.treeview-section ul').treeview({});});},onLoad:function(){var overlay=this.getOverlay();overlay.find('textarea:visible:first').focus();}});$('#groupinvite button[type=submit]').live('click',function(evt){evt.preventDefault();var confirmFormDiv=undefined;var inviteFormDiv=$(this).closest('.overlay').find('div.inviteWrapper');if($(this).attr('rel')&&(confirmFormDiv=$($(this).attr('rel')).find('div.form'))){confirmFormDiv.css('display','none');inviteFormDiv.parent().append(confirmFormDiv);inviteFormDiv.fadeOut(function(){confirmFormDiv.fadeIn();confirmFormDiv.find("input:radio:enabled:visible:first").attr("checked",true);$('<div class="inviteForm"> </div>').css('display','none').append(inviteFormDiv.find('form > *')).appendTo(confirmFormDiv.children('form'));});}else{var form=$(this).parents('form').get(0);$.ajax({url:form.action,context:form,data:$(form).serialize(),type:'POST',success:function(data){$(form).closest('.overlay.section').find('.form').html(data);},error:function(xhr){confirmFormDiv=$(this).closest('div.form.confirm');var errorType=xhr.getResponseHeader('X-SkiClubZ-ErrorType');if(errorType&&errorType=='Not-Allowed'&&confirmFormDiv.length){if(xhr.responseText){$('.errorMessage',confirmFormDiv).html(xhr.responseText).css('display','block');}}else{if(xhr.responseText){$('.errorMessage',inviteFormDiv).html(xhr.responseText).css('display','block');}
if(confirmFormDiv.length){$('div.inviteForm',confirmFormDiv).children().appendTo(inviteFormDiv.children('form'));confirmFormDiv.fadeOut(function(){inviteFormDiv.fadeIn();inviteFormDiv.find('button[type=submit]').removeAttr('rel');});}}}});}
return false;});$('.expander').live('click',function(){$($(this).attr('rel')).slideToggle();if($(this).hasClass('open'))
$(this).removeClass('open').addClass('closed');else if($(this).hasClass('closed'))
$(this).removeClass('closed').addClass('open');return false;});$('#switchInviteType').live('click',function(){var parent=$(this).parents('#groupinvite');var athletes=$('.athletes',parent),email=$('.email',parent),link=$(this);if(athletes.css('display')=='none'){email.fadeOut(function(){athletes.fadeIn();link.text('Or enter email addresses to invite');});}else{athletes.fadeOut(function(){email.fadeIn();link.text('Or select users to invite');$('textarea:visible:first',email).focus();});}});$('.date-ago').timeago();$(document).ajaxComplete(function(){$('.date-ago').timeago();});$('a.delete-comment').live('click',function(){var answer=confirm("Are you sure you want to delete this comment?");if(answer){var form=$(this).parents('form');$.ajax({'url':form.attr('action'),'data':form.serialize(),'type':'POST','context':form.parents('.item'),'success':function(data){$(this).remove();var numCommentsDiv=$("#comment-list > em div");var numComments=numCommentsDiv.text().split(" ");var num=0;if(numComments.length>1){num=--numComments[0];if(num==0)
numCommentsDiv.remove();else
numCommentsDiv.text(num+" "+numComments[1]);}
if(!num){var empty=$('#comment-list .items .empty');if(empty.length){empty.show();}else{empty=$('<span class="empty">Be the first to comment!</span>');$('#comment-list .items').prepend(empty);}}}});}
return false;});$('select.eventId, select.groupId').live('change',function(){var form=$(this).closest('form');$.ajax({url:$.skiclubz.baseUrl+'/group/ajaxGetAthletes',data:{id:$('select.groupId',form).val(),eventId:$('select.eventId',form).val()},success:function(data){var selectBox=form.find('select.assigneeId');var selected=$('option:selected',selectBox).val();selectBox.empty();selectBox.append('<option value="0">Unassigned</option>');if(data.athletes.length!=0){$.each(data.athletes,function(id,name){var option=$('<option value="'+id+'">'+name+'</option>');if(id==selected)option.attr('selected','selected');selectBox.append(option);});}
if(data.event){if(data.event.disciplineId)
form.find('select.disciplineId').val(data.event.disciplineId);if(data.event.typeId)
form.find('select.typeId').val(data.event.typeId);form.find('select.disciplineId').attr("disabled","disabled");form.find('select.typeId').attr("disabled","disabled");}else{form.find('select.disciplineId').removeAttr("disabled");form.find('select.typeId').removeAttr("disabled");}}});});$('#aside .video-form').live('submit',function(e){if(!$(this).data('validated')){e.preventDefault();var pk=$.skiclubz.stripNonNumeric($(this).attr('id'));$.ajax({url:$.skiclubz.baseUrl+'/video/update/',type:'POST',data:$(this).serialize()+'&ajax=video-form',dataType:'json',context:this,success:function(data){$(this).data('validated',true);$(this).find('.errorMessage').hide();$(this).submit();},error:function(xhr){try{var response=$.parseJSON(xhr.responseText),el=this;$.each(response[pk],function(key,value){$(el).find('#Video_'+pk+'_'+key+'_error').text($(this).get(0));});}catch(err){$(this).find('#Video_'+pk+'_id_error').html(xhr.responseText);}
$(this).data('validated',false);}});}});$('.edit-video').live('click',function(){$('.info').hide();$('.meta .avatar').hide();$('.claim').hide();$('.video-form').show();$('.cancel-edit-video').show();$(this).hide();return false;});$('.cancel-edit-video').live('click',function(){$('.info').show();$('.meta .avatar').show();$('.claim').show();$('.video-form').hide();$('.edit-video').show();$(this).hide();return false;});$('.claim .btn').live('click',function(e){e.preventDefault();var form=$(this).closest('form')
pk=$.skiclubz.stripNonNumeric($(this).attr('id')),select=form.find('select[name="groupId"]'),extra='aside';if($(this).closest('.items').hasClass('organize'))
extra='form';$.ajax({url:form.attr('action'),type:form.attr('method'),data:{groupId:select.val(),getExtra:extra},dataType:'json',context:this,success:function(data,status,xhr){var button=$(this),label=form.find('label');if(data.done){if(data.title)$('.video-detail .title').text(data.title);if(data.aside){$('#aside').replaceWith(data.aside);$.skiclubz.initializeTabs();}
if(data.form){var item=form.closest('.item'),editForm=item.find('.video-form');if(editForm.size()){editForm.replaceWith(data.form);}else{item.find('.meta').prepend(data.form);editForm=item.find('.video-form');}
editForm.fadeIn();item.find('.info').fadeOut();var attributes={};attributes[pk]={};item.trigger('saved',attributes);editForm.find('input[type!="submit"], select').each(function(){$(this).attr('disabled','disabled');});if(data.success){item.prepend('<div class="success">'+data.success+'</div>');delete data.success;}}}else{var options=select.attr('options');for(var group in data.data){var option=document.createElement('option');option.value=group;option.text=data.data[group];var oL=options.length;options[oL]=option;}
label.text(data.prompt);select.show();label.show();button.val('Save Changes');}
$.skiclubz.flash(data);},error:function(xhr){$.skiclubz.flash(xhr.responseText,'error');}});});$('#Group_allowsAthletes').live('click',function(event){if(!$(this).attr('checked')){var answer=confirm('Warning: this will disallow any user from joining the group as an athlete. If there are any athletes in this group they will be removed.');if(!answer){$(this).attr('checked',true);}}});$('.cancel-button').click(function(){var answer=confirm("Are you sure you want to cancel this?")
if(answer){$(this).parents('form').submit();}
else
{return false;}});$('#inviteuser select[name=groupFilter]').change(function(){var groupId=$(this).find('option:selected').attr('value');if(groupId=='all')$('#inviteuser .user').show();else{$('#inviteuser .user').hide();$('#inviteuser .user [data-group'+groupId+']').parents('.user').show();}});$('.uploadMenu ul li a').live('click',function(event){var uploadMenu=$(event.target).closest('.uploadMenu');var remember=uploadMenu.find('.remember input').first();if(remember&&remember.attr('checked')){event.target.href+="/save/true";}
return true;});$('#requests .requestitem .countLink').live('click',function(event){var requestitem=$(this).closest('.requestitem');requestitem.find('.userList').slideToggle();return false;});var autogenerateName=function(){var updateName=!$('#Event_name').val();$('#Event_disciplineId option').each(function(index,value){if(updateName)return false;else updateName=($(value).text()==$('#Event_name').val());});if(updateName)$('#Event_name').val($('#Event_disciplineId option:selected').text());};$('#Event_disciplineId').change(autogenerateName);if($('#Event_name'))autogenerateName();$.fn.inputClone=function(events){this.each(function(){this.setAttribute('value',this.value);if(this.checked)this.setAttribute('checked','checked');else this.removeAttribute('checked');if(this.selected)this.setAttribute('selected','selected');else this.removeAttribute('selected');});return this.clone(events);};$('#inviteuser *[type=submit]').click(function(event){event.preventDefault();$('#event-form .attendees-placeholder').html($('#inviteuser input.attendee').inputClone());$('a[rel].eventinvite').text($('#inviteuser .invited-count').text());$('a[rel].eventinvite').data('overlay').close();});var updateInvitedCount=function(event,context){if(!context)context=$(this).parents('form');var invited=$('.user input.attendee:checked',context).length;if(invited==1)invited+=' person';else invited+=' people';$('.invited-count',context).text(invited);};$('#inviteuser .user input.attendee, #groupinvite .user input.attendee').live('click',updateInvitedCount);$('#inviteuser input[name=select-all-attendees]').change(function(event){var context=$(this).parents('form');$('input.attendee:visible',context).attr('checked',this.checked);updateInvitedCount(event,context);});var syncSelectAll=function(event){var context=$(this).parents('form');var allAreChecked=!$('input.attendee:visible:not(:checked)',context).length;$('input[name=select-all-attendees]',context).attr('checked',allAreChecked);updateInvitedCount(event,context);};$('#inviteuser input.attendee').change(syncSelectAll);if($("a[rel].eventinvite").data('overlay')){$("a[rel].eventinvite").data('overlay').onLoad(syncSelectAll);}
if($(".group-view a[rel].invite").data('overlay')){$(".group-view a[rel].invite").data('overlay').onLoad(syncSelectAll);}
$('#createevent form [name=goToAdvanced]').click(function(){$('#createevent form').data('goToAdvanced',true);});$('#createevent form').submit(function(event){var form=$(this);if(!form.data('goToAdvanced')){var submit=form.find('[type=submit]');submit.attr('disabled','disabled');$.skiclubz.overlays.createevent.onClose(function(){submit.removeAttr('disabled');});event.preventDefault();var postData=form.serialize();$.post(form.attr('action'),postData,function(data,status,request){$.skiclubz.overlays.createevent.close();$.fn.yiiBBQListView.update($('.calendar-view').attr('id'));});}});$('.toggle-events').click(function(){$('.toggle-events').removeClass('selected');$(this).addClass('selected');$('.events').hide();$('.'+$(this).dataset('events')).show();return false;});$('.toggle-videos').click(function(){$('.toggle-videos').removeClass('selected');$(this).addClass('selected');$('.videos').hide();$('.'+$(this).dataset('videos')).show();return false;});$('.groupInviteLink').live('click',function(){$(this).closest('.groupInvite').find('ul').slideToggle('fast');$('.groupInviteLink.btnalt').toggle(50);return false;});$.fn.insertOptions=function(data){var element=this;$.each(data,function(index,value){element.append('<option value="'+index+'">'+value+'</option>');});};var assigneeSelect=$('select.assignee.cascading');var assigneeControl=assigneeSelect.parents('.control');var clearAssigneeControl=function(){assigneeSelect.children().detach(':not(.prompt)');assigneeControl.hide();};$('select.cascading.organizations').change(function(){$.ajax({url:$.skiclubz.baseUrl+'/group/ajaxGetAthletes',data:{id:$(this).val(),includeDescendants:true},success:function(data){clearAssigneeControl();if(data.athletes){assigneeControl.show();assigneeSelect.insertOptions(data.athletes);}},error:clearAssigneeControl});});$.skiclubz.notificationsShown=$('#notifications ul.top-level > li').length;$('#notifications .show-more').click(function(){var doAnimation=setInterval(function(){$.skiclubz.cycleDots($('#notifications .show-more'));},500);$.ajax({data:{limit:$.skiclubz.notificationsShown,offset:$('#notifications ul.top-level > li').length,id:$.skiclubz.user.id},url:$.skiclubz.baseUrl+'/user/showMoreNotifications',success:function(data){$('#notifications hr').show();$('#notifications ul.top-level').append(data.html);if(data.end){$('#notifications .show-more').replaceWith('All Notifications Shown');}
clearInterval(doAnimation);$('#notifications .show-more').text($('#notifications .show-more').text().replace(/\.+$/,''));$('#notifications .show-more').append('...');}});});$('#notifications .finalize-pending-relationship').live('click',function(){var button=$(this);var createRelationship=button.dataset('createrelationship');$.ajax({url:$.skiclubz.baseUrl+'/user/respondToRequestOrInvitation/'+$.skiclubz.user.id,data:{pendingRelationshipId:button.dataset('pendingrelationshipid'),createRelationship:createRelationship,notificationId:button.dataset('notificationid')},type:'post',success:function(data){$.skiclubz.replaceFlash(data);button.removeClass('finalize-pending-relationship').addClass('hide-notification').click();},error:function(xhr){if(!xhr.getResponseHeader('X-SkiClubZ-BrowserLocation')){var body=xhr.responseText.trim();if(body==""){body="There was an error accepting the relationship.";}
$('body').prepend('\
      <div class="overlay section" id="browserWarning">\
       <a class="close closex">close</a>\
       '+body+'\
      </div>\
     ').find('#browserWarning').overlay({top:'30%',load:true});}}});});$('#notifications .hide-notification').live('click',function(){$.ajax({url:$.skiclubz.baseUrl+'/user/hideNotification/'+$.skiclubz.user.id,data:{notificationId:$(this).dataset('notificationid')},type:'post',success:function(data){var hiddenNotification=$('.notification-'+data.notificationId);if(hiddenNotification.closest('li.group').length!=0&&hiddenNotification.siblings().length==0){hiddenNotification.closest('li.group').remove();}else{hiddenNotification.remove();}
if($('#notifications ul.top-level li').length==0){if($('#notifications .show-more').length==0){$('#notifications').hide();}else{$('#notifications hr').hide();}}}});});$('#pending-relationships .hide-pending-relationship').live('click',function(){$.ajax({url:$.skiclubz.baseUrl+'/user/hidePendingRelationship/'+$.skiclubz.user.id,data:{pendingRelationshipId:$(this).dataset('pendingrelationshipid')},type:'post',success:function(data){$('.pending-relationship-'+data.pendingRelationshipId).remove();if($('#pending-relationships ul.top-level li').length==0){$('#pending-relationships').hide();}}});});$('#notifications .group-control').live('click',function(){$(this).next('ul').show();$(this).remove();});$('#notificationsOverlay').overlay({load:true,top:'30%'});$('#NewClubForm_orgName').change(function(){$('.replaceOrgName').text($(this).val());});$('#NewClubForm_orgDesc').change(function(){$('.replaceOrgDesc').text($(this).val());});var saveAndToggleText=function(e){var key=$(this).attr('name'),val=$(this).val();if(e.type=='focus'){if(typeof saveAndToggleText[key]=='undefined'){saveAndToggleText[key]=val;$(this).val('');}else if(val==saveAndToggleText[key]){$(this).val('');}}else if(val==''&&typeof saveAndToggleText[key]!='undefined'){$(this).val(saveAndToggleText[key]);}}
$('#NewClubForm_orgDesc').focus(saveAndToggleText);$('#NewClubForm_orgDesc').blur(saveAndToggleText);$('#page2Submit').click(function(){if(!$('#certifyUnderstood').attr('checked')||!$('#agreeToTerms').attr('checked')){var understood=$('#certifyUnderstood');if(!understood.attr('checked')){var em=understood.closest('label').siblings('.errorMessage');if(!em.length){em=$('<div class="errorMessage"></div>');em.appendTo($(understood.closest('div')));}
em.text('You must certify that you have the authority to execute the Club Engagement Letter.');em.show();}else{understood.closest('label').siblings('.errorMessage').hide();}
var agree=$('#agreeToTerms');if(!agree.attr('checked')){var em=agree.closest('label').siblings('.errorMessage');if(!em.length){em=$('<div class="errorMessage"></div>');em.appendTo($(agree.closest('div')));}
em.text('You must agree to the terms of the Club Engagement Letter.');em.show();}else{agree.closest('label').siblings('.errorMessage').hide();}
return false;}
return true;});$('.uploaderLink').click(function(){var href=$(this).attr('rel');$.skiclubz.checkJavaCompatibility(function(){href+=href.indexOf('?')==-1?'?':'&';window.open(href+'popup=true','Uploader','status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=yes,scrollbars=no,height='+(screen.availHeight-100)+',width=940');});return false;});$(function(){var slideshowInterval=setInterval(function(){var current=$('.why:visible');if(current.length==0)clearInterval(slideshowInterval);var next=current.next('.why').length?current.next():$('.why:first');current.fadeOut('slow',function(){next.fadeIn('slow')});},5000);});(function(){if($('.feature-thumb').length>0){$('.feature-thumb').each(function(index,link){$.skiclubz.preloadImage($(link).attr('href'));});var showImg=function(link){if(link.data('overlay')){var overlay=link.data('overlay').getOverlay();var src=$(link).attr('href');overlay.find('img').attr('src',src);var caption=$(link).attr('title');overlay.find('.caption').text(caption);}else if(link.href){window.location=link.href;}};var next=function(){var currentSrc=$('#feature-gallery img').attr('src');var current=$('a.feature-thumb[href='+currentSrc+']');var next=current.next('.feature-thumb').length?current.next():$('.feature-thumb:first');showImg(next);};var previous=function(){var currentSrc=$('#feature-gallery img').attr('src');var current=$('a.feature-thumb[href='+currentSrc+']');var previous=current.prev('.feature-thumb').length?current.prev():$('.feature-thumb:last');showImg(previous);};$('.feature-thumb').overlay({top:'20%',onBeforeLoad:function(event){showImg(this.getTrigger());}});$(document).bind('keydown','left',previous);$('#feature-gallery .previous').click(previous);$(document).bind('keydown','right',next);$('#feature-gallery .next, #feature-gallery img').click(next);}})();$('.submitForm').live('click',function(event){if(!$(this).dataset('confirm')||confirm($(this).dataset('confirm'))){$.yii.submitForm(this,$(this).dataset('submit')||$(this).attr('href'),$.parseJSON($(this).dataset('params'))||{});}
event.preventDefault();});$('#advancedOptionsShow').live('click',function(event){$('#shownOrHidden').val('show');$('#advancedOptionsShow').toggle();$('#advancedOptionsHide').toggle();$('#advancedOptions').toggle('fast');});$('#advancedOptionsHide').live('click',function(event){$('#shownOrHidden').val('hide');$('#advancedOptionsShow').toggle();$('#advancedOptionsHide').toggle();$('#advancedOptions').toggle('fast');$('input[id=showOnlyUnassigned]').attr('checked',false);});$('#hideN').live('click',function(event){$('#toggleN').toggle();$('#notificationCount').toggle();$('#hideN').toggle();$('#showN').toggle();});$('#showN').live('click',function(event){$('#toggleN').toggle();$('#notificationCount').toggle();$('#showN').toggle();$('#hideN').toggle();});$('#hideP').live('click',function(event){$('#toggleP').toggle();$('#pendingCount').toggle();$('#hideP').toggle();$('#showP').toggle();});$('#showP').live('click',function(event){$('#toggleP').toggle();$('#pendingCount').toggle();$('#showP').toggle();$('#hideP').toggle();});$('.splitscreen.add').live('click',function(e){if($(this).attr('href')=='#')
return false;if($(this).hasClass('second'))
return true;else if($('.splitscreen.add').hasClass('loading'))
return false;e.preventDefault();$(this).addClass('loading');$.ajax({context:this,url:$(this).attr('href'),dataType:'html',success:function(html){$('#flashes').after(html);var link=$(this).attr('href'),split=link.split('/');$(this).removeClass('add').addClass('remove').attr('href',$.skiclubz.baseUrl+'/video/splitscreen.clear/'+split[split.length-1]).text('Remove from splitscreen').removeClass('loading');$('.splitscreen.add').attr('target','_blank').addClass('second').each(function(){$(this).text($(this).text().replace(' (second video)','')+' (second video)');});},error:function(xhr){var message=$('<div class="error section" />').html(xhr.responseText);$('#flashes').empty().append(message);$(window).scrollTop($('#flashes').offset().top);}});});$('.splitscreen.remove').live('click',function(e){e.preventDefault();$.ajax({context:this,url:$(this).attr('href'),dataType:'html',success:function(html){$('.video-for-splitscreen').remove();$('.splitscreen.remove').each(function(){var link=$(this).attr('href'),split=link.split('/');$(this).removeClass('remove').addClass('add').attr('href',$.skiclubz.baseUrl+'/video/splitscreen.add/'+split[split.length-1]).text('Add to splitscreen');});$('.splitscreen.add').removeAttr('target').removeClass('second').each(function(){$(this).text($(this).text().replace(' (second video)',''));});},error:function(xhr){var message=$('<div class="error section" />').text(xhr.responseText);$('#flashes').empty().append(message);$(window).scrollTop($('#flashes').offset().top);}});});$('#eventFilters').submit(function(){var filters=$.deparam($(this).serialize());filters['ajax']=$('.calendar-view').attr('id');$.bbq.pushState(filters,0);return false;});$('.remove.video').live('click',function(e){e.preventDefault();if($(this).attr('data-submit')&&confirm('Are you sure you want to delete this video?')){jQuery.yii.submitForm(this,$(this).attr('data-submit'),{});}});});
