(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){$("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(html),this.firstChild)})}return this}})(jQuery);(function($){var ajax=$.ajax,pendingRequests={},synced=[],syncedData=[];$.ajax=function(settings){settings=jQuery.extend(settings,jQuery.extend({},jQuery.ajaxSettings,settings));var port=settings.port;switch(settings.mode){case "abort":pendingRequests[port]&&pendingRequests[port].abort();return pendingRequests[port]=ajax.apply(this,arguments);case "queue":var _old=settings.complete;settings.complete=function(){_old&&_old.apply(this,arguments);jQuery([ajax]).dequeue("ajax"+port)};jQuery([ajax]).queue("ajax"+port,function(){ajax(settings)});return;case "sync":var pos=synced.length;synced[pos]={error:settings.error,success:settings.success,complete:settings.complete,done:false};syncedData[pos]={error:[],success:[],complete:[]};settings.error=function(){syncedData[pos].error=arguments};settings.success=function(){syncedData[pos].success=arguments};settings.complete=function(){syncedData[pos].complete=arguments;synced[pos].done=true;if(pos==0||!synced[pos-1])for(var i=pos;i<synced.length&&synced[i].done;i++){synced[i].error&&synced[i].error.apply(jQuery,syncedData[i].error);synced[i].success&&synced[i].success.apply(jQuery,syncedData[i].success);synced[i].complete&&synced[i].complete.apply(jQuery,syncedData[i].complete);synced[i]=null;syncedData[i]=null}}}return ajax.apply(this,arguments)}})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date;date.setTime(date.getTime()+options.expires*24*60*60*1e3)}else date=options.expires;expires="; expires="+date.toUTCString()}var path=options.path?"; path="+options.path:"",domain=options.domain?"; domain="+options.domain:"",secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!="")for(var cookies=document.cookie.split(";"),i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==name+"="){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}return cookieValue}};jQuery&&(function(){$.extend($.fn,{rightClick:function(handler){$(this).each(function(){$(this).mousedown(function(e){var evt=e;$(this).mouseup(function(){$(this).unbind("mouseup");if(evt.button==2){handler.call($(this),evt);return false}else return true})});$(this)[0].oncontextmenu=function(){return false}});return $(this)},rightMouseDown:function(handler){$(this).each(function(){$(this).mousedown(function(e){if(e.button==2){handler.call($(this),e);return false}else return true});$(this)[0].oncontextmenu=function(){return false}});return $(this)},rightMouseUp:function(handler){$(this).each(function(){$(this).mouseup(function(e){if(e.button==2){handler.call($(this),e);return false}else return true});$(this)[0].oncontextmenu=function(){return false}});return $(this)},noContext:function(){$(this).each(function(){$(this)[0].oncontextmenu=function(){return false}});return $(this)}})})(jQuery);(function($){var ua=navigator.userAgent,moz=$.browser.mozilla&&/gecko/i.test(ua),webkit=$.browser.safari&&/Safari\/[5-9]/.test(ua),expr=$.browser.msie&&function(){var div=document.createElement("div");try{div.style.setExpression("width","0+0")}catch(e){return false}return true}();function sz(el,p){return parseInt($.css(el,p))||0}function hex2(s){var s=parseInt(s).toString(16);return s.length<2?"0"+s:s}function gpc(node){for(;node&&node.nodeName.toLowerCase()!="html";node=node.parentNode){var v=$.css(node,"backgroundColor");if(v=="rgba(0, 0, 0, 0)")continue;if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return "#"+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2])}if(v&&v!="transparent")return v}return "#ffffff"}function getWidth(fx,i,width){switch(fx){case "round":return Math.round(width*(1-Math.cos(Math.asin(i/width))));case "cool":return Math.round(width*(1+Math.cos(Math.asin(i/width))));case "sharp":return Math.round(width*(1-Math.cos(Math.acos(i/width))));case "bite":return Math.round(width*Math.cos(Math.asin((width-i-1)/width)));case "slide":return Math.round(width*Math.atan2(i,width/i));case "jut":return Math.round(width*Math.atan2(width,width-i-1));case "curl":return Math.round(width*Math.atan(i));case "tear":return Math.round(width*Math.cos(i));case "wicked":return Math.round(width*Math.tan(i));case "long":return Math.round(width*Math.sqrt(i));case "sculpt":return Math.round(width*Math.log(width-i-1,width));case "dog":return i&1?i+1:width;case "dog2":return i&2?i+1:width;case "dog3":return i&3?i+1:width;case "fray":return i%2*width;case "notch":return width;case "bevel":return i+1}}$.fn.corner=function(options){if(this.length==0){if(!$.isReady&&this.selector){var s=this.selector,c=this.context;$(function(){$(s,c).corner(options)})}return this}return this.each(function(){var $this=$(this),o=[options||"",$this.attr($.fn.corner.defaults.metaAttr)||""].join(" ").toLowerCase(),keep=/keep/.test(o),cc=(o.match(/cc:(#[0-9a-f]+)/)||[])[1],sc=(o.match(/sc:(#[0-9a-f]+)/)||[])[1],width=parseInt((o.match(/(\d+)px/)||[])[1])||10,re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/,fx=(o.match(re)||["round"])[0],edges={T:0,B:1},opts={TL:/top|tl|left/.test(o),TR:/top|tr|right/.test(o),BL:/bottom|bl|left/.test(o),BR:/bottom|br|right/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR)opts={TL:1,TR:1,BL:1,BR:1};if($.fn.corner.defaults.useNative&&fx=="round"&&(moz||webkit)&&!cc&&!sc){opts.TL&&$this.css(moz?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",width+"px");opts.TR&&$this.css(moz?"-moz-border-radius-topright":"-webkit-border-top-right-radius",width+"px");opts.BL&&$this.css(moz?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",width+"px");opts.BR&&$this.css(moz?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",width+"px");return}var strip=document.createElement("div");strip.style.overflow="hidden";strip.style.height="1px";strip.style.backgroundColor=sc||"transparent";strip.style.borderStyle="solid";var pad={T:parseInt($.css(this,"paddingTop"))||0,R:parseInt($.css(this,"paddingRight"))||0,B:parseInt($.css(this,"paddingBottom"))||0,L:parseInt($.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined)this.style.zoom=1;if(!keep)this.style.border="none";strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,"height");for(var j in edges){var bot=edges[j];if(bot&&(opts.BL||opts.BR)||!bot&&(opts.TL||opts.TR)){strip.style.borderStyle="none "+(opts[j+"R"]?"solid":"none")+" none "+(opts[j+"L"]?"solid":"none");var d=document.createElement("div");$(d).addClass("jquery-corner");var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!="auto"){if($.css(this,"position")=="static")this.style.position="relative";ds.position="absolute";ds.bottom=ds.left=ds.padding=ds.margin="0";if(expr)ds.setExpression("width","this.parentNode.offsetWidth");else ds.width="100%"}else if(!bot&&$.browser.msie){if($.css(this,"position")=="static")this.style.position="relative";ds.position="absolute";ds.top=ds.left=ds.right=ds.padding=ds.margin="0";if(expr){var bw=sz(this,"borderLeftWidth")+sz(this,"borderRightWidth");ds.setExpression("width","this.parentNode.offsetWidth - "+bw+'+ "px"')}else ds.width="100%"}else{ds.position="relative";ds.margin=!bot?"-"+pad.T+"px -"+pad.R+"px "+(pad.T-width)+"px -"+pad.L+"px":pad.B-width+"px -"+pad.R+"px -"+pad.B+"px -"+pad.L+"px"}for(var i=0;i<width;i++){var w=Math.max(0,getWidth(fx,i,width)),e=strip.cloneNode(false);e.style.borderWidth="0 "+(opts[j+"R"]?w:0)+"px 0 "+(opts[j+"L"]?w:0)+"px";bot?d.appendChild(e):d.insertBefore(e,d.firstChild)}}}})};$.fn.uncorner=function(){(moz||webkit)&&this.css(moz?"-moz-border-radius":"-webkit-border-radius",0);$("div.jquery-corner",this).remove();return this};$.fn.corner.defaults={useNative:true,metaAttr:"data-corner"}})(jQuery);$.fn.equalHeights=function(){var currentTallest=0;$(this).each(function(){$(this).children().each(function(){if($(this).height()>currentTallest)currentTallest=$(this).height()})});$(this).each(function(){$(this).children().each(function(){});$.browser.msie&&$.browser.version==6&&$(this).children().css({height:currentTallest});$(this).children().css({"min-height":currentTallest})});return this};jQuery.fn.delay=function(time,func){this.each(function(){setTimeout(func,time)});return this};(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:"xy",duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=="BackCompat"?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=="object"){b=j;j=0}if(typeof b=="function")b={onAfter:b};if(n=="max")n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is("html,body");switch(typeof f){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case "object":if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(""),function(a,i){var e=i=="x"?"Left":"Top",h=e.toLowerCase(),c="scroll"+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css("margin"+e))||0;g[c]-=parseInt(f.css("border"+e+"Width"))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=="x"?"width":"height"]()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=="%"?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){l!=g[c]&&t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=="x"?"Width":"Height",h="scroll"+e;if(!d(a).is("html,body"))return a[h]-d(a)[e.toLowerCase()]();var c="client"+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=="object"?a:{top:a,left:a}}})(jQuery);jQuery.url=function(){var segments={},parsed={},options={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},parseUri=function(){str=decodeURI(options.url);var m=options.parser[options.strictMode?"strict":"loose"].exec(str),uri={},i=14;while(i--)uri[options.key[i]]=m[i]||"";uri[options.q.name]={};uri[options.key[12]].replace(options.q.parser,function($0,$1,$2){if($1)uri[options.q.name][$1]=$2});return uri},key=function(key){!parsed.length&&setUp();if(key=="base")if(parsed.port!==null&&parsed.port!=="")return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/";else return parsed.protocol+"://"+parsed.host+"/";return parsed[key]===""?null:parsed[key]},param=function(item){!parsed.length&&setUp();return parsed.queryKey[item]===null?null:parsed.queryKey[item]},setUp=function(){parsed=parseUri();getSegments()},getSegments=function(){var p=parsed.path;segments=[];segments=parsed.path.length==1?{}:(p.charAt(p.length-1)=="/"?p.substring(1,p.length-1):(path=p.substring(1))).split("/")};return {setMode:function(mode){strictMode=mode=="strict"?true:false;return this},setUrl:function(newUri){options.url=newUri===undefined?window.location:newUri;setUp();return this},segment:function(pos){!parsed.length&&setUp();if(pos===undefined)return segments.length;return segments[pos]===""||segments[pos]===undefined?null:segments[pos]},attr:key,param:param}}();
