(function(a){function b(a){var b=["transform","WebkitTransform","msTransform","MozTransform","OTransform"];var c;while(c=b.shift()){if(typeof a.style[c]!="undefined"){return c}}return"transform"}var c=null;var d=a.fn.css;a.fn.css=function(e,f){if(c===null){if(typeof a.cssProps!="undefined"){c=a.cssProps}else if(typeof a.props!="undefined"){c=a.props}else{c={}}}if(typeof c["transform"]=="undefined"&&(e=="transform"||typeof e=="object"&&typeof e["transform"]!="undefined")){c["transform"]=b(this.get(0))}if(c["transform"]!="transform"){if(e=="transform"){e=c["transform"];if(typeof f=="undefined"&&jQuery.style){return jQuery.style(this.get(0),e)}}else if(typeof e=="object"&&typeof e["transform"]!="undefined"){e[c["transform"]]=e["transform"];delete e["transform"]}}return d.apply(this,arguments)}})(jQuery);(function(a){var b="deg";a.fn.rotate=function(c){var d=a(this).css("transform")||"none";if(typeof c=="undefined"){if(d){var e=d.match(/rotate\(([^)]+)\)/);if(e&&e[1]){return e[1]}}return 0}var e=c.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/);if(e){if(e[3]){b=e[3]}a(this).css("transform",d.replace(/none|rotate\([^)]*\)/,"")+"rotate("+e[1]+b+")")}return this};a.fn.scale=function(b,c,d){var e=a(this).css("transform");if(typeof b=="undefined"){if(e){var f=e.match(/scale\(([^)]+)\)/);if(f&&f[1]){return f[1]}}return 1}a(this).css("transform",e.replace(/none|scale\([^)]*\)/,"")+"scale("+b+")");return this};var c=a.fx.prototype.cur;a.fx.prototype.cur=function(){if(this.prop=="rotate"){return parseFloat(a(this.elem).rotate())}else if(this.prop=="scale"){return parseFloat(a(this.elem).scale())}return c.apply(this,arguments)};a.fx.step.rotate=function(c){a(c.elem).rotate(c.now+b)};a.fx.step.scale=function(b){a(b.elem).scale(b.now)};var d=a.fn.animate;a.fn.animate=function(a){if(typeof a["rotate"]!="undefined"){var c=a["rotate"].toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);if(c&&c[5]){b=c[5]}a["rotate"]=c[1]}return d.apply(this,arguments)}})(jQuery);jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;if(!g)g=e*.3*1.5;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;return d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;return d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;if((b/=e/2)<1)return d/2*b*b*(((f*=1.525)+1)*b-f)+c;return d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){if((b/=e)<1/2.75){return d*7.5625*b*b+c}else if(b<2/2.75){return d*(7.5625*(b-=1.5/2.75)*b+.75)+c}else if(b<2.5/2.75){return d*(7.5625*(b-=2.25/2.75)*b+.9375)+c}else{return d*(7.5625*(b-=2.625/2.75)*b+.984375)+c}},easeInOutBounce:function(a,b,c,d,e){if(b<e/2)return jQuery.easing.easeInBounce(a,b*2,0,d,e)*.5+c;return jQuery.easing.easeOutBounce(a,b*2-e,0,d,e)*.5+d*.5+c}});(function(a){a.fn.quicksand=function(b,c){var e={duration:750,easing:"swing",attribute:"data-id",adjustHeight:"auto",useScaling:true,enhancement:function(a){},selector:"> *",dx:0,dy:0};a.extend(e,c);if(a.browser.msie||typeof a.fn.scale=="undefined"){e.useScaling=false}var f;if(typeof arguments[1]=="function"){var f=arguments[1]}else if(typeof (arguments[2]=="function")){var f=arguments[2]}return this.each(function(c){var g;var h=[];var i=a(b).clone();var j=a(this);var k=a(this).css("height");var l;var m=false;var n=a(j).offset();var o=[];var p=a(this).find(e.selector);if(a.browser.msie&&a.browser.version.substr(0,1)<7){j.html("").append(i);return}var q=0;var r=function(){if(!q){q=1;$toDelete=j.find("> *");j.prepend(w.find("> *"));$toDelete.remove();if(m){j.css("height",l)}e.enhancement(j);if(typeof f=="function"){f.call(this)}}};var s=j.offsetParent();var t=s.offset();if(s.css("position")=="relative"){if(s.get(0).nodeName.toLowerCase()=="body"){}else{t.top+=parseFloat(s.css("border-top-width"))||0;t.left+=parseFloat(s.css("border-left-width"))||0}}else{t.top-=parseFloat(s.css("border-top-width"))||0;t.left-=parseFloat(s.css("border-left-width"))||0;t.top-=parseFloat(s.css("margin-top"))||0;t.left-=parseFloat(s.css("margin-left"))||0}if(isNaN(t.left)){t.left=0}if(isNaN(t.top)){t.top=0}t.left-=e.dx;t.top-=e.dy;j.css("height",a(this).height());p.each(function(b){o[b]=a(this).offset()});a(this).stop();var u=0;var v=0;p.each(function(b){a(this).stop();var c=a(this).get(0);if(c.style.position=="absolute"){u=-e.dx;v=-e.dy}else{u=e.dx;v=e.dy}c.style.position="absolute";c.style.margin="0";c.style.top=o[b].top-parseFloat(c.style.marginTop)-t.top+v+"px";c.style.left=o[b].left-parseFloat(c.style.marginLeft)-t.left+u+"px"});var w=a(j).clone();var x=w.get(0);x.innerHTML="";x.setAttribute("id","");x.style.height="auto";x.style.width=j.width()+"px";w.append(i);w.insertBefore(j);w.css("opacity",0);x.style.zIndex=-1;x.style.margin="0";x.style.position="absolute";x.style.top=n.top-t.top+"px";x.style.left=n.left-t.left+"px";if(e.adjustHeight==="dynamic"){j.animate({height:w.height()},e.duration,e.easing)}else if(e.adjustHeight==="auto"){l=w.height();if(parseFloat(k)<parseFloat(l)){j.css("height",l)}else{m=true}}p.each(function(b){var c=[];if(typeof e.attribute=="function"){g=e.attribute(a(this));i.each(function(){if(e.attribute(this)==g){c=a(this);return false}})}else{c=i.filter("["+e.attribute+"="+a(this).attr(e.attribute)+"]")}if(c.length){if(!e.useScaling){h.push({element:a(this),animation:{top:c.offset().top-t.top,left:c.offset().left-t.left,opacity:1}})}else{h.push({element:a(this),animation:{top:c.offset().top-t.top,left:c.offset().left-t.left,opacity:1,scale:"1.0"}})}}else{if(!e.useScaling){h.push({element:a(this),animation:{opacity:"0.0"}})}else{h.push({element:a(this),animation:{opacity:"0.0",scale:"0.0"}})}}});i.each(function(b){var c=[];var f=[];if(typeof e.attribute=="function"){g=e.attribute(a(this));p.each(function(){if(e.attribute(this)==g){c=a(this);return false}});i.each(function(){if(e.attribute(this)==g){f=a(this);return false}})}else{c=p.filter("["+e.attribute+"="+a(this).attr(e.attribute)+"]");f=i.filter("["+e.attribute+"="+a(this).attr(e.attribute)+"]")}var k;if(c.length===0){if(!e.useScaling){k={opacity:"1.0"}}else{k={opacity:"1.0",scale:"1.0"}}d=f.clone();var l=d.get(0);l.style.position="absolute";l.style.margin="0";l.style.top=f.offset().top-t.top+"px";l.style.left=f.offset().left-t.left+"px";d.css("opacity",0);if(e.useScaling){d.css("transform","scale(0.0)")}d.appendTo(j);h.push({element:a(d),animation:k})}});w.remove();e.enhancement(j);for(c=0;c<h.length;c++){h[c].element.animate(h[c].animation,e.duration,e.easing,r)}})}})(jQuery)
