/*

 http://www.protofunc.com/scripts/jquery/backgroundPosition/
 MIT http://jquery.com/dev/svn/trunk/jquery/MIT-LICENSE.txt
 @author Alexander Farkas
 v. 1.02
*/
(function(a){a.extend(a.fx.step,{backgroundPosition:function(c){function g(e){e=e.replace(/left|top/g,"0px");e=e.replace(/right|bottom/g,"100%");e=e.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");e=e.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(e[1],10),e[2],parseFloat(e[3],10),e[4]]}if(c.state===0&&typeof c.end=="string"){var b=a.curCSS(c.elem,"backgroundPosition");b=g(b);c.start=[b[0],b[2]];b=g(c.end);c.end=[b[0],b[2]];c.unit=[b[1],b[3]]}b=[];b[0]=(c.end[0]-c.start[0])*
c.pos+c.start[0]+c.unit[0];b[1]=(c.end[1]-c.start[1])*c.pos+c.start[1]+c.unit[1];c.elem.style.backgroundPosition=b[0]+" "+b[1]}})})(jQuery);/*
 
 hoverIntent by Brian Cherne 
 <http://cherne.net/brian/resources/jquery.hoverIntent.html>

 hoverIntent is currently available for use in all personal or commercial 
 projects under both MIT and GPL licenses. This means that you can choose 
 the license that best suits your project, and use it accordingly.
*/
(function(a){a.fn.hoverIntent=function(c,g){var b={sensitivity:7,interval:100,timeout:0};b=a.extend(b,g?{over:c,out:g}:c);var e,h,j,r,o=function(w){e=w.pageX;h=w.pageY},t=function(w,A){A.hoverIntent_t=clearTimeout(A.hoverIntent_t);if(Math.abs(j-e)+Math.abs(r-h)<b.sensitivity){a(A).unbind("mousemove",o);A.hoverIntent_s=1;return b.over.apply(A,[w])}else{j=e;r=h;A.hoverIntent_t=setTimeout(function(){t(w,A)},b.interval)}},s=function(w,A){A.hoverIntent_t=clearTimeout(A.hoverIntent_t);A.hoverIntent_s=0;
return b.out.apply(A,[w])},u=function(w){for(var A=(w.type=="mouseover"?w.fromElement:w.toElement)||w.relatedTarget;A&&A!=this;)try{A=A.parentNode}catch(H){A=this}if(A==this)return false;var d=jQuery.extend({},w),f=this;if(f.hoverIntent_t)f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if(w.type=="mouseover"){j=d.pageX;r=d.pageY;a(f).bind("mousemove",o);if(f.hoverIntent_s!=1)f.hoverIntent_t=setTimeout(function(){t(d,f)},b.interval)}else{a(f).unbind("mousemove",o);if(f.hoverIntent_s==1)f.hoverIntent_t=
setTimeout(function(){s(d,f)},b.timeout)}};return this.mouseover(u).mouseout(u)}})(jQuery);/*

 
 over label effect from http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/#comment-24381
*/
(function(a){a.fn.overlabel=function(){this.filter("label[for]").each(function(){var c=a(this),g=a('input[id="'+a(this).attr("for")+'"]');if(g.html()==null)g=a('textarea[id="'+a(this).attr("for")+'"]');if(g){var b=function(){if(g.val()==c.html()||g.val()==""){g.val(c.html());g.addClass("overlabel_shown")}};c.hide();g.focus(function(){if(g.val()==c.html()||g.val()==""){g.val("");g.removeClass("overlabel_shown")}}).blur(b).each(b)}})}})(jQuery);/*

 Superfish v1.4.8 - jQuery menu widget
 Copyright (c) 2008 Joel Birch

 Dual licensed under the MIT and GPL licenses:
 http://www.opensource.org/licenses/mit-license.php
 http://www.gnu.org/licenses/gpl.html

 CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
(function(a){a.fn.superfish=function(g){var b=a.fn.superfish,e=b.c,h=a(['<span class="',e.arrowClass,'"> &#187;</span>'].join("")),j=function(){var s=a(this),u=o(s);clearTimeout(u.sfTimer);s.showSuperfishUl().siblings().hideSuperfishUl()},r=function(){var s=a(this),u=o(s),w=b.op;clearTimeout(u.sfTimer);u.sfTimer=setTimeout(function(){w.retainPath=a.inArray(s[0],w.$path)>-1;s.hideSuperfishUl();w.$path.length&&s.parents(["li.",w.hoverClass].join("")).length<1&&j.call(w.$path)},w.delay)},o=function(s){s=
s.parents(["ul.",e.menuClass,":first"].join(""))[0];b.op=b.o[s.serial];return s},t=function(s){s.addClass(e.anchorClass).append(h.clone())};return this.each(function(){var s=this.serial=b.o.length,u=a.extend({},b.defaults,g);u.$path=a("li."+u.pathClass,this).slice(0,u.pathLevels).each(function(){a(this).addClass([u.hoverClass,e.bcClass].join(" ")).filter("li:has(ul)").removeClass(u.pathClass)});b.o[s]=b.op=u;a("li:has(ul)",this)[a.fn.hoverIntent&&!u.disableHI?"hoverIntent":"hover"](j,r).each(function(){u.autoArrows&&
t(a(">a:first-child",this))}).not("."+e.bcClass).hideSuperfishUl();var w=a("a",this);w.each(function(A){var H=w.eq(A).parents("li");w.eq(A).focus(function(){j.call(H)}).blur(function(){r.call(H)})});u.onInit.call(this)}).each(function(){var s=[e.menuClass];b.op.dropShadows&&!(a.browser.msie&&a.browser.version<7)&&s.push(e.shadowClass);a(this).addClass(s.join(" "))})};var c=a.fn.superfish;c.o=[];c.op={};c.IE7fix=function(){var g=c.op;a.browser.msie&&a.browser.version>6&&g.dropShadows&&g.animation.opacity!=
undefined&&this.toggleClass(c.c.shadowClass+"-off")};c.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};c.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};a.fn.extend({hideSuperfishUl:function(){var g=c.op,
b=g.retainPath===true?g.$path:"";g.retainPath=false;b=a(["li.",g.hoverClass].join(""),this).add(this).not(b).removeClass(g.hoverClass).find(">ul").hide().css("visibility","hidden");g.onHide.call(b);return this},showSuperfishUl:function(){var g=c.op,b=this.addClass(g.hoverClass).find(">ul:hidden").css("visibility","visible");c.IE7fix.call(b);g.onBeforeShow.call(b);b.animate(g.animation,g.speed,function(){c.IE7fix.call(b);g.onShow.call(b)});return this}})})(jQuery);/*

 Supersubs v0.2b - jQuery plugin
 Copyright (c) 2008 Joel Birch

 Dual licensed under the MIT and GPL licenses:
 http://www.opensource.org/licenses/mit-license.php
 http://www.gnu.org/licenses/gpl.html


 This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
 their longest list item children. If you use this, please expect bugs and report them
 to the jQuery Google Group with the word 'Superfish' in the subject line.

*/
(function(a){a.fn.supersubs=function(c){var g=a.extend({},a.fn.supersubs.defaults,c);return this.each(function(){var b=a(this),e=a.meta?a.extend({},g,b.data()):g,h=a('<li id="menu-fontsize">&#8212;</li>').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo(b).width();a("#menu-fontsize").remove();$ULs=b.find("ul");$ULs.each(function(j){j=$ULs.eq(j);var r=j.children(),o=r.children("a"),t=r.css("white-space","nowrap").css("float"),s=j.add(r).add(o).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/
h;s+=e.extraWidth;if(s>e.maxWidth)s=e.maxWidth;else if(s<e.minWidth)s=e.minWidth;s+="em";j.css("width",s);r.css({"float":t,width:"100%","white-space":"normal"}).each(function(){var u=a(">ul",this),w=u.css("left")!==undefined?"left":"right";u.css(w,s)})})})};a.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);/*

 jQuery.ScrollTo - Easy element scrolling using jQuery.
 Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 Dual licensed under MIT and GPL.
 Date: 5/25/2009
 @author Ariel Flesler
 @version 1.4.2

 http://flesler.blogspot.com/2007/10/jqueryscrollto.html
*/
(function(a){function c(b){return typeof b=="object"?b:{top:b,left:b}}var g=a.scrollTo=function(b,e,h){a(window).scrollTo(b,e,h)};g.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1};g.window=function(){return a(window)._scrollable()};a.fn._scrollable=function(){return this.map(function(){if(!(!this.nodeName||a.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1))return this;var b=(this.contentWindow||this).document||this.ownerDocument||this;return a.browser.safari||
b.compatMode=="BackCompat"?b.body:b.documentElement})};a.fn.scrollTo=function(b,e,h){if(typeof e=="object"){h=e;e=0}if(typeof h=="function")h={onAfter:h};if(b=="max")b=9E9;h=a.extend({},g.defaults,h);e=e||h.speed||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)e/=2;h.offset=c(h.offset);h.over=c(h.over);return this._scrollable().each(function(){function j(A){o.animate(u,e,h.easing,A&&function(){A.call(this,b,h)})}var r=this,o=a(r),t=b,s,u={},w=o.is("html,body");switch(typeof t){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(t)){t=
c(t);break}t=a(t,this);case "object":if(t.is||t.style)s=(t=a(t)).offset()}a.each(h.axis.split(""),function(A,H){var d=H=="x"?"Left":"Top",f=d.toLowerCase(),k="scroll"+d,m=r[k],n=g.max(r,H);if(s){u[k]=s[f]+(w?0:m-o.offset()[f]);if(h.margin){u[k]-=parseInt(t.css("margin"+d))||0;u[k]-=parseInt(t.css("border"+d+"Width"))||0}u[k]+=h.offset[f]||0;if(h.over[f])u[k]+=t[H=="x"?"width":"height"]()*h.over[f]}else{d=t[f];u[k]=d.slice&&d.slice(-1)=="%"?parseFloat(d)/100*n:d}if(/^\d+$/.test(u[k]))u[k]=u[k]<=0?
0:Math.min(u[k],n);if(!A&&h.queue){m!=u[k]&&j(h.onAfterFirst);delete u[k]}});j(h.onAfter)}).end()};g.max=function(b,e){var h=e=="x"?"Width":"Height",j="scroll"+h;if(!a(b).is("html,body"))return b[j]-a(b)[h.toLowerCase()]();h="client"+h;var r=b.ownerDocument.documentElement,o=b.ownerDocument.body;return Math.max(r[j],o[j])-Math.min(r[h],o[h])}})(jQuery);/*



 jQuery 'onImagesLoaded' plugin v1.1.1 (Updated January 27, 2010)
 Fires callback functions when images have loaded within a particular selector.

 Copyright (c) Cirkuit Networks, Inc. (http://www.cirkuit.net), 2008-2010.
 Dual licensed under the MIT and GPL licenses:
 http://www.opensource.org/licenses/mit-license.php
 http://www.gnu.org/licenses/gpl.html

 For documentation and usage, visit "http://includes.cirkuit.net/includes/js/jquery/plugins/onImagesLoad/1.1.1/documentation/"
*/
(function(a){a.fn.onImagesLoad=function(c){var g=this;g.opts=a.extend({},a.fn.onImagesLoad.defaults,c);g.bindEvents=function(e,h,j){if(e.length===0)g.opts.callbackIfNoImagesExist&&j&&j(h);else{var r=[];e.jquery||(e=a(e));e.each(function(o){var t=this.src;if(!a.browser.msie)this.src="";a(this).bind("load",function(){if(jQuery.inArray(o,r)<0){r.push(o);r.length==e.length&&j&&j.call(h,h)}});if(a.browser.msie){if(this.complete||this.complete===undefined)this.src=t}else this.src=t})}};var b=[];g.each(function(){if(g.opts.itemCallback){var e;
e=this.tagName=="IMG"?this:a("img",this);g.bindEvents(e,this,g.opts.itemCallback)}if(g.opts.selectorCallback)this.tagName=="IMG"?b.push(this):a("img",this).each(function(){b.push(this)})});g.opts.selectorCallback&&g.bindEvents(b,this,g.opts.selectorCallback);return g.each(function(){})};a.fn.onImagesLoad.defaults={selectorCallback:null,itemCallback:null,callbackIfNoImagesExist:false}})(jQuery);
