(function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(c.linkDisableSelector).live("ajax:complete",function(){c.enableElement(a(this))}),a(c.linkClickSelector).live("click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e),!1);if(e.data("method"))return c.handleMethod(e),!1}),a(c.inputChangeSelector).live("change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(c.formSubmitSelector).live("submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(c.formInputClickSelector).live("click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(c.formSubmitSelector).live("ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(c.formSubmitSelector).live("ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})})(jQuery),function(a){function b(){function b(e){var f=e||Date.now();f-d>=1e3&&(a.countdown._updateTargets(),d=f),c(b)}this.regional=[],this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,timeSeparator:":",isRTL:!1},this._defaults={until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},a.extend(this._defaults,this.regional[""]),this._serverSyncs=[];var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,d=window.mozAnimationStartTime||Date.now();c?c(b):setInterval(function(){a.countdown._updateTargets()},980)}function k(b,c){a.extend(b,c);for(var d in c)c[d]==null&&(b[d]=null);return b}var c="countdown",d=0,e=1,f=2,g=3,h=4,i=5,j=6;a.extend(b.prototype,{markerClassName:"hasCountdown",_timerTargets:[],setDefaults:function(a){this._resetExtraLabels(this._defaults,a),k(this._defaults,a||{})},UTCDate:function(a,b,c,d,e,f,g,h){typeof b=="object"&&b.constructor==Date&&(h=b.getMilliseconds(),g=b.getSeconds(),f=b.getMinutes(),e=b.getHours(),d=b.getDate(),c=b.getMonth(),b=b.getFullYear());var i=new Date;return i.setUTCFullYear(b),i.setUTCDate(1),i.setUTCMonth(c||0),i.setUTCDate(d||1),i.setUTCHours(e||0),i.setUTCMinutes((f||0)-(Math.abs(a)<30?a*60:a)),i.setUTCSeconds(g||0),i.setUTCMilliseconds(h||0),i},periodsToSeconds:function(a){return a[0]*31557600+a[1]*2629800+a[2]*604800+a[3]*86400+a[4]*3600+a[5]*60+a[6]},_settingsCountdown:function(b,d){if(!d)return a.countdown._defaults;var e=a.data(b,c);return d=="all"?e.options:e.options[d]},_attachCountdown:function(b,d){var e=a(b);if(e.hasClass(this.markerClassName))return;e.addClass(this.markerClassName);var f={options:a.extend({},d),_periods:[0,0,0,0,0,0,0]};a.data(b,c,f),this._changeCountdown(b)},_addTarget:function(a){this._hasTarget(a)||this._timerTargets.push(a)},_hasTarget:function(b){return a.inArray(b,this._timerTargets)>-1},_removeTarget:function(b){this._timerTargets=a.map(this._timerTargets,function(a){return a==b?null:a})},_updateTargets:function(){for(var a=this._timerTargets.length-1;a>=0;a--)this._updateCountdown(this._timerTargets[a])},_updateCountdown:function(b,d){var e=a(b);d=d||a.data(b,c);if(!d)return;e.html(this._generateHTML(d)),e[(this._get(d,"isRTL")?"add":"remove")+"Class"]("countdown_rtl");var f=this._get(d,"onTick");if(f){var g=d._hold!="lap"?d._periods:this._calculatePeriods(d,d._show,this._get(d,"significant"),new Date),h=this._get(d,"tickInterval");(h==1||this.periodsToSeconds(g)%h==0)&&f.apply(b,[g])}var i=d._hold!="pause"&&(d._since?d._now.getTime()<d._since.getTime():d._now.getTime()>=d._until.getTime());if(i&&!d._expiring){d._expiring=!0;if(this._hasTarget(b)||this._get(d,"alwaysExpire")){this._removeTarget(b);var j=this._get(d,"onExpiry");j&&j.apply(b,[]);var k=this._get(d,"expiryText");if(k){var l=this._get(d,"layout");d.options.layout=k,this._updateCountdown(b,d),d.options.layout=l}var m=this._get(d,"expiryUrl");m&&(window.location=m)}d._expiring=!1}else d._hold=="pause"&&this._removeTarget(b);a.data(b,c,d)},_changeCountdown:function(b,d,e){d=d||{};if(typeof d=="string"){var f=d;d={},d[f]=e}var g=a.data(b,c);if(g){this._resetExtraLabels(g.options,d),k(g.options,d),this._adjustSettings(b,g),a.data(b,c,g);var h=new Date;(g._since&&g._since<h||g._until&&g._until>h)&&this._addTarget(b),this._updateCountdown(b,g)}},_resetExtraLabels:function(a,b){var c=!1;for(var d in b)if(d!="whichLabels"&&d.match(/[Ll]abels/)){c=!0;break}if(c)for(var d in a)d.match(/[Ll]abels[0-9]/)&&(a[d]=null)},_adjustSettings:function(a,b){var c,d=this._get(b,"serverSync"),e=0,f=null;for(var g=0;g<this._serverSyncs.length;g++)if(this._serverSyncs[g][0]==d){f=this._serverSyncs[g][1];break}if(f!=null)e=d?f:0,c=new Date;else{var h=d?d.apply(a,[]):null;c=new Date,e=h?c.getTime()-h.getTime():0,this._serverSyncs.push([d,e])}var i=this._get(b,"timezone");i=i==null?-c.getTimezoneOffset():i,b._since=this._get(b,"since"),b._since!=null&&(b._since=this.UTCDate(i,this._determineTime(b._since,null)),b._since&&e&&b._since.setMilliseconds(b._since.getMilliseconds()+e)),b._until=this.UTCDate(i,this._determineTime(this._get(b,"until"),c)),e&&b._until.setMilliseconds(b._until.getMilliseconds()+e),b._show=this._determineShow(b)},_destroyCountdown:function(b){var d=a(b);if(!d.hasClass(this.markerClassName))return;this._removeTarget(b),d.removeClass(this.markerClassName).empty(),a.removeData(b,c)},_pauseCountdown:function(a){this._hold(a,"pause")},_lapCountdown:function(a){this._hold(a,"lap")},_resumeCountdown:function(a){this._hold(a,null)},_hold:function(b,d){var e=a.data(b,c);if(e){if(e._hold=="pause"&&!d){e._periods=e._savePeriods;var f=e._since?"-":"+";e[e._since?"_since":"_until"]=this._determineTime(f+e._periods[0]+"y"+f+e._periods[1]+"o"+f+e._periods[2]+"w"+f+e._periods[3]+"d"+f+e._periods[4]+"h"+f+e._periods[5]+"m"+f+e._periods[6]+"s"),this._addTarget(b)}e._hold=d,e._savePeriods=d=="pause"?e._periods:null,a.data(b,c,e),this._updateCountdown(b,e)}},_getTimesCountdown:function(b){var d=a.data(b,c);return d?d._hold?this._calculatePeriods(d,d._show,this._get(d,"significant"),new Date):d._periods:null},_get:function(b,c){return b.options[c]!=null?b.options[c]:a.countdown._defaults[c]},_determineTime:function(b,c){var d=function(a){var b=new Date;return b.setTime(b.getTime()+a*1e3),b},e=function(b){b=b.toLowerCase();var c=new Date,d=c.getFullYear(),e=c.getMonth(),f=c.getDate(),g=c.getHours(),h=c.getMinutes(),i=c.getSeconds(),j=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,k=j.exec(b);while(k){switch(k[2]||"s"){case"s":i+=parseInt(k[1],10);break;case"m":h+=parseInt(k[1],10);break;case"h":g+=parseInt(k[1],10);break;case"d":f+=parseInt(k[1],10);break;case"w":f+=parseInt(k[1],10)*7;break;case"o":e+=parseInt(k[1],10),f=Math.min(f,a.countdown._getDaysInMonth(d,e));break;case"y":d+=parseInt(k[1],10),f=Math.min(f,a.countdown._getDaysInMonth(d,e))}k=j.exec(b)}return new Date(d,e,f,g,h,i,0)},f=b==null?c:typeof b=="string"?e(b):typeof b=="number"?d(b):b;return f&&f.setMilliseconds(0),f},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_normalLabels:function(a){return a},_generateHTML:function(b){var c=this._get(b,"significant");b._periods=b._hold?b._periods:this._calculatePeriods(b,b._show,c,new Date);var k=!1,l=0,m=c,n=a.extend({},b._show);for(var o=d;o<=j;o++)k|=b._show[o]=="?"&&b._periods[o]>0,n[o]=b._show[o]=="?"&&!k?null:b._show[o],l+=n[o]?1:0,m-=b._periods[o]>0?1:0;var p=[!1,!1,!1,!1,!1,!1,!1];for(var o=j;o>=d;o--)b._show[o]&&(b._periods[o]?p[o]=!0:(p[o]=m>0,m--));var q=this._get(b,"compact"),r=this._get(b,"layout"),s=q?this._get(b,"compactLabels"):this._get(b,"labels"),t=this._get(b,"whichLabels")||this._normalLabels,u=this._get(b,"timeSeparator"),v=this._get(b,"description")||"",w=function(c){var d=a.countdown._get(b,"compactLabels"+t(b._periods[c]));return n[c]?b._periods[c]+(d?d[c]:s[c])+" ":""},x=function(d){var e=a.countdown._get(b,"labels"+t(b._periods[d]));return!c&&n[d]||c&&p[d]?'<span class="countdown_section"><span class="countdown_amount">'+b._periods[d]+"</span><br/>"+(e?e[d]:s[d])+"</span>":""};return r?this._buildLayout(b,n,r,q,c,p):(q?'<span class="countdown_row countdown_amount'+(b._hold?" countdown_holding":"")+'">'+w(d)+w(e)+w(f)+w(g)+(n[h]?this._minDigits(b._periods[h],2):"")+(n[i]?(n[h]?u:"")+this._minDigits(b._periods[i],2):"")+(n[j]?(n[h]||n[i]?u:"")+this._minDigits(b._periods[j],2):""):'<span class="countdown_row countdown_show'+(c||l)+(b._hold?" countdown_holding":"")+'">'+x(d)+x(e)+x(f)+x(g)+x(h)+x(i)+x(j))+"</span>"+(v?'<span class="countdown_row countdown_descr">'+v+"</span>":"")},_buildLayout:function(b,c,k,l,m,n){var o=this._get(b,l?"compactLabels":"labels"),p=this._get(b,"whichLabels")||this._normalLabels,q=function(c){return(a.countdown._get(b,(l?"compactLabels":"labels")+p(b._periods[c]))||o)[c]},r=function(a,b){return Math.floor(a/b)%10},s={desc:this._get(b,"description"),sep:this._get(b,"timeSeparator"),yl:q(d),yn:b._periods[d],ynn:this._minDigits(b._periods[d],2),ynnn:this._minDigits(b._periods[d],3),y1:r(b._periods[d],1),y10:r(b._periods[d],10),y100:r(b._periods[d],100),y1000:r(b._periods[d],1e3),ol:q(e),on:b._periods[e],onn:this._minDigits(b._periods[e],2),onnn:this._minDigits(b._periods[e],3),o1:r(b._periods[e],1),o10:r(b._periods[e],10),o100:r(b._periods[e],100),o1000:r(b._periods[e],1e3),wl:q(f),wn:b._periods[f],wnn:this._minDigits(b._periods[f],2),wnnn:this._minDigits(b._periods[f],3),w1:r(b._periods[f],1),w10:r(b._periods[f],10),w100:r(b._periods[f],100),w1000:r(b._periods[f],1e3),dl:q(g),dn:b._periods[g],dnn:this._minDigits(b._periods[g],2),dnnn:this._minDigits(b._periods[g],3),d1:r(b._periods[g],1),d10:r(b._periods[g],10),d100:r(b._periods[g],100),d1000:r(b._periods[g],1e3),hl:q(h),hn:b._periods[h],hnn:this._minDigits(b._periods[h],2),hnnn:this._minDigits(b._periods[h],3),h1:r(b._periods[h],1),h10:r(b._periods[h],10),h100:r(b._periods[h],100),h1000:r(b._periods[h],1e3),ml:q(i),mn:b._periods[i],mnn:this._minDigits(b._periods[i],2),mnnn:this._minDigits(b._periods[i],3),m1:r(b._periods[i],1),m10:r(b._periods[i],10),m100:r(b._periods[i],100),m1000:r(b._periods[i],1e3),sl:q(j),sn:b._periods[j],snn:this._minDigits(b._periods[j],2),snnn:this._minDigits(b._periods[j],3),s1:r(b._periods[j],1),s10:r(b._periods[j],10),s100:r(b._periods[j],100),s1000:r(b._periods[j],1e3)},t=k;for(var u=d;u<=j;u++){var v="yowdhms".charAt(u),w=new RegExp("\\{"+v+"<\\}(.*)\\{"+v+">\\}","g");t=t.replace(w,!m&&c[u]||m&&n[u]?"$1":"")}return a.each(s,function(a,b){var c=new RegExp("\\{"+a+"\\}","g");t=t.replace(c,b)}),t},_minDigits:function(a,b){return a=""+a,a.length>=b?a:(a="0000000000"+a,a.substr(a.length-b))},_determineShow:function(a){var b=this._get(a,"format"),c=[];return c[d]=b.match("y")?"?":b.match("Y")?"!":null,c[e]=b.match("o")?"?":b.match("O")?"!":null,c[f]=b.match("w")?"?":b.match("W")?"!":null,c[g]=b.match("d")?"?":b.match("D")?"!":null,c[h]=b.match("h")?"?":b.match("H")?"!":null,c[i]=b.match("m")?"?":b.match("M")?"!":null,c[j]=b.match("s")?"?":b.match("S")?"!":null,c},_calculatePeriods:function(b,c,k,l){b._now=l,b._now.setMilliseconds(0);var m=new Date(b._now.getTime());b._since?l.getTime()<b._since.getTime()?b._now=l=m:l=b._since:(m.setTime(b._until.getTime()),l.getTime()>b._until.getTime()&&(b._now=l=m));var n=[0,0,0,0,0,0,0];if(c[d]||c[e]){var o=a.countdown._getDaysInMonth(l.getFullYear(),l.getMonth()),p=a.countdown._getDaysInMonth(m.getFullYear(),m.getMonth()),q=m.getDate()==l.getDate()||m.getDate()>=Math.min(o,p)&&l.getDate()>=Math.min(o,p),r=function(a){return(a.getHours()*60+a.getMinutes())*60+a.getSeconds()},s=Math.max(0,(m.getFullYear()-l.getFullYear())*12+m.getMonth()-l.getMonth()+(m.getDate()<l.getDate()&&!q||q&&r(m)<r(l)?-1:0));n[d]=c[d]?Math.floor(s/12):0,n[e]=c[e]?s-n[d]*12:0,l=new Date(l.getTime());var t=l.getDate()==o,u=a.countdown._getDaysInMonth(l.getFullYear()+n[d],l.getMonth()+n[e]);l.getDate()>u&&l.setDate(u),l.setFullYear(l.getFullYear()+n[d]),l.setMonth(l.getMonth()+n[e]),t&&l.setDate(u)}var v=Math.floor((m.getTime()-l.getTime())/1e3),w=function(a,b){n[a]=c[a]?Math.floor(v/b):0,v-=n[a]*b};w(f,604800),w(g,86400),w(h,3600),w(i,60),w(j,1);if(v>0&&!b._since){var x=[1,12,4.3482,7,24,60,60],y=j,z=1;for(var A=j;A>=d;A--)c[A]&&(n[y]>=z&&(n[y]=0,v=1),v>0&&(n[A]++,v=0,y=A,z=1)),z*=x[A]}if(k)for(var A=d;A<=j;A++)k&&n[A]?k--:k||(n[A]=0);return n}}),a.fn.countdown=function(b){var c=Array.prototype.slice.call(arguments,1);return b=="getTimes"||b=="settings"?a.countdown["_"+b+"Countdown"].apply(a.countdown,[this[0]].concat(c)):this.each(function(){typeof b=="string"?a.countdown["_"+b+"Countdown"].apply(a.countdown,[this].concat(c)):a.countdown._attachCountdown(this,b)})},a.countdown=new b}(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"/ZeroClipboard10.swf",nextId:1,$:function(a){return typeof a=="string"&&(a=document.getElementById(a)),a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a),this.className+=" "+a},a.removeClass=function(a){var b=this.className.split(/\s+/),c=-1;for(var d=0;d<b.length;d++)b[d]==a&&(c=d,d=b.length);return c>-1&&(b.splice(c,1),this.className=b.join(" ")),this},a.hasClass=function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))}),a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){var d=this.clients[a];d&&d.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var c={left:$(a).offset().left,top:$(a).offset().top,width:$(a).outerWidth(),height:$(a).outerHeight()};return c},Client:function(a){this.handlers={},this.id=ZeroClipboard.nextId++,this.movieId="ZeroClipboardMovie_"+this.id,ZeroClipboard.register(this.id,this),a&&this.glue(a)}};ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,c){this.domElement=ZeroClipboard.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1),typeof b=="string"?b=ZeroClipboard.$(b):typeof b=="undefined"&&(b=document.getElementsByTagName("body")[0]);var e=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");var f=this.div.style;f.position="absolute",f.left=""+e.left+"px",f.top=""+(e.top-1)+"px",f.width=""+e.width+"px",f.height=""+e.height+"px",f.zIndex=d;if(typeof c=="object")for(addedStyle in c)f[addedStyle]=c[addedStyle];b.appendChild(this.div),this.div.innerHTML=this.getHTML(e.width,e.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+d+'"/><param name="wmode" value="transparent"/></object>'}else c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+d+'" wmode="transparent" />';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide(),this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null,this.div=null}},reposition:function(a){a&&(this.domElement=ZeroClipboard.$(a),this.domElement||this.hide());if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement),c=this.div.style;c.left=""+b.left+"px",c.top=""+b.top+"px"}},setText:function(a){this.clipText=a,this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=[]),this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a,this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100),this.ready=!0;return}this.ready=!0,this.movie.setText(this.clipText),this.movie.setHandCursor(this.handCursorEnabled);break;case"mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case"mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d=0,e=this.handlers[a].length;d<e;d++){var f=this.handlers[a][d];typeof f=="function"?f(this,b):typeof f=="object"&&f.length==2?f[0][f[1]](this,b):typeof f=="string"&&window[f](this,b)}}},function(){var a,b,c,d,e,f;e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],a=function(a){return a.replace(/(http:\/\/[\w\.\/]+)/,'<a href="$1" target="blank">$1</a>')},d=function(){return c(),b({clearInputs:!0,clearTextareas:!0,passwordFieldText:!0,addClassFocus:"focus",filterClass:"default"})},c=function(){var a,b,c,d,e,f;c=document.getElementById("nav");if(c){b=c.getElementsByTagName("li"),f=[];for(d=0,e=b.length;d<e;d++)a=b[d],a.getElementsByTagName("ul").length>0&&(a.className+=" has-drop-down",a.getElementsByTagName("a")[0].className+=" has-drop-down-a"),a.onmouseover=function(){return this.className+=" hover",this.parentNode.parentNode.className+=" parent-hover"},f.push(a.onmouseout=function(){return this.className=this.className.replace(" hover",""),this.parentNode.parentNode.className=this.parentNode.parentNode.className.replace(" parent-hover","")});return f}},b=function(a){var b,c,d,e,f,g,h,i,j,k;a.clearInputs===null&&(a.clearInputs=!0),a.clearTextareas===null&&(a.clearTextareas=!0),a.passwordFieldText===null&&(a.passwordFieldText=!1),a.addClassFocus===null&&(a.addClassFocus=!1),a.filter||(a.filter="default");if(a.clearInputs){d=document.getElementsByTagName("input");for(h=0,j=d.length;h<j;h++)c=d[h],(c.type==="text"||c.type==="password")&&c.className.indexOf(a.filterClass)&&(c.valueHtml=c.value,c.onfocus=function(){this.valueHtml===this.value&&(this.value=""),this.fake&&(e(this,this.previousSibling),this.previousSibling.focus());if(a.addClassFocus&&!this.fake)return this.className+=" "+a.addClassFocus,this.parentNode.className+=" parent-"+a.addClassFocus},c.onblur=function(){this.value===""&&(this.value=this.valueHtml,a.passwordFieldText&&this.type==="password"&&e(this,this.nextSibling));if(a.addClassFocus)return this.className=this.className.replace(a.addClassFocus,""),this.parentNode.className=this.parentNode.className.replace("parent-"+a.addClassFocus,"")},a.passwordFieldText&&c.type==="password"&&(b=document.createElement("input"),b.type="text",b.value=c.value,b.className=c.className,b.fake=!0,c.parentNode.insertBefore(b,c.nextSibling),e(c,null)))}if(a.clearTextareas){g=document.getElementsByTagName("textarea");for(i=0,k=g.length;i<k;i++)f=g[i],f.className.indexOf(a.filterClass)&&(f.valueHtml=f.value,f.onfocus=function(){this.value===this.valueHtml&&(this.value="");if(a.addClassFocus)return this.className+=" "+a.addClassFocus,this.parentNode.className+=" parent-"+a.addClassFocus},f.onblur=function(){this.value===""&&(this.value=this.valueHtml);if(a.addClassFocus)return this.className=this.className.replace(a.addClassFocus,""),this.parentNode.className=this.parentNode.className.replace("parent-"+a.addClassFocus,"")})}return e=function(a,b){a&&(a.style.display="none");if(b)return b.style.display="inline"}},jQuery(function(){return $("a.popup").click(function(){var a,b,c,d,e,f;return f=575,a=400,b=($(window).width()-f)/2,d=($(window).height()-a)/2,e=this.href,c="status=1,width="+f+",height="+a+",top="+d+",left="+b,window.open(e,"twitter",c),!1})}),jQuery(function(){var b,c,d;if($("#tweet_stream").length===1)return b=window.location.host.split("."),c=b[b.length-1],d="wantacode",c==="uk"&&(d="wantacodeuk"),$.ajax({type:"GET",dataType:"jsonp",url:"http://api.twitter.com/1/statuses/user_timeline.json",data:{screen_name:d,count:3},success:function(b){var c;return c=[],$.each(b,function(b,d){var f,g;return f=new Date(d.created_at),g="<li>",b===1&&(g='<li class="gray">'),c.push(g+"<p>"+a(d.text)+'</p><strong class="posted">'+e[f.getMonth()]+" "+f.getDate()+"</strong></li>")}),$("#tweet_stream").find(".list").html(c.join(""))}})}),f=function(){var a,b;return b=[window.location.protocol+"//",window.location.host,"/assets/logo-main.png"].join(""),a=[window.location.protocol+"//",window.location.host,window.location.pathname].join(""),FB.ui({method:"feed",display:"popup",name:$("title").text(),caption:a,link:a,source:b,picture:b})},jQuery(function(){return $(".block-social .facebook, .social-block .facebook").click(function(){return f(),!1})}),jQuery(function(){return $.get("/blog/",function(a){var b,c;c=$(a),c.find(".text-holder h1 a, .text-holder h2 a").slice(0,3).each(function(a,b){return $(".area ul").append('<li><a href="'+b+'">'+b.text+"</a></li>")});if($(".blog-posts").length===1)return c.find(".text-holder h1 a, .text-holder h2 a").slice(0,3).each(function(a,b){var c;return c="<li>",a===1&&(c='<li class="gray">'),$(".blog-posts ul").append(c+'<h3><a href="'+b+'">'+b.text+"</a></h3></li>")}),b=c.find(".info").slice(0,3),$(".blog-posts li h3").each(function(a,c){return $(c).after('<strong class="date">'+$(b[a]).text().split("/ ")[1]+"</strong>")})}),!1}),jQuery(function(){return $(".form-search .submit").click(function(a){if($("#query").val()==="Search for stores, products, or coupons")return a.preventDefault()})}),window.addEventListener?window.addEventListener("load",d,!1):window.attachEvent&&window.attachEvent("onload",d)}.call(this),function(){var a,b;b=function(){var a;return a=new ZeroClipboard.Client,$(".zeroclip").mouseover(function(){var b;return a.destroy(),b=$(this).text().replace(/Copy to clipboard and open site$/,""),a=new ZeroClipboard.Client,a.setText(b),a.setHandCursor(!0),a.setCSSEffects(!0),a.addEventListener("mouseover",function(a){}),a.addEventListener("mouseout",function(b){return a.destroy()}),a.addEventListener("mouseup",function(a){return window.open($(a.domElement).attr("href"))}),a.glue(this)})},jQuery(function(){return b()}),a=1,jQuery(function(){return $("a.btn-green").click(function(){return a++,$.get(window.location.href,{page:a},function(a){var c,d,e;if(a.length>1)return $("ul#paginator").append(a),c=a.match(/<li/gi).length,e=parseInt($("var#total-entries").text()),d=parseInt($("var#per-page").text()),d+=c,$("var#per-page").text(d),e===d&&$(".btn-green").remove(),b()},"script"),!1}),$(".seasonal").mouseover(function(){return $(this).css("background-position","left bottom")}),$(".seasonal").mouseout(function(){return $(this).css("background-position","left top")})})}.call(this),jQuery(function(){if($(".alphabet").length!==0)return $("ul.alphabet a").click(function(a){return a.preventDefault(),$("ul.alphabet").find(".active").removeClass("active"),$(this).parent().addClass("active"),$("html,body").animate({scrollTop:$("#"+$(this).text()).offset().top},"fast")}),$(".link-top").click(function(a){return a.preventDefault(),$("ul.alphabet").find(".active").removeClass("active"),$("html,body").animate({scrollTop:0},"fast")})}),jQuery(function(){return $(".similar-link").length!==0&&($(".similar-link").click(function(a){return a.preventDefault(),$(this).parent().parent().parent().parent().parent().next().show("blind"),$(this).remove()}),!1),$("var.time").each(function(){var a,b,c,d,e,f;return f=parseInt($(this).find(".year").text()),e=parseInt($(this).find(".month").text()),b=parseInt($(this).find(".day").text()),c=parseInt($(this).find(".hour").text()),d=parseInt($(this).find(".min").text()),a=new Date(f,e,b,c,d),console.log(a),$(this).next().countdown({until:a,timezone:-8,layout:'<span class="remaining">{d<}{dn}{dl}{d>} {hn}:{mnn}:{snn} <span>Remaining</span></span>',compact:!0})})}),jQuery(function(){return $(".rating-stars ul a").mouseover(function(){var a,b,c;b=parseInt($(this).attr("id").split("-")[1]);for(a=5;5<=b?a<=b:a>=b;5<=b?a++:a--)$("#rate").val(a),$("#star-"+a).removeClass("hover");c=[];for(a=1;1<=b?a<=b:a>=b;1<=b?a++:a--)$("#rate").val(a),c.push($("#star-"+a).addClass("hover"));return c}),$("#review_new").submit(function(a){$(".error").remove(),$("#review_name").val()==="Name"&&(a.preventDefault(),$("#review_name").parent().parent().prepend("<span class='error'>can't be blank</span>")),$("#review_comment").val()==="Your Review"&&(a.preventDefault(),$("#review_comment").parent().parent().prepend("<span class='error'>can't be blank</span>"));if($("#rate").val()===""||$("#rate").val()===null)return a.preventDefault(),$(".rating-stars:last").next().append(" can't be blank")}),$("#read-more").click(function(){return $(this).parent().next().show(),$(this).parent().remove(),!1})})
