/* template name: strange template uri: http://themeforest.net/user/unitedthemes author: unitedthemes author uri: http://www.unitedthemes.com */ jquery(document).ready(function($){ /* *google maps */ $('.googlemap').each(function(){ var $this = $(this); var m = $this.get(0); var loc; var myoptions = { zoom: parseint($this.attr('data-zoom')), center: loc, maptypeid: google.maps.maptypeid.roadmap }; var map = new google.maps.map(m, myoptions); var marker = new google.maps.marker({ position: loc, map: map }); var geocoder = new google.maps.geocoder(); geocoder.geocode( { 'address': $this.attr('data-address')}, function(results, status) { if (status == google.maps.geocoderstatus.ok) { map.setcenter(results[0].geometry.location); var marker = new google.maps.marker({ map: map, position: results[0].geometry.location }); } else { alert("geocode was not successful for the following reason: " + status); } }); }); /********************* fancy caption *********************/ $(".both").fancycaption(); $(".hover img, .zoom img, .video img").imagefade({fadeto:0.5}); $(".fancycaption-fade").fancycaption({slidetopbar:false, slidebottombar:false, slideleftbar:false, sliderightbar:false }); $(".fancycaption-slide-rl").fancycaption({slidetopbar:false, slidebottombar:false, fadeelement:false, slideeasingin: 'swing' }); $(".fancycaption-full").fancycaption(); /********************* pretty photo *********************/ $("a[data-rel^='prettyphoto']").prettyphoto({animationspeed:'fast',theme:'dark_square',slideshow:5000}); $("#map a[data-rel^='prettyphoto']:first").prettyphoto({ custom_markup: '
', changepicturecallback: function(){ initialize(); } }); /********************* contact form *********************/ $('.validateform, #commentform').submit(function(){ var $form = $(this); var f = $form.find('.cform li'), ferror = false, emailexp = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i; f.children('input, textarea').each(function(){ var i = $(this); // current input var rule = i.attr('data-rule'); if( rule != undefined ){ var ierror=false; // error flag for current input var pos = rule.indexof( ':', 0 ); if( pos >= 0 ){ var exp = rule.substr( pos+1, rule.length ); rule = rule.substr(0, pos); }else{ rule = rule.substr( pos+1, rule.length ); } switch( rule ){ case 'required': if( i.val()=='' ){ ferror=ierror=true; } break; case 'maxlen': if( i.val().length div", {effect: 'fade'}); $(".accordion").tabs(".accordion .pane", {tabs: 'h3', effect: 'slide', initialindex: null}); /********************* scrollfunction *********************/ $(window).scroll(function() { if($(this).scrolltop() != 0) $('#totop').fadein(); else $('#totop').fadeout(); }); $('#totop').click(function() { $('body,html').animate({scrolltop:0},1000); }); /********************* toggle containers *********************/ if( window.location.hash != '#respond' && !window.location.hash.match(/comment-/gi) ) $(".toggle_container").hide(); $("h4.trigger").click(function(){ $(this).toggleclass("active").next().slidetoggle("slow"); return false; }); }); /*! * jquery tools v1.2.5 - the missing ui library for the web * * overlay/overlay.js * overlay/overlay.apple.js * scrollable/scrollable.js * scrollable/scrollable.autoscroll.js * scrollable/scrollable.navigator.js * tabs/tabs.js * tabs/tabs.slideshow.js * toolbox/toolbox.expose.js * toolbox/toolbox.mousewheel.js * tooltip/tooltip.js * tooltip/tooltip.dynamic.js * tooltip/tooltip.slide.js * * no copyrights or licenses. do what you like. * * http://flowplayer.org/tools/ * * jquery.event.wheel.js - rev 1 * copyright (c) 2008, three dub media (http://threedubmedia.com) * liscensed under the mit license (mit-license.txt) * http://www.opensource.org/licenses/mit-license.php * created: 2008-07-01 | updated: 2008-07-14 * * ----- * */ (function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.overlay={addeffect:function(a,b,d){c[a]=[b,d]},conf:{close:null,closeonclick:!0,closeonesc:!0,closespeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneinstance:!0,speed:"normal",target:null,top:"10%"}};var b=[],c={};a.tools.overlay.addeffect("default",function(b,c){var d=this.getconf(),e=a(window);d.fixed||(b.top+=e.scrolltop(),b.left+=e.scrollleft()),b.position=d.fixed?"fixed":"absolute",this.getoverlay().css(b).fadein(d.speed,c)},function(a){this.getoverlay().fadeout(this.getconf().closespeed,a)});function d(d,e){var f=this,g=d.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=math.random().tostring().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeonclick=l.closeonesc=!1);var n=e.target||d.attr("rel");j=n?a(n):null||d;if(!j.length)throw"could not find overlay: "+n;d&&d.index(j)==-1&&d.click(function(a){f.load(a);return a.preventdefault()}),a.extend(f,{load:function(d){if(f.isopened())return f;var i=c[e.effect];if(!i)throw"overlay: cannot find effect : \""+e.effect+"\"";e.oneinstance&&a.each(b,function(){this.close(d)}),d=d||a.event(),d.type="onbeforeload",g.trigger(d);if(d.isdefaultprevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,o=e.left,p=j.outerwidth({margin:!0}),q=j.outerheight({margin:!0});typeof n=="string"&&(n=n=="center"?math.max((h.height()-q)/2,0):parseint(n,10)/100*h.height()),o=="center"&&(o=math.max((h.width()-p)/2,0)),i[0].call(f,{top:n,left:o},function(){k&&(d.type="onload",g.trigger(d))}),l&&e.closeonclick&&a.mask.getmask().one("click",f.close),e.closeonclick&&a(document).bind("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeonesc&&a(document).bind("keydown."+m,function(a){a.keycode==27&&f.close(a)});return f},close:function(b){if(!f.isopened())return f;b=b||a.event(),b.type="onbeforeclose",g.trigger(b);if(!b.isdefaultprevented()){k=!1,c[e.effect][1].call(f,function(){b.type="onclose",g.trigger(b)}),a(document).unbind("click."+m).unbind("keydown."+m),l&&a.mask.close();return f}},getoverlay:function(){return j},gettrigger:function(){return d},getclosers:function(){return i},isopened:function(){return k},getconf:function(){return e}}),a.each("onbeforeload,onstart,onload,onbeforeclose,onclose".split(","),function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a(""),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.fn.overlay=function(c){var e=this.data("overlay");if(e)return e;a.isfunction(c)&&(c={onbeforeload:c}),c=a.extend(!0,{},a.tools.overlay.conf,c),this.each(function(){e=new d(a(this),c),b.push(e),a(this).data("overlay",e)});return c.api?e:this}})(jquery); (function(a){var b=a.tools.overlay,c=a(window);a.extend(b.conf,{start:{top:null,left:null},fadeinspeed:"fast",zindex:999});function d(a){var b=a.offset();return{top:b.top+a.height()/2,left:b.left+a.width()/2}}var e=function(b,e){var f=this.getoverlay(),g=this.getconf(),h=this.gettrigger(),i=this,j=f.outerwidth({margin:!0}),k=f.data("img"),l=g.fixed?"fixed":"absolute";if(!k){var m=f.css("backgroundimage");if(!m)throw"background-image css property not set for overlay";m=m.slice(m.indexof("(")+1,m.indexof(")")).replace(/\"/g,""),f.css("backgroundimage","none"),k=a(""),k.css({border:0,display:"none"}).width(j),a("body").append(k),f.data("img",k)}var n=g.start.top||math.round(c.height()/2),o=g.start.left||math.round(c.width()/2);if(h){var p=d(h);n=p.top,o=p.left}g.fixed?(n-=c.scrolltop(),o-=c.scrollleft()):(b.top+=c.scrolltop(),b.left+=c.scrollleft()),k.css({position:"absolute",top:n,left:o,width:0,zindex:g.zindex}).show(),b.position=l,f.css(b),k.animate({top:f.css("top"),left:f.css("left"),width:j},g.speed,function(){f.css("zindex",g.zindex+1).fadein(g.fadeinspeed,function(){i.isopened()&&!a(this).index(f)?e.call():f.hide()})}).css("position",l)},f=function(b){var e=this.getoverlay().hide(),f=this.getconf(),g=this.gettrigger(),h=e.data("img"),i={top:f.start.top,left:f.start.left,width:0};g&&a.extend(i,d(g)),f.fixed&&h.css({position:"absolute"}).animate({top:"+="+c.scrolltop(),left:"+="+c.scrollleft()},0),h.animate(i,f.closespeed,b)};b.addeffect("apple",e,f)})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.scrollable={conf:{activeclass:"active",circular:!1,clonedclass:"cloned",disabledclass:"disabled",easing:"swing",initialindex:0,item:null,items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",speed:400,vertical:!1,touch:!0,wheelspeed:0}};function b(a,b){var c=parseint(a.css(b),10);if(c)return c;var d=a[0].currentstyle;return d&&d.width&&parseint(d.width,10)}function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}var d;function e(b,e){var f=this,g=b.add(f),h=b.children(),i=0,j=e.vertical;d||(d=f),h.length>1&&(h=a(e.items,b)),a.extend(f,{getconf:function(){return e},getindex:function(){return i},getsize:function(){return f.getitems().size()},getnavibuttons:function(){return m.add(n)},getroot:function(){return b},getitemwrap:function(){return h},getitems:function(){return h.children(e.item).not("."+e.clonedclass)},move:function(a,b){return f.seekto(i+a,b)},next:function(a){return f.move(1,a)},prev:function(a){return f.move(-1,a)},begin:function(a){return f.seekto(0,a)},end:function(a){return f.seekto(f.getsize()-1,a)},focus:function(){d=f;return f},additem:function(b){b=a(b),e.circular?(h.children("."+e.clonedclass+":last").before(b),h.children("."+e.clonedclass+":first").replacewith(b.clone().addclass(e.clonedclass))):h.append(b),g.trigger("onadditem",[b]);return f},seekto:function(b,c,k){b.jquery||(b*=1);if(e.circular&&b===0&&i==-1&&c!==0)return f;if(!e.circular&&b<0||b>f.getsize()||b<-1)return f;var l=b;b.jquery?b=f.getitems().index(b):l=f.getitems().eq(b);var m=a.event("onbeforeseek");if(!k){g.trigger(m,[b,c]);if(m.isdefaultprevented()||!l.length)return f}var n=j?{top:-l.position().top}:{left:-l.position().left};i=b,d=f,c===undefined&&(c=e.speed),h.animate(n,c,e.easing,k||function(){g.trigger("onseek",[b])});return f}}),a.each(["onbeforeseek","onseek","onadditem"],function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}});if(e.circular){var k=f.getitems().slice(-1).clone().prependto(h),l=f.getitems().eq(1).clone().appendto(h);k.add(l).addclass(e.clonedclass),f.onbeforeseek(function(a,b,c){if(!a.isdefaultprevented()){if(b==-1){f.seekto(k,c,function(){f.end(0)});return a.preventdefault()}b==f.getsize()&&f.seekto(l,c,function(){f.begin(0)})}}),f.seekto(0,0,function(){})}var m=c(b,e.prev).click(function(){f.prev()}),n=c(b,e.next).click(function(){f.next()});!e.circular&&f.getsize()>1&&(f.onbeforeseek(function(a,b){settimeout(function(){a.isdefaultprevented()||(m.toggleclass(e.disabledclass,b<=0),n.toggleclass(e.disabledclass,b>=f.getsize()-1))},1)}),e.initialindex||m.addclass(e.disabledclass)),e.mousewheel&&a.fn.mousewheel&&b.mousewheel(function(a,b){if(e.mousewheel){f.move(b<0?1:-1,e.wheelspeed||50);return!1}});if(e.touch){var o={};h[0].ontouchstart=function(a){var b=a.touches[0];o.x=b.clientx,o.y=b.clienty},h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var b=a.touches[0],c=o.x-b.clientx,d=o.y-b.clienty;f[j&&d>0||!j&&c>0?"next":"prev"](),a.preventdefault()}}}e.keyboard&&a(document).bind("keydown.scrollable",function(b){if(e.keyboard&&!b.altkey&&!b.ctrlkey&&!a(b.target).is(":input")){if(e.keyboard!="static"&&d!=f)return;var c=b.keycode;if(j&&(c==38||c==40)){f.move(c==38?-1:1);return b.preventdefault()}if(!j&&(c==37||c==39)){f.move(c==37?-1:1);return b.preventdefault()}}}),e.initialindex&&f.seekto(e.initialindex,0,function(){})}a.fn.scrollable=function(b){var c=this.data("scrollable");if(c)return c;b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){c=new e(a(this),b),a(this).data("scrollable",c)});return b.api?c:this}})(jquery); (function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable");b&&(e=b);var c,f=!0;b.play=function(){c||(f=!1,c=setinterval(function(){b.next()},d.interval))},b.pause=function(){c=clearinterval(c)},b.stop=function(){b.pause(),f=!0},d.autopause&&b.getroot().add(b.getnavibuttons()).hover(b.pause,b.play),d.autoplay&&b.play()});return d.api?e:this}})(jquery); (function(a){var b=a.tools.scrollable;b.navigator={conf:{navi:".navi",naviitem:null,activeclass:"active",indexed:!1,idprefix:null,history:!1}};function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}a.fn.navigator=function(d){typeof d=="string"&&(d={navi:d}),d=a.extend({},b.navigator.conf,d);var e;this.each(function(){var b=a(this).data("scrollable"),f=d.navi.jquery?d.navi:c(b.getroot(),d.navi),g=b.getnavibuttons(),h=d.activeclass,i=d.history&&a.fn.history;b&&(e=b),b.getnavibuttons=function(){return g.add(f)};function j(a,c,d){b.seekto(c);if(i)location.hash&&(location.hash=a.attr("href").replace("#",""));else return d.preventdefault()}function k(){return f.find(d.naviitem||"> *")}function l(b){var c=a("<"+(d.naviitem||"a")+"/>").click(function(c){j(a(this),b,c)}).attr("href","#"+b);b===0&&c.addclass(h),d.indexed&&c.text(b+1),d.idprefix&&c.attr("id",d.idprefix+b);return c.appendto(f)}k().length?k().each(function(b){a(this).click(function(c){j(a(this),b,c)})}):a.each(b.getitems(),function(a){l(a)}),b.onbeforeseek(function(a,b){settimeout(function(){if(!a.isdefaultprevented()){var c=k().eq(b);!a.isdefaultprevented()&&c.length&&k().removeclass(h).eq(b).addclass(h)}},1)});function m(a,b){var c=k().eq(b.replace("#",""));c.length||(c=k().filter("[href="+b+"]")),c.click()}b.onadditem(function(a,c){c=l(b.getitems().index(c)),i&&c.history(m)}),i&&k().history(m)});return d.api?e:this}})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.tabs={conf:{tabs:"a",current:"current",onbeforeclick:null,onclick:null,effect:"default",initialindex:0,event:"click",rotate:!1,history:!1},addeffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getpanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getconf(),d=c.fadeoutspeed,e=this.getpanes();d?e.fadeout(d):e.hide(),e.eq(a).fadein(c.fadeinspeed,b)},slide:function(a,b){this.getpanes().slideup(200),this.getpanes().eq(a).slidedown(400,b)},ajax:function(a,b){this.getpanes().eq(0).load(this.gettabs().eq(a).attr("href"),b)}},c;a.tools.tabs.addeffect("horizontal",function(b,d){c||(c=this.getpanes().eq(0).width()),this.getcurrentpane().animate({width:0},function(){a(this).hide()}),this.getpanes().eq(b).animate({width:c},function(){a(this).show(),d.call()})});function d(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(c,d){var i=h.eq(c);typeof c=="string"&&c.replace("#","")&&(i=h.filter("[href*="+c.replace("#","")+"]"),c=math.max(h.index(i),0));if(e.rotate){var k=h.length-1;if(c<0)return f.click(k,d);if(c>k)return f.click(0,d)}if(!i.length){if(j>=0)return f;c=e.initialindex,i=h.eq(c)}if(c===j)return f;d=d||a.event(),d.type="onbeforeclick",g.trigger(d,[c]);if(!d.isdefaultprevented()){b[e.effect].call(f,c,function(){d.type="onclick",g.trigger(d,[c])}),j=c,h.removeclass(e.current),i.addclass(e.current);return f}},getconf:function(){return e},gettabs:function(){return h},getpanes:function(){return i},getcurrentpane:function(){return i.eq(j)},getcurrenttab:function(){return h.eq(j)},getindex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.unbind(e.event).removeclass(e.current),i.find("a[href^=#]").unbind("click.t");return f}}),a.each("onbeforeclick,onclick".split(","),function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).bind(e.event,function(a){f.click(b,a);return a.preventdefault()})}),i.find("a[href^=#]").bind("click.t",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href="+location.hash+"]").length?f.click(location.hash):(e.initialindex===0||e.initialindex>0)&&f.click(e.initialindex)}a.fn.tabs=function(b,c){var e=this.data("tabs");e&&(e.destroy(),this.removedata("tabs")),a.isfunction(c)&&(c={onbeforeclick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){e=new d(a(this),b,c),a(this).data("tabs",e)});return c.api?e:this}})(jquery); (function(a){var b;b=a.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledclass:"disabled",autoplay:!1,autopause:!0,interval:3e3,clickable:!0,api:!1}};function c(b,c){var d=this,e=b.add(this),f=b.data("tabs"),g,h=!0;function i(c){var d=a(c);return d.length<2?d:b.parent().find(c)}var j=i(c.next).click(function(){f.next()}),k=i(c.prev).click(function(){f.prev()});a.extend(d,{gettabs:function(){return f},getconf:function(){return c},play:function(){if(g)return d;var b=a.event("onbeforeplay");e.trigger(b);if(b.isdefaultprevented())return d;g=setinterval(f.next,c.interval),h=!1,e.trigger("onplay");return d},pause:function(){if(!g)return d;var b=a.event("onbeforepause");e.trigger(b);if(b.isdefaultprevented())return d;g=clearinterval(g),e.trigger("onpause");return d},stop:function(){d.pause(),h=!0}}),a.each("onbeforeplay,onplay,onbeforepause,onpause".split(","),function(b,e){a.isfunction(c[e])&&a(d).bind(e,c[e]),d[e]=function(b){return a(d).bind(e,b)}}),c.autopause&&f.gettabs().add(j).add(k).add(f.getpanes()).hover(d.pause,function(){h||d.play()}),c.autoplay&&d.play(),c.clickable&&f.getpanes().click(function(){f.next()});if(!f.getconf().rotate){var l=c.disabledclass;f.getindex()||k.addclass(l),f.onbeforeclick(function(a,b){k.toggleclass(l,!b),j.toggleclass(l,b==f.gettabs().length-1)})}}a.fn.slideshow=function(d){var e=this.data("slideshow");if(e)return e;d=a.extend({},b.conf,d),this.each(function(){e=new c(a(this),d),a(this).data("slideshow",e)});return d.api?e:this}})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.5"};var b;b=a.tools.expose={conf:{maskid:"exposemask",loadspeed:"slow",closespeed:"fast",closeonclick:!0,closeonesc:!0,zindex:998,opacity:.8,startopacity:0,color:"#fff",onload:null,onclose:null}};function c(){if(a.browser.msie){var b=a(document).height(),c=a(window).height();return[window.innerwidth||document.documentelement.clientwidth||document.body.clientwidth,b-c<20?c:b]}return[a(document).width(),a(document).height()]}function d(b){if(b)return b.call(a.mask)}var e,f,g,h,i;a.mask={load:function(j,k){if(g)return this;typeof j=="string"&&(j={color:j}),j=j||h,h=j=a.extend(a.extend({},b.conf),j),e=a("#"+j.maskid),e.length||(e=a("
").attr("id",j.maskid),a("body").append(e));var l=c();e.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:j.startopacity,zindex:j.zindex}),j.color&&e.css("backgroundcolor",j.color);if(d(j.onbeforeload)===!1)return this;j.closeonesc&&a(document).bind("keydown.mask",function(b){b.keycode==27&&a.mask.close(b)}),j.closeonclick&&e.bind("click.mask",function(b){a.mask.close(b)}),a(window).bind("resize.mask",function(){a.mask.fit()}),k&&k.length&&(i=k.eq(0).css("zindex"),a.each(k,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),f=k.css({zindex:math.max(j.zindex+1,i=="auto"?0:i)})),e.css({display:"block"}).fadeto(j.loadspeed,j.opacity,function(){a.mask.fit(),d(j.onload),g="full"}),g=!0;return this},close:function(){if(g){if(d(h.onbeforeclose)===!1)return this;e.fadeout(h.closespeed,function(){d(h.onclose),f&&f.css({zindex:i}),g=!1}),a(document).unbind("keydown.mask"),e.unbind("click.mask"),a(window).unbind("resize.mask")}return this},fit:function(){if(g){var a=c();e.css({width:a[0],height:a[1]})}},getmask:function(){return e},isloaded:function(a){return a?g=="full":g},getconf:function(){return h},getexposed:function(){return f}},a.fn.mask=function(b){a.mask.load(b);return this},a.fn.expose=function(b){a.mask.load(b,this);return this}})(jquery); (function(a){a.fn.mousewheel=function(a){return this[a?"bind":"trigger"]("wheel",a)},a.event.special.wheel={setup:function(){a.event.add(this,b,c,{})},teardown:function(){a.event.remove(this,b,c)}};var b=a.browser.mozilla?"dommousescroll"+(a.browser.version<"1.9"?" mousemove":""):"mousewheel";function c(b){switch(b.type){case"mousemove":return a.extend(b.data,{clientx:b.clientx,clienty:b.clienty,pagex:b.pagex,pagey:b.pagey});case"dommousescroll":a.extend(b,b.data),b.delta=-b.detail/3;break;case"mousewheel":b.delta=b.wheeldelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}})(jquery); (function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.tooltip={conf:{effect:"toggle",fadeoutspeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:!1,canceldefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
",tipclass:"tooltip"},addeffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getconf(),c=this.gettip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.gettip().hide(),a.call()}],fade:[function(a){var b=this.getconf();this.gettip().fadeto(b.fadeinspeed,b.opacity,a)},function(a){this.gettip().fadeout(this.getconf().fadeoutspeed,a)}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerheight()-d.offset[0],f+=b.outerwidth()+d.offset[1],/ipad/i.test(navigator.useragent)&&(e-=a(window).scrolltop());var h=c.outerheight()+b.outerheight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerwidth()+b.outerwidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"tooltip: bad events configuration for "+q;d.bind(r[0],function(a){cleartimeout(i),e.predelay?j=settimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){cleartimeout(j),e.delay?i=settimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.canceldefault&&(d.removeattr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addclass(e.tipclass).appendto(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"cannot find tooltip for "+d}if(f.isshown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=b||a.event(),b.type="onbeforeshow",g.trigger(b,[o]);if(b.isdefaultprevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onshow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.bind(p[0],function(){cleartimeout(i),cleartimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.bind(p[1],function(a){a.relatedtarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),h.data("__set",!0));return f},hide:function(c){if(!h||!f.isshown())return f;c=c||a.event(),c.type="onbeforehide",g.trigger(c);if(!c.isdefaultprevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onhide",g.trigger(c)});return f}},isshown:function(a){return a?n=="full":n},getconf:function(){return e},gettip:function(){return h},gettrigger:function(){return d}}),a.each("onhide,onbeforeshow,onshow,onbeforehide".split(","),function(b,c){a.isfunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jquery); (function(a){var b=a.tools.tooltip;b.dynamic={conf:{classnames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollleft(),e=c.height()+c.scrolltop();return[b.offset().top<=c.scrolltop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollleft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=e.classnames.split(/\s/),g;this.each(function(){var b=a(this).tooltip().onbeforeshow(function(b,h){var i=this.gettip(),j=this.getconf();g||(g=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,g[4]),j.position=[g[0],g[1]],j.offset=[g[2],g[3]],i.css({visibility:"hidden",position:"absolute",top:h.top,left:h.left}).show();var k=c(i);if(!d(k)){k[2]&&(a.extend(j,e.top),j.position[0]="top",i.addclass(f[0])),k[3]&&(a.extend(j,e.right),j.position[1]="right",i.addclass(f[1])),k[0]&&(a.extend(j,e.bottom),j.position[0]="bottom",i.addclass(f[2])),k[1]&&(a.extend(j,e.left),j.position[1]="left",i.addclass(f[3]));if(k[0]||k[2])j.offset[0]*=-1;if(k[1]||k[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onbeforeshow(function(){var a=this.getconf(),b=this.gettip();settimeout(function(){a.position=[g[0],g[1]],a.offset=[g[2],g[3]]},0)}),b.onhide(function(){var a=this.gettip();a.removeclass(e.classnames)}),ret=b});return e.api?ret:this}})(jquery); (function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideoffset:10,slideinspeed:200,slideoutspeed:200,slidefade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addeffect("slide",function(a){var b=this.getconf(),d=this.gettip(),e=b.slidefade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideoffset,b.slidefade&&d.css({opacity:0}),d.show().animate(e,b.slideinspeed,a)},function(b){var d=this.getconf(),e=d.slideoffset,f=d.slidefade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.gettip().animate(f,d.slideoutspeed,function(){a(this).hide(),b.call()})})})(jquery); /***********************************************************/ /* tinytips plugin */ /* version: 1.1 */ /* mike merritt */ /* updated: mar 2nd, 2010 */ /***********************************************************/ (function($){ $.fn.tinytips = function (tipcolor, supcont) { if (tipcolor === 'null') { tipcolor = 'light'; } var tipname = tipcolor + 'tip'; /* user settings **********************************/ // enter the markup for your tooltips here. the wrapping div must have a class of tinytip and // it must have a div with the class "content" somewhere inside of it. var tipframe = '
 
'; // speed of the animations in milliseconds - 1000 = 1 second. var animspeed = 300; /***************************************************************************************************/ /* end of user settings - do not edit below this line unless you are trying to edit functionality. */ /***************************************************************************************************/ // global tinytip variables; var tinytip; var ttext; // when we hover over the element that we want the tooltip applied to $(this).hover(function() { // inject the markup for the tooltip into the page and // set the tooltip global to the current markup and then hide it. $('body').append(tipframe); var divtip = 'div.'+tipname; tinytip = $(divtip); tinytip.hide(); // grab the content for the tooltip from the title attribute (or the supplied content) and // inject it into the markup for the current tooltip. note: title attribute is used unless // other content is supplied instead. if (supcont === 'title') { var tipcont = $(this).attr('title'); } else if (supcont !== 'title') { var tipcont = supcont; } $(divtip + ' .content').html(tipcont); ttext = $(this).attr('title'); $(this).attr('title', ''); // offsets so that the tooltip is centered over the element it is being applied to but // raise it up above the element so it isn't covering it. var yoffset = tinytip.height() + 2; var xoffset = (tinytip.width() / 2) - ($(this).width() / 2); // grab the coordinates for the element with the tooltip and make a new copy // so that we can keep the original un-touched. var pos = $(this).offset(); var npos = pos; // add the offsets to the tooltip position npos.top = pos.top - yoffset; npos.left = pos.left - xoffset; // make sure that the tooltip has absolute positioning and a high z-index, // then place it at the correct spot and fade it in. tinytip.css('position', 'absolute').css('z-index', '1000'); tinytip.css(npos).fadein(animspeed); }, function() { $(this).attr('title', ttext); // fade the tooltip out once the mouse moves away and then remove it from the dom. tinytip.fadeout(animspeed, function() { $(this).remove(); }); }); } })(jquery);