/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright � 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(c,d,b,j,i){return jQuery.easing[jQuery.easing.def](c,d,b,j,i)},easeInQuad:function(c,d,b,j,i){return j*(d/=i)*d+b},easeOutQuad:function(c,d,b,j,i){return -j*(d/=i)*(d-2)+b},easeInOutQuad:function(c,d,b,j,i){if((d/=i/2)<1){return j/2*d*d+b}return -j/2*((--d)*(d-2)-1)+b},easeInCubic:function(c,d,b,j,i){return j*(d/=i)*d*d+b},easeOutCubic:function(c,d,b,j,i){return j*((d=d/i-1)*d*d+1)+b},easeInOutCubic:function(c,d,b,j,i){if((d/=i/2)<1){return j/2*d*d*d+b}return j/2*((d-=2)*d*d+2)+b},easeInQuart:function(c,d,b,j,i){return j*(d/=i)*d*d*d+b},easeOutQuart:function(c,d,b,j,i){return -j*((d=d/i-1)*d*d*d-1)+b},easeInOutQuart:function(c,d,b,j,i){if((d/=i/2)<1){return j/2*d*d*d*d+b}return -j/2*((d-=2)*d*d*d-2)+b},easeInQuint:function(c,d,b,j,i){return j*(d/=i)*d*d*d*d+b},easeOutQuint:function(c,d,b,j,i){return j*((d=d/i-1)*d*d*d*d+1)+b},easeInOutQuint:function(c,d,b,j,i){if((d/=i/2)<1){return j/2*d*d*d*d*d+b}return j/2*((d-=2)*d*d*d*d+2)+b},easeInSine:function(c,d,b,j,i){return -j*Math.cos(d/i*(Math.PI/2))+j+b},easeOutSine:function(c,d,b,j,i){return j*Math.sin(d/i*(Math.PI/2))+b},easeInOutSine:function(c,d,b,j,i){return -j/2*(Math.cos(Math.PI*d/i)-1)+b},easeInExpo:function(c,d,b,j,i){return(d==0)?b:j*Math.pow(2,10*(d/i-1))+b},easeOutExpo:function(c,d,b,j,i){return(d==i)?b+j:j*(-Math.pow(2,-10*d/i)+1)+b},easeInOutExpo:function(c,d,b,j,i){if(d==0){return b}if(d==i){return b+j}if((d/=i/2)<1){return j/2*Math.pow(2,10*(d-1))+b}return j/2*(-Math.pow(2,-10*--d)+2)+b},easeInCirc:function(c,d,b,j,i){return -j*(Math.sqrt(1-(d/=i)*d)-1)+b},easeOutCirc:function(c,d,b,j,i){return j*Math.sqrt(1-(d=d/i-1)*d)+b},easeInOutCirc:function(c,d,b,j,i){if((d/=i/2)<1){return -j/2*(Math.sqrt(1-d*d)-1)+b}return j/2*(Math.sqrt(1-(d-=2)*d)+1)+b},easeInElastic:function(b,d,a,p,o){var m=1.70158;var n=0;var c=p;if(d==0){return a}if((d/=o)==1){return a+p}if(!n){n=o*0.3}if(c<Math.abs(p)){c=p;var m=n/4}else{var m=n/(2*Math.PI)*Math.asin(p/c)}return -(c*Math.pow(2,10*(d-=1))*Math.sin((d*o-m)*(2*Math.PI)/n))+a},easeOutElastic:function(b,d,a,p,o){var m=1.70158;var n=0;var c=p;if(d==0){return a}if((d/=o)==1){return a+p}if(!n){n=o*0.3}if(c<Math.abs(p)){c=p;var m=n/4}else{var m=n/(2*Math.PI)*Math.asin(p/c)}return c*Math.pow(2,-10*d)*Math.sin((d*o-m)*(2*Math.PI)/n)+p+a},easeInOutElastic:function(b,d,a,p,o){var m=1.70158;var n=0;var c=p;if(d==0){return a}if((d/=o/2)==2){return a+p}if(!n){n=o*(0.3*1.5)}if(c<Math.abs(p)){c=p;var m=n/4}else{var m=n/(2*Math.PI)*Math.asin(p/c)}if(d<1){return -0.5*(c*Math.pow(2,10*(d-=1))*Math.sin((d*o-m)*(2*Math.PI)/n))+a}return c*Math.pow(2,-10*(d-=1))*Math.sin((d*o-m)*(2*Math.PI)/n)*0.5+p+a},easeInBack:function(c,d,b,l,k,j){if(j==undefined){j=1.70158}return l*(d/=k)*d*((j+1)*d-j)+b},easeOutBack:function(c,d,b,l,k,j){if(j==undefined){j=1.70158}return l*((d=d/k-1)*d*((j+1)*d+j)+1)+b},easeInOutBack:function(c,d,b,l,k,j){if(j==undefined){j=1.70158}if((d/=k/2)<1){return l/2*(d*d*(((j*=(1.525))+1)*d-j))+b}return l/2*((d-=2)*d*(((j*=(1.525))+1)*d+j)+2)+b},easeInBounce:function(c,d,b,j,i){return j-jQuery.easing.easeOutBounce(c,i-d,0,j,i)+b},easeOutBounce:function(c,d,b,j,i){if((d/=i)<(1/2.75)){return j*(7.5625*d*d)+b}else{if(d<(2/2.75)){return j*(7.5625*(d-=(1.5/2.75))*d+0.75)+b}else{if(d<(2.5/2.75)){return j*(7.5625*(d-=(2.25/2.75))*d+0.9375)+b}else{return j*(7.5625*(d-=(2.625/2.75))*d+0.984375)+b}}}},easeInOutBounce:function(c,d,b,j,i){if(d<i/2){return jQuery.easing.easeInBounce(c,d*2,0,j,i)*0.5+b}return jQuery.easing.easeOutBounce(c,d*2-i,0,j,i)*0.5+j*0.5+b}});
/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright � 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */

var FORMALIZE=(function(a,h,c,g){var f="placeholder" in c.createElement("input");var b="autofocus" in c.createElement("input");var d=!!(a.browser.msie&&parseInt(a.browser.version,10)===6);var e=!!(a.browser.msie&&parseInt(a.browser.version,10)===7);return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]()}},init:{full_input_size:function(){if(!e||!a("textarea, input.input_full").length){return}a("textarea, input.input_full").wrap('<span class="input_full_wrap"></span>')},ie6_skin_inputs:function(){if(!d||!a("input, select, textarea").length){return}var i=/button|submit|reset/;var j=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;a("input").each(function(){var k=a(this);if(this.getAttribute("type").match(i)){k.addClass("ie6_button");if(this.disabled){k.addClass("ie6_button_disabled")}}else{if(this.getAttribute("type").match(j)){k.addClass("ie6_input");if(this.disabled){k.addClass("ie6_input_disabled")}}}});a("textarea, select").each(function(){if(this.disabled){a(this).addClass("ie6_input_disabled")}})},autofocus:function(){if(b||!a(":input[autofocus]").length){return}a(":input[autofocus]:visible:first").focus()},placeholder:function(){if(f||!a(":input[placeholder]").length){return}FORMALIZE.misc.add_placeholder();a(":input[placeholder]").each(function(){var i=a(this);var j=i.attr("placeholder");i.focus(function(){if(i.val()===j){i.val("").removeClass("placeholder_text")}}).blur(function(){FORMALIZE.misc.add_placeholder()});i.closest("form").submit(function(){if(i.val()===j){i.val("").removeClass("placeholder_text")}}).bind("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})})}},misc:{add_placeholder:function(){if(f||!a(":input[placeholder]").length){return}a(":input[placeholder]").each(function(){var i=a(this);var j=i.attr("placeholder");if(!i.val()||i.val()===j){i.val(j).addClass("placeholder_text")}})}}}})(jQuery,this,this.document);jQuery(document).ready(function(){FORMALIZE.go()});
(function(m){var p=m.validator,n,r="unobtrusiveValidation";function o(d,e,f){d.rules[e]=f;if(d.message){d.messages[e]=d.message}}function u(b){return b.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function s(b){return b.substr(0,b.lastIndexOf(".")+1)}function q(c,d){if(c.indexOf("*.")===0){c=c.replace("*.",d)}return c}function x(f,g){var a=m(this).find("[data-valmsg-for='"+g[0].name+"']"),h=m.parseJSON(a.attr("data-valmsg-replace"))!==false;a.removeClass("field-validation-valid").addClass("field-validation-error");f.data("unobtrusiveContainer",a);if(h){a.empty();f.removeClass("input-validation-error").appendTo(a)}else{f.hide()}}function w(h,g){var f=m(this).find("[data-valmsg-summary=true]"),a=f.find("ul");if(a&&a.length&&g.errorList.length){a.empty();f.addClass("validation-summary-errors").removeClass("validation-summary-valid");m.each(g.errorList,function(){m("<li />").html(this.message).appendTo(a)})}}function v(e){var a=e.data("unobtrusiveContainer"),f=m.parseJSON(a.attr("data-valmsg-replace"));if(a){a.addClass("field-validation-valid").removeClass("field-validation-error");e.removeData("unobtrusiveContainer");f&&a.empty()}}function t(f){var a=m(f),e=a.data(r);if(!e){e={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:m.proxy(x,f),invalidHandler:m.proxy(w,f),messages:{},rules:{},success:m.proxy(v,f)},attachValidation:function(){a.validate(this.options)},validate:function(){a.validate();return a.valid()}};a.data(r,e)}return e}p.unobtrusive={adapters:[],parseElement:function(a,z){var j=m(a),k=j.parents("form")[0],h,y,l;if(!k){return}h=t(k);h.options.rules[a.name]=y={};h.options.messages[a.name]=l={};m.each(this.adapters,function(){var b="data-val-"+this.name,e=j.attr(b),d={};if(e!==undefined){b+="-";m.each(this.params,function(){d[this]=j.attr(b+this)});this.adapt({element:a,form:k,message:e,params:d,rules:y,messages:l})}});!z&&h.attachValidation()},parse:function(a){m(a).find(":input[data-val=true]").each(function(){p.unobtrusive.parseElement(this,true)});m("form").each(function(){var b=t(this);b&&b.attachValidation()})}};n=p.unobtrusive.adapters;n.add=function(f,d,e){if(!e){e=d;d=[]}this.push({name:f,params:d,adapt:e});return this};n.addBool=function(c,d){return this.add(c,function(a){o(a,d||c,true)})};n.addMinMax=function(j,l,k,c,i,h){return this.add(j,[i||"min",h||"max"],function(a){var g=a.params.min,f=a.params.max;if(g&&f){o(a,c,[g,f])}else{if(g){o(a,l,g)}else{f&&o(a,k,f)}}})};n.addSingleVal=function(c,e,f){return this.add(c,[e||"val"],function(a){o(a,f||c,a.params[e])})};p.addMethod("regex",function(f,g,h){var e;if(this.optional(g)){return true}e=(new RegExp(h)).exec(f);return e&&e.index===0&&e[0].length===f.length});n.addSingleVal("accept","exts").addSingleVal("regex","pattern");n.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");n.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");n.add("equalto",["other"],function(a){var g=s(a.element.name),j=a.params.other,c=q(j,g),e=m(a.form).find(":input[name="+c+"]")[0];o(a,"equalTo",e)});n.add("required",function(b){(b.element.tagName.toUpperCase()!=="INPUT"||b.element.type.toUpperCase()!=="CHECKBOX")&&o(b,"required",true)});n.add("remote",["url","type","fields"],function(a){var c={url:a.params.url,type:a.params.type||"GET",data:{}},e=s(a.element.name);m.each(u(a.params.fields||a.element.name),function(f,d){var b=q(d,e);c.data[b]=function(){return m(a.form).find(":input[name='"+b+"']").val()}});o(a,"remote",c)});m(function(){p.unobtrusive.parse(document)})})(jQuery);
(function(j){var k="unobtrusiveAjaxClick",p="unobtrusiveValidation";function l(h,f){var e=window,g=(h||"").split(".");while(e&&g.length){e=e[g.shift()]}if(typeof e==="function"){return e}f.push(h);return Function.constructor.apply(null,f)}function m(b){return b==="GET"||b==="POST"}function o(d,c){!m(c)&&d.setRequestHeader("X-HTTP-Method-Override",c)}function q(f,a,h){var g;if(h.indexOf("application/x-javascript")!==-1){return}g=(f.getAttribute("data-ajax-mode")||"").toUpperCase();j(f.getAttribute("data-ajax-update")).each(function(i,b){var d;switch(g){case"BEFORE":d=b.firstChild;j("<div />").html(a).contents().each(function(){b.insertBefore(this,d)});break;case"AFTER":j("<div />").html(a).contents().each(function(){b.appendChild(this)});break;default:j(b).html(a)}})}function n(a,c){var h,s,d,f;h=a.getAttribute("data-ajax-confirm");if(h&&!window.confirm(h)){return}s=j(a.getAttribute("data-ajax-loading"));f=a.getAttribute("data-ajax-loading-duration")||0;j.extend(c,{type:a.getAttribute("data-ajax-method")||undefined,url:a.getAttribute("data-ajax-url")||undefined,beforeSend:function(e){var b;o(e,d);b=l(a.getAttribute("data-ajax-begin"),["xhr"]).apply(this,arguments);b!==false&&s.show(f);return b},complete:function(){s.hide(f);l(a.getAttribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(b,i,g){q(a,b,g.getResponseHeader("Content-Type")||"text/html");l(a.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:l(a.getAttribute("data-ajax-failure"),["xhr","status","error"])});c.data.push({name:"X-Requested-With",value:"XMLHttpRequest"});d=c.type.toUpperCase();if(!m(d)){c.type="POST";c.data.push({name:"X-HTTP-Method-Override",value:d})}j.ajax(c)}function r(d){var a=j(d).data(p);return !a||!a.validate||a.validate()}j("a[data-ajax=true]").live("click",function(b){b.preventDefault();n(this,{url:this.href,type:"GET",data:[]})});j("form[data-ajax=true] input[type=image]").live("click",function(a){var s=a.target.name,b=j(a.target),i=b.parents("form")[0],h=b.offset();j(i).data(k,[{name:s+".x",value:Math.round(a.pageX-h.left)},{name:s+".y",value:Math.round(a.pageY-h.top)}]);setTimeout(function(){j(i).removeData(k)},0)});j("form[data-ajax=true] :submit").live("click",function(a){var f=a.target.name,b=j(a.target).parents("form")[0];j(b).data(k,f?[{name:f,value:a.target.value}]:[]);setTimeout(function(){j(b).removeData(k)},0)});j("form[data-ajax=true]").live("submit",function(b){var a=j(this).data(k)||[];b.preventDefault();if(!r(this)){return}n(this,{url:this.action,type:this.method||"GET",data:a.concat(j(this).serializeArray())})})})(jQuery);
window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};function KisVideo(){var b=[];var a=this;var d="#SingleVideoTips";var c;this.KisVideo=function(){$.each($(d+" li"),function(f,i){var h=parseFloat($(i).text().split("|")[0]);var g=$(i).html().split("|")[1];$(i).html(g);b.push([h,g])});c=document.getElementById("video");var e=setInterval(function(){if(b.length==0){window.clearInterval(e)}if(b[0][0]<parseFloat(a.getCurrentPlayerTime())){b.shift();a.showTip()}},1000)};this.getCurrentPlayerTime=function(){return c.getTime()};this.showTip=function(){$($(d+" li:hidden:first")).fadeIn(3000)};this.KisVideo()}$(function(){if(!$.fn.clearForm){$.fn.clearForm=function(d){return this.each(function(){$("input,select,textarea",this).clearFields(d)})}}if(!$.fn.clearFields&&!$.fn.clearInputs){$.fn.clearFields=$.fn.clearInputs=function(d){var e=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var f=this.type,g=this.tagName.toLowerCase();if(e.test(f)||g=="textarea"||(d&&/hidden/.test(f))){this.value=""}else{if(f=="checkbox"||f=="radio"){this.checked=false}else{if(g=="select"){this.selectedIndex=-1}}}})}}if(!$.fn.resetForm){$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})}}var b="input-validation-error";var c=$("#FooterInviteSend");var a="There was an error submitting your information. Please try again later.";if(c){$(c).bind("click",function(){var d=$("#FooterInvite");var e=d.val();if(e.length==0){d.addClass(b);return}$.ajax({url:"/Account/SendFooterInvitation",type:"POST",data:{emailAddress:e},success:function(f){if(f.Status){switch(f.Status){case"Error":d.addClass(b);break;default:d.removeClass(b);alert(f.Message);break}}else{alert(a)}},error:function(){alert(a)}})})}});

