/****************************************************************************************

DOC			jQuery Plugin Scripts
VERSION 	1.0
AUTHOR		Doug Scamahorn
EMAIL		dscamahorn@fusionalliance.com

DATE       	NAME           	DESCRIPTON
03/25/2011 	Doug Scamahorn 	Initial creation.

****************************************************************************************/

/* =BGIFRAME - http://plugins.jquery.com/project/bgiframe
---------------------------------------------------------------------------------------*/

/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
 * $Rev: 2447 $
 *
 * Version 2.1.1
 */
(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(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);

/* =COOKIE - https://github.com/carhartl/jquery-cookie
---------------------------------------------------------------------------------------*/

/*jslint browser: true */ /*global jQuery: true */

/**
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

// TODO JsDoc

/**
 * Create a cookie with the given key and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String key The key of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given key.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String key The key of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

jQuery.cookie=function(e,b,a){if(arguments.length>1&&String(b)!=="[object Object]"){a=jQuery.extend({},a);if(b===null||b===void 0)a.expires=-1;if(typeof a.expires==="number"){var d=a.expires,c=a.expires=new Date;c.setDate(c.getDate()+d)}b=String(b);return document.cookie=[encodeURIComponent(e),"=",a.raw?b:encodeURIComponent(b),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}a=b||{};c=a.raw?function(a){return a}:
decodeURIComponent;return(d=RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?c(d[1]):null};

/* =SLIDER - http://slidesjs.com
---------------------------------------------------------------------------------------*/

/*
* Slides, A Slideshow Plugin for jQuery
* Intructions: http://slidesjs.com
* By: Nathan Searles, http://nathansearles.com
* Version: 1.1.6
* Updated: March 23th, 2011
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

(function($){$.fn.slides=function(g){g=$.extend({},$.fn.slides.option,g);return this.each(function(){$('.'+g.container,$(this)).children().wrapAll('<div class="slides_control"/>');var d=$(this),control=$('.slides_control',d),total=control.children().size(),width=control.children().outerWidth(),height=control.children().outerHeight(),start=g.start-1,effect=g.effect.indexOf(',')<0?g.effect:g.effect.replace(' ','').split(',')[0],paginationEffect=g.effect.indexOf(',')<0?effect:g.effect.replace(' ','').split(',')[1],next=0,prev=0,number=0,current=0,loaded,active,clicked,position,direction,imageParent,pauseTimeout,playInterval;function animate(a,b,c){if(!active&&loaded){active=true;g.animationStart(current+1);switch(a){case'next':prev=current;next=current+1;next=total===next?0:next;position=width*2;a=-width*2;current=next;break;case'prev':prev=current;next=current-1;next=next===-1?total-1:next;position=0;a=0;current=next;break;case'pagination':next=parseInt(c,10);prev=$('.'+g.paginationClass+' li.current a',d).attr('href').match('[^#/]+$');if(next>prev){position=width*2;a=-width*2}else{position=0;a=0}current=next;break}if(b==='fade'){if(g.crossfade){control.children(':eq('+next+')',d).css({zIndex:10}).fadeIn(g.fadeSpeed,g.fadeEasing,function(){if(g.autoHeight){control.animate({height:control.children(':eq('+next+')',d).outerHeight()},g.autoHeightSpeed,function(){control.children(':eq('+prev+')',d).css({display:'none',zIndex:0});control.children(':eq('+next+')',d).css({zIndex:0});g.animationComplete(next+1);active=false})}else{control.children(':eq('+prev+')',d).css({display:'none',zIndex:0});control.children(':eq('+next+')',d).css({zIndex:0});g.animationComplete(next+1);active=false}})}else{control.children(':eq('+prev+')',d).fadeOut(g.fadeSpeed,g.fadeEasing,function(){if(g.autoHeight){control.animate({height:control.children(':eq('+next+')',d).outerHeight()},g.autoHeightSpeed,function(){control.children(':eq('+next+')',d).fadeIn(g.fadeSpeed,g.fadeEasing)})}else{control.children(':eq('+next+')',d).fadeIn(g.fadeSpeed,g.fadeEasing,function(){if($.browser.msie){$(this).get(0).style.removeAttribute('filter')}})}g.animationComplete(next+1);active=false})}}else{control.children(':eq('+next+')').css({left:position,display:'block'});if(g.autoHeight){control.animate({left:a,height:control.children(':eq('+next+')').outerHeight()},g.slideSpeed,g.slideEasing,function(){control.css({left:-width});control.children(':eq('+next+')').css({left:width,zIndex:5});control.children(':eq('+prev+')').css({left:width,display:'none',zIndex:0});g.animationComplete(next+1);active=false})}else{control.animate({left:a},g.slideSpeed,g.slideEasing,function(){control.css({left:-width});control.children(':eq('+next+')').css({left:width,zIndex:5});control.children(':eq('+prev+')').css({left:width,display:'none',zIndex:0});g.animationComplete(next+1);active=false})}}if(g.pagination){$('.'+g.paginationClass+' li.current',d).removeClass('current');$('.'+g.paginationClass+' li:eq('+next+')',d).addClass('current')}}}function stop(){clearInterval(d.data('interval'))}function pause(){if(g.pause){clearTimeout(d.data('pause'));clearInterval(d.data('interval'));pauseTimeout=setTimeout(function(){clearTimeout(d.data('pause'));playInterval=setInterval(function(){animate("next",effect)},g.play);d.data('interval',playInterval)},g.pause);d.data('pause',pauseTimeout)}else{stop()}}if(total<2){return}if(start<0){start=0}if(start>total){start=total-1}if(g.start){current=start}if(g.randomize){control.randomize()}$('.'+g.container,d).css({overflow:'hidden',position:'relative'});control.children().css({position:'absolute',top:0,left:control.children().outerWidth(),zIndex:0,display:'none'});control.css({position:'relative',width:(width*3),height:height,left:-width});$('.'+g.container,d).css({display:'block'});if(g.autoHeight){control.children().css({height:'auto'});control.animate({height:control.children(':eq('+start+')').outerHeight()},g.autoHeightSpeed)}if(g.preload&&control.find('img').length){$('.'+g.container,d).css({background:'url('+g.preloadImage+') no-repeat 50% 50%'});var f=control.find('img:eq('+start+')').attr('src')+'?'+(new Date()).getTime();if($('img',d).parent().attr('class')!='slides_control'){imageParent=control.children(':eq(0)')[0].tagName.toLowerCase()}else{imageParent=control.find('img:eq('+start+')')}control.find('img:eq('+start+')').attr('src',f).load(function(){control.find(imageParent+':eq('+start+')').fadeIn(g.fadeSpeed,g.fadeEasing,function(){$(this).css({zIndex:5});$('.'+g.container,d).css({background:''});loaded=true;g.slidesLoaded()})})}else{control.children(':eq('+start+')').fadeIn(g.fadeSpeed,g.fadeEasing,function(){loaded=true;g.slidesLoaded()})}if(g.bigTarget){control.children().css({cursor:'pointer'});control.children().click(function(){animate('next',effect);return false})}if(g.hoverPause&&g.play){control.bind('mouseover',function(){stop()});control.bind('mouseleave',function(){pause()})}if(g.generateNextPrev){$('.'+g.container,d).after('<a href="#" class="'+g.prev+'">Prev</a>');$('.'+g.prev,d).after('<a href="#" class="'+g.next+'">Next</a>')}$('.'+g.next,d).click(function(e){e.preventDefault();if(g.play){pause()}animate('next',effect)});$('.'+g.prev,d).click(function(e){e.preventDefault();if(g.play){pause()}animate('prev',effect)});if(g.generatePagination){d.append('<ul class='+g.paginationClass+'></ul>');control.children().each(function(){$('.'+g.paginationClass,d).append('<li><a href="#'+number+'">'+(number+1)+'</a></li>');number++})}else{$('.'+g.paginationClass+' li a',d).each(function(){$(this).attr('href','#'+number);number++})}$('.'+g.paginationClass+' li:eq('+start+')',d).addClass('current');$('.'+g.paginationClass+' li a',d).click(function(){if(g.play){pause()}clicked=$(this).attr('href').match('[^#/]+$');if(current!=clicked){animate('pagination',paginationEffect,clicked)}return false});$('a.link',d).click(function(){if(g.play){pause()}clicked=$(this).attr('href').match('[^#/]+$')-1;if(current!=clicked){animate('pagination',paginationEffect,clicked)}return false});if(g.play){playInterval=setInterval(function(){animate('next',effect)},g.play);d.data('interval',playInterval)}})};$.fn.slides.option={preload:false,preloadImage:'/img/loading.gif',container:'slides_container',generateNextPrev:false,next:'next',prev:'prev',pagination:true,generatePagination:true,paginationClass:'pagination',fadeSpeed:350,fadeEasing:'',slideSpeed:350,slideEasing:'',start:1,effect:'slide',crossfade:false,randomize:false,play:0,pause:0,hoverPause:false,autoHeight:false,autoHeightSpeed:350,bigTarget:false,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};$.fn.randomize=function(c){function randomizeOrder(){return(Math.round(Math.random())-0.5)}return($(this).each(function(){var $this=$(this);var $children=$this.children();var a=$children.length;if(a>1){$children.hide();var b=[];for(i=0;i<a;i++){b[b.length]=i}b=b.sort(randomizeOrder);$.each(b,function(j,k){var $child=$children.eq(k);var $clone=$child.clone(true);$clone.show().appendTo($this);if(c!==undefined){c($child,$clone)}$child.remove()})}}))}})(jQuery);

/* =PRELOAD IMAGES - http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript
---------------------------------------------------------------------------------------*/

//Usage - jQuery.preLoadImages("image1.gif", "/path/to/image2.png");

(function(c){var d=[];c.preLoadImages=function(){for(var a=arguments.length;a--;){var b=document.createElement("img");b.src=arguments[a];d.push(b)}}})(jQuery);

/* =URL TOOLBOX - https://github.com/allmarkedup/jQuery-URL-Toolbox
---------------------------------------------------------------------------------------*/

// JQuery URL Toolbox
// Written by Mark Perkins, mark@allmarkedup.com
// License: http://unlicense.org/ (i.e. do what you want with it!)

(function(m){function r(b){var c={};b=b.replace(/^\?/,"").split("&");for(var g=b.length,a=0,j;a<g;a++)if(b[a]){j=b[a].split("=");c[j[0]]=j[1]}return c}function t(b){if(b.indexOf("=")===-1){if(b.charAt(b.length-1)=="/")b=b.slice(0,-1);return b.replace(/^\//,"").split("/")}return null}function u(b){if(b.indexOf("=")!==-1)return r(b);return null}function v(b){var c=document.createElement("a");c.href=b;if(c.protocol==":")c.protocol="http:";var g=c.protocol.replace(":",""),a=h(c.hostname,c.port),j;j=c.port!=
0&&c.port!==null&&c.port!==""?c.protocol+"//"+h(c.hostname,c.port)+":"+c.port:c.protocol+"//"+c.host;return{source:b,protocol:g,host:a,base:j,port:c.port,query:c.search,params:r(c.search),file:(c.pathname.match(/\/([^\/?#]+)$/i)||[,""])[1],hash:c.hash.replace(/^#/,""),path:function(){var k=c.pathname.replace(/^([^\/])/,"/$1");if(k=="/")k="";return k}(),segments:c.pathname.replace(/^\//,"").split("/"),hashSegments:t(c.hash.replace(/^#/,"")),hashParams:u(c.hash.replace(/^#/,""))}}var o=function(b){return typeof b===
"object"},l=document.location,q={a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href"},w=function(b,c){var g=c===true?"?":"";for(i in b)g+=i+"="+b[i]+"&";return g.slice(0,-1)},x=function(b){b=m(b).get(0).tagName;if(b!==undefined)return b.toLowerCase();return b},h=function(b,c){return b.replace(RegExp(":"+c),"")};m.extend(m.expr[":"],{external:function(b){var c=b.tagName;if(c!==undefined){var g=c.toLowerCase();c=q[g];if(b[c]){if(g!=="a"){g=document.createElement("a");
g.href=b[c]}else g=b;return g.hostname&&h(g.hostname,g.port)!==h(l.hostname,l.port)}}return false},internal:function(b){var c=b.tagName;if(c!==undefined){var g=c.toLowerCase();c=q[g];if(b[c]){if(g!=="a"){g=document.createElement("a");g.href=b[c]}else g=b;return g.hostname&&h(g.hostname,g.port)===h(l.hostname,l.port)}}return false}});m.url=function(b){return new s(b)};m.fn.url=function(){if(this.size()>1){var b={};this.each(function(c){b[c]=new s(m(this))});return b}else return new s(this)};var s=
function(b){var c=null,g=null,a={},j=function(){if(c=="elm")g.attr(q[x(g)],a.source);else if(c=="doc")l.href=a.source},k=function(){a.source=a.base+a.path+a.query;if(a.hash&&a.hash!="")a.source+="#"+a.hash},y=function(f,d){switch(f){case "source":a=v(d);break;case "base":if(d.charAt(d.length-1)=="/")d=d.slice(0,-1);var e=document.createElement("a");e.href=a.base=d;a.protocol=e.protocol.replace(":","");a.host=h(e.hostname,e.port);a.port=e.port;break;case "protocol":case "host":case "port":a[f]=d;a.base=
e.port!=0&&e.port!==null&&e.port!==""?e.protocol+"//"+h(e.hostname,e.port)+":"+e.port:e.protocol+"//"+e.host;break;case "query":a.query="?"+d.replace(/\?/,"");a.params=r(d);break;case "file":a.path=a.path.replace(RegExp(a.file+"$"),d);a.file=d;break;case "hash":a.hash=d;a.hashSegments=t(d);a.hashParams=u(d);break;case "path":if(d.charAt(0)!="/")d="/"+d;a.path=d;a.file=(d.match(/\/([^\/?#]+)$/i)||[,""])[1];a.segments=d.replace(/^\//,"").split("/")}k()},z=function(f,d){a.params[f]=d;a.query=w(a.params,
true);k()},A=function(f,d){a.segments[f]=d;a.path="/"+a.segments.join("/");a.file=(a.path.match(/\/([^\/?#]+)$/i)||[,""])[1];k()},B=function(f,d){a.hashParams[f]=d;a.hash=w(a.hashParams,true);k()},C=function(f,d){var e=a.hash.charAt(0)=="/"?"/":"";a.hashSegments[f]=d;a.hash=e+a.hashSegments.join("/");k()},p=function(f,d,e){if(e.length==1&&!o(e[0])){var n=e[0];return f===undefined||f[n]===undefined||f[n]===""?null:f[n]}else if(e.length>=2||e.length==1&&o(e[0])){if(o(e[0])){for(n in e[0])d(n,e[0][n]);
e[1]!==false&&j()}else{d(e[0],e[1]);e[2]!==false&&j()}return this}};(function(){if(o(b)&&b.size()){urlAttr=undefined;var f=x(b);if(f!==undefined)urlAttr=q[f];if(f!==undefined&&urlAttr!==undefined){c="elm";g=b;f=b.attr(urlAttr)}else if(f!==undefined&&urlAttr===undefined)return;else{c="doc";f=l.href;m(window).bind("hashchange",function(){y("hash",l.hash.replace(/^#/,""))})}}else if(o(b))return;else{c="str";f=b}a=v(f)})();return{attr:function(){return p(a,y,arguments)},param:function(){return p(a.params,
z,arguments)},segment:function(){return p(a.segments,A,arguments)},hashParam:function(){return p(a.hashParams,B,arguments)},hashSegment:function(){return p(a.hashSegments,C,arguments)},is:function(f){if(f==="internal"||f===":internal")return a.host&&a.host===h(l.hostname);else if(f==="external"||f===":external")return a.host&&a.host!==h(l.hostname)},toString:function(){return a.source}}}})(jQuery);


/*
 * jQuery Hoverbox 1.0
 * http://koteako.com/hoverbox/
 *
 * Copyright (c) 2009 Eugeniy Kalinin
 * Dual licensed under the MIT and GPL licenses.
 * http://koteako.com/hoverbox/license/
 */
jQuery.fn.hoverbox=function(a){var b=jQuery.extend({id:"tooltip",top:0,left:15},a);var d;function c(e){if(!d){d=$('<div style="position:absolute" id="'+b.id+'"></div>').appendTo(document.body).hide()}if(e){d.css({top:(e.pageY-b.top)+"px",left:(e.pageX+b.left)+"px"})}return d}this.each(function(){$(this).hover(function(f){if(this.title){this.t=this.title;this.title="";this.alt="";c(f).html(this.t).fadeIn("fast")}},function(){if(this.t){this.title=this.t;c().hide()}});$(this).mousemove(c)})};
