/*
 * NETEYE Activity Indicator jQuery Plugin
 *
 * Copyright (c) 2010 NETEYE GmbH
 * Licensed under the MIT license
 *
 * Author: Felix Gnass [fgnass at neteye dot de]
 * Version: 1.0.0
 */
(function(e){function i(b,a){var c=document.createElementNS("http://www.w3.org/2000/svg",b||"svg");a&&e.each(a,function(a,b){c.setAttributeNS(null,a,b)});return e(c)}e.fn.activity=function(b){this.each(function(){var a=e(this),c=a.data("activity");c&&(clearInterval(c.data("interval")),c.remove(),a.removeData("activity"));if(b!==!1){b=e.extend({color:a.css("color")},e.fn.activity.defaults,b);var c=k(a,b).css("position","absolute").prependTo(b.outside?"body":a),d=a.outerHeight()-c.height(),f=a.outerWidth()- c.width(),d={top:b.valign=="top"?b.padding:b.valign=="bottom"?d-b.padding:Math.floor(d/2),left:b.align=="left"?b.padding:b.align=="right"?f-b.padding:Math.floor(f/2)},f=a.offset();b.outside?c.css({top:f.top+"px",left:f.left+"px"}):(d.top-=c.offset().top-f.top,d.left-=c.offset().left-f.left);c.css({marginTop:d.top+"px",marginLeft:d.left+"px"});j(c,b.segments,Math.round(10/b.speed)/10);a.data("activity",c)}});return this};e.fn.activity.defaults={segments:12,space:3,length:7,width:4,speed:1.2,align:"center", valign:"center",padding:4};e.fn.activity.getOpacity=function(b,a){var c=b.steps||b.segments-1;return 1-Math.min(a,c)*(1-(b.opacity!==void 0?b.opacity:1/c))/c};var k=function(){return e("<div>").addClass("busy")},j=function(){};if(document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)if(k=function(b,a){for(var c=a.width*2+a.space,d=c+a.length+Math.ceil(a.width/2)+1,f=i().width(d*2).height(d*2),h=i("g",{"stroke-width":a.width,"stroke-linecap":"round",stroke:a.color}).appendTo(i("g", {transform:"translate("+d+","+d+")"}).appendTo(f)),g=0;g<a.segments;g++)h.append(i("line",{x1:0,y1:c,x2:0,y2:c+a.length,transform:"rotate("+360/a.segments*g+", 0, 0)",opacity:e.fn.activity.getOpacity(a,g)}));return e("<div>").append(f).width(2*d).height(2*d)},document.createElement("div").style.WebkitAnimationName!==void 0)var l={},j=function(b,a,c){if(!l[a]){for(var d="spin"+a,f="@-webkit-keyframes "+d+" {",e=0;e<a;e++){var g="% { -webkit-transform:rotate("+Math.round(360/a*e)+"deg); }\n";f+=Math.round(1E5/ a*e)/1E3+g+Math.round(1E5/a*(e+1)-1)/1E3+g}f+="100% { -webkit-transform:rotate(100deg); }\n}";document.styleSheets[0].insertRule(f);l[a]=d}b.css("-webkit-animation",l[a]+" "+c+"s linear infinite")};else j=function(b,a,c){var d=0,e=b.find("g g").get(0);b.data("interval",setInterval(function(){e.setAttributeNS(null,"transform","rotate("+ ++d%a*(360/a)+")")},c*1E3/a))};else{var m=e("<shape>").css("behavior","url(#default#VML)");e("body").append(m);if(m.get(0).adj){var n=document.createStyleSheet();e.each(["group", "shape","stroke"],function(){n.addRule(this,"behavior:url(#default#VML);")});k=function(b,a){for(var c=a.width*2+a.space,d=(c+a.length+Math.ceil(a.width/2)+1)*2,f=-Math.ceil(d/2),f=e("<group>",{coordsize:d+" "+d,coordorigin:f+" "+f}).css({top:f,left:f,width:d,height:d}),h=0;h<a.segments;h++)f.append(e("<shape>",{path:"m "+c+",0 l "+(c+a.length)+",0"}).css({width:d,height:d,rotation:360/a.segments*h+"deg"}).append(e("<stroke>",{color:a.color,weight:a.width+"px",endcap:"round",opacity:e.fn.activity.getOpacity(a, h)})));return e("<group>",{coordsize:d+" "+d}).css({width:d,height:d,overflow:"hidden"}).append(f)};j=function(b,a,c){var d=0,e=b.get(0);b.data("interval",setInterval(function(){e.style.rotation=++d%a*(360/a)},c*1E3/a))}}e(m).remove()}})(jQuery);
/*
 * 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(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){if((a/=d/2)<1)return b/ 2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e, a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return a==0?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){if(a==0)return c;if(a==d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c}, easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e, a,c,b,d){var e=1.70158,f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(a==0)return c;if((a/=d/2)==2)return c+b;f||(f=d*0.3*1.5);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);if(a<1)return-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c;return g*Math.pow(2,-10*(a-=1))*Math.sin((a*d-e)* 2*Math.PI/f)*0.5+b+c},easeInBack:function(e,a,c,b,d,f){f==void 0&&(f=1.70158);return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){f==void 0&&(f=1.70158);return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){f==void 0&&(f=1.70158);if((a/=d/2)<1)return b/2*a*a*(((f*=1.525)+1)*a-f)+c;return b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/ 2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){if(a<d/2)return jQuery.easing.easeInBounce(e,a*2,0,b,d)*0.5+c;return jQuery.easing.easeOutBounce(e,a*2-d,0,b,d)*0.5+b*0.5+c}});
(function(d){d.runloop=function(n){var b={roundType:"floor",base:5};n&&d.extend(b,n);var g=document.createElement("div"),c={},l={},h=!1,i=!1,j=0,e,m=function(a){a=parseInt(a.toString().match(/[0-9]+/g),0);return isNaN(a)?!1:"at"+a};return e={isPlaying:!1,addKey:function(a,f){var k=m(a);if(k){var b=c[k];c[k]=typeof c[k]!="function"?f:function(){b&&b();f()}}},removeKey:function(a){(a=m(a))&&delete c[a]},addMap:function(a){for(var b in a)(at=m(b))&&typeof a[b]=="function"&&this.addKey(at,a[b])},getMap:function(){return c},
reset:function(){i=h=!1;j=0;l={};d(g).css({top:0})},pause:function(){e.isPlaying=!1;i=h-Math.round(h*(Math.floor(j)/100));d(g).stop()},play:function(a,f){if(!e.isPlaying){e.isPlaying=!0;a=parseInt(a,0)||500;if(a<500)b.base=10;i&&(a=i,d(g).css("top",Math.floor(j)));typeof f=="function"&&this.addKey("100%",f);h=a;d(g).animate({top:"100"},{duration:a,step:function(a){j=a;a=b.roundType=="round"?Math.round(a/b.base)*b.base:Math.floor(a/b.base)*b.base;!(a in l)&&c["at"+a]&&(l[a]=!0,c["at"+a]())},easing:"linear",
complete:function(){e.isPlaying=!1;e.reset()}})}}}}})(jQuery);
