/*jQuery blockUI plugin
 * Version 2.14 (18-JAN-2009)
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!*/
(function(F){if(/1\.(0|1|2)\.(0|1|2)/.test(F.fn.jquery)||/^1.1/.test(F.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+F.fn.jquery);return }F.blockUI=function(M){C(window,M)};F.unblockUI=function(M){G(window,M)};F.growlUI=function(P,N,O){var M=F('<div class="growlUI"></div>');if(P){M.append("<h1>"+P+"</h1>")}if(N){M.append("<h2>"+N+"</h2>")}if(O==undefined){O=3000}F.blockUI({message:M,fadeIn:700,fadeOut:1000,centerY:false,timeout:O,showOverlay:false,css:F.blockUI.defaults.growlCSS})};F.fn.block=function(M){return this.each(function(){if(F.css(this,"position")=="static"){this.style.position="relative"}if(F.browser.msie){this.style.zoom=1}C(this,M)})};F.fn.unblock=function(M){return this.each(function(){G(this,M)})};F.blockUI.version=2.14;F.blockUI.defaults={message:"<h1>Please wait...</h1>",css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},overlayCSS:{backgroundColor:"#000",opacity:"0.6"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:"0.6",cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var D=F.browser.msie&&/MSIE 6.0/.test(navigator.userAgent),B=null,E=[];function C(O,M){var X=(O==window),P=M&&M.message!==undefined?M.message:undefined;M=F.extend({},F.blockUI.defaults,M||{});M.overlayCSS=F.extend({},F.blockUI.defaults.overlayCSS,M.overlayCSS||{});var W=F.extend({},F.blockUI.defaults.css,M.css||{});P=P===undefined?M.message:P;if(X&&B){G(window,{fadeOut:0})}if(P&&typeof P!="string"&&(P.parentNode||P.jquery)){var R=(P.jquery?P[0]:P),V={};F(O).data("blockUI.history",V);V.el=R;V.parent=R.parentNode;V.display=R.style.display;V.position=R.style.position;if(V.parent){V.parent.removeChild(R)}}var Y=M.baseZ,U=((F.browser.msie)?F('<iframe class="blockUI" style="z-index:'+Y+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>'):F('<div class="blockUI" style="display:none"></div>')),T=F('<div class="blockUI blockOverlay" style="z-index:'+Y+++';display:none;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),Q=X?F('<div class="blockUI blockMsg blockPage" style="z-index:'+Y+';display:none;position:fixed"></div>'):F('<div class="blockUI blockMsg blockElement" style="z-index:'+Y+';display:none;position:absolute"></div>');if(P){Q.css(W)}if(!M.applyPlatformOpacityRules||!(F.browser.mozilla&&/Linux/.test(navigator.platform))){T.css(M.overlayCSS)}T.css("position",X?"fixed":"absolute");if(F.browser.msie){U.css("opacity","0.0")}F([U[0],T[0],Q[0]]).appendTo(X?"body":O);var a=F.browser.msie&&(!F.boxModel||F("object,embed",X?null:O).length>0);if(D||a){if(X&&M.allowBodyStretch&&F.boxModel){F("html,body").css("height","100%")}if((D||!F.boxModel)&&!X){var b=J(O,"borderTopWidth"),S=J(O,"borderLeftWidth"),Z=(b?"(0 - "+b+")":0),N=S?"(0 - "+S+")":0}F.each([U,T,Q],function(c,g){var d=g[0].style;d.position="absolute";if(c<2){X?d.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+M.quirksmodeOffsetHack+') + "px"'):d.setExpression("height",'this.parentNode.offsetHeight + "px"');X?d.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):d.setExpression("width",'this.parentNode.offsetWidth + "px"');if(N){d.setExpression("left",N)}if(Z){d.setExpression("top",Z)}}else{if(M.centerY){if(X){d.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}d.marginTop=0}else{if(!M.centerY&&X){var e=((M.css&&M.css.top)?parseInt(M.css.top):0),f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';d.setExpression("top",f)}}}})}Q.append(P);if(P&&(P.jquery||P.nodeType)){F(P).show()}if(M.fadeIn){if(F.browser.msie&&M.showOverlay){U.fadeIn(M.fadeIn)}if(M.showOverlay){T.fadeIn(M.fadeIn)}Q.fadeIn(M.fadeIn)}else{if(F.browser.msie&&M.showOverlay){U.show()}if(M.showOverlay){T.show()}Q.show()}I(1,O,M);if(X){B=Q[0];E=F(":input:enabled:visible",B);if(M.focusInput){setTimeout(L,20)}}else{A(Q[0],M.centerX,M.centerY)}if(M.timeout){setTimeout(function(){X?F.unblockUI(M):F(O).unblock(M)},M.timeout)}}function G(O,P){var N=O==window,Q=F(O).data("blockUI.history");P=F.extend({},F.blockUI.defaults,P||{});I(0,O,P);var M=N?F("body").children().filter(".blockUI"):F(".blockUI",O);if(N){B=E=null}if(P.fadeOut){M.fadeOut(P.fadeOut);setTimeout(function(){H(M,Q,P,O)},P.fadeOut)}else{H(M,Q,P,O)}}function H(M,P,O,N){M.each(function(Q,R){if(this.parentNode){this.parentNode.removeChild(this)}});if(P&&P.el){P.el.style.display=P.display;P.el.style.position=P.position;if(P.parent){P.parent.appendChild(P.el)}F(P.el).removeData("blockUI.history")}if(typeof O.onUnblock=="function"){O.onUnblock(N,O)}}function I(M,Q,R){var P=Q==window,O=F(Q);if(!M&&(P&&!B||!P&&!O.data("blockUI.isBlocked"))){return }if(!P){O.data("blockUI.isBlocked",M)}if(M&&!R.showOverlay){return }var N="mousedown mouseup keydown keypress";M?F(document).bind(N,R,K):F(document).unbind(N,K)}function K(P){if(P.keyCode&&P.keyCode==9){if(B&&P.data.constrainTabKey){var O=E,N=!P.shiftKey&&P.target==O[O.length-1],M=P.shiftKey&&P.target==O[0];if(N||M){setTimeout(function(){L(M)},10);return false}}}if(F(P.target).parents("div.blockMsg").length>0){return true}return F(P.target).parents().children().filter("div.blockUI").length==0}function L(M){if(!E){return }var N=E[M===true?E.length-1:0];if(N){N.focus()}}function A(Q,M,S){var R=Q.parentNode,P=Q.style,N=(((R.offsetWidth-Q.offsetWidth)/2)-J(R,"borderLeftWidth")),O=((R.offsetHeight-Q.offsetHeight)/2)-J(R,"borderTopWidth");if(M){P.left=N>0?(N+"px"):"0"}if(S){P.top=O>0?(O+"px"):"0"}}function J(M,N){return parseInt(F.css(M,N))||0}})(jQuery);
/*Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 9/11/2008
 * @author Ariel Flesler
 * @version 1.4
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
/*jquery.event.drag.js ~ v1.4 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)  Liscensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt*/
(function(H){H.fn.drag=function(K,J,I){if(J){this.bind("dragstart",K)}if(I){this.bind("dragend",I)}return !K?this.trigger("drag"):this.bind("drag",J?J:K)};var D=H.event,B=D.special,F=B.drag={not:":input",distance:0,which:1,setup:function(I){I=H.extend({distance:F.distance,which:F.which,not:F.not},I||{});I.distance=G(I.distance);D.add(this,"mousedown",E,I)},teardown:function(){D.remove(this,"mousedown",E);if(this===F.dragging){F.dragging=F.proxy=null}C(this,true)}};function E(K){var J=this,I,L=K.data||{};if(L.elem){J=K.dragTarget=L.elem;K.dragProxy=F.proxy||J;K.cursorOffsetX=L.pageX-L.left;K.cursorOffsetY=L.pageY-L.top;K.offsetX=K.pageX-K.cursorOffsetX;K.offsetY=K.pageY-K.cursorOffsetY}else{if(F.dragging||(L.which>0&&K.which!=L.which)||H(K.target).is(L.not)){return }}switch(K.type){case"mousedown":H.extend(L,H(J).offset(),{elem:J,target:K.target,pageX:K.pageX,pageY:K.pageY});D.add(document,"mousemove mouseup",E,L);C(J,false);return false;case !F.dragging&&"mousemove":if(G(K.pageX-L.pageX)+G(K.pageY-L.pageY)<L.distance){break}K.target=L.target;I=A(K,"dragstart",J);if(I!==false){F.dragging=J;F.proxy=K.dragProxy=H(I||J)[0]}case"mousemove":if(F.dragging){I=A(K,"drag",J);if(B.drop){B.drop.allowed=(I!==false);B.drop.handler(K)}if(I!==false){break}K.type="mouseup"}case"mouseup":D.remove(document,"mousemove mouseup",E);if(F.dragging){if(B.drop){B.drop.handler(K)}A(K,"dragend",J)}C(J,true);F.dragging=F.proxy=L.elem=null;break}}function A(L,J,K){L.type=J;var I=D.handle.call(K,L);return I===false?false:I||L.result}function G(I){return Math.pow(I,2)}function C(J,I){if(!J){return }J.unselectable=I?"off":"on";J.onselectstart=function(){return I};if(document.selection&&document.selection.empty){document.selection.empty()}if(J.style){J.style.MozUserSelect=I?"":"none"}}})(jQuery);
