$(document).ready(function(){ cookiedata=$.cookie('css');if(cookiedata){jquery(this).contents().find("#colorswitch").attr("href",cookiedata);} $clientsholder=$('ul.portfolio');$clientsclone=$clientsholder.clone();$('.filter_portfolio a').click(function(e){e.preventdefault();$filterclass=$(this).attr('class');$('.filter_portfolio li').removeclass('active');$(this).parent().addclass('active');if($filterclass=='all'){$filters=$clientsclone.find('li');}else{$filters=$clientsclone.find('li[data-type~='+$filterclass+']');} $clientsholder.quicksand($filters,{duration:1000,easing:'easeinoutquint'},function(){$("a[data-pretty^='prettyphoto']").prettyphoto({animationspeed:'fast',theme:'pp_default',slideshow:5000});$('.zoom img').each(function(){$(this).hover(function(){$(this).stop().animate({opacity:0.5},'slow');},function(){$(this).stop().animate({opacity:1.0},'slow');})});});});$('#socialmedia ul li img, .blog_img img').each(function(){$(this).hover(function(){$(this).stop().animate({opacity:0.5},'slow');},function(){$(this).stop().animate({opacity:1.0},'slow');})});$("a[data-pretty^='prettyphoto']").prettyphoto({animationspeed:'fast',theme:'pp_default',slideshow:5000});$(".tabs").tabs(".panes > div",{effect:'fade'});$("#accordion").tabs("#accordion div.pane",{tabs:'h3',effect:'slide',initialindex:null});$('form.validateform').submit(function(){var f=$(this).find('.cform li'),ferror=false,emailexp=/^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i;f.children('input').each(function(){var i=$(this);var rule=i.attr('data-rule');if(rule!=undefined){var ierror=false;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=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'+''+'{{title}}'+''+''},function(data){$('#flickr a').prettyphoto();});$(".tweet").tweet({join_text:"auto",username:"envato",count:2,auto_join_text_default:"we said,",auto_join_text_ed:"we",auto_join_text_ing:"we were",auto_join_text_reply:"we replied",auto_join_text_url:"we were checking out",loading_text:"loading tweets..."});$('.[href=#top]').click(function(){$('html, body').animate({scrolltop:0},1000);return false;});$('input').each(function(){if($(this).val()==''){$("label[for="+$(this).attr("id")+"]").css("position","absolute").css("z-index","2");}else{$("label[for="+$(this).attr("id")+"]").hide('slide','fast');}});$('textarea').each(function(){if($(this).val()==''){$("label[for="+$(this).attr("id")+"]").css("position","absolute").css("z-index","2");}else{$("label[for="+$(this).attr("id")+"]").hide('slide','fast');}});$('input').focus(function(){$("label[for="+$(this).attr("id")+"]").hide('slide','fast');});$('input').blur(function(){if($(this).val()==""){$("label[for="+$(this).attr("id")+"]").show('slide','fast');}});$('textarea').focus(function(){$("label[for="+$(this).attr("id")+"]").hide('slide','fast');});$('textarea').blur(function(){if($(this).val()==""){$("label[for="+$(this).attr("id")+"]").show('slide','fast');}});});/*! 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 tooltip/tooltip.js tooltip/tooltip.dynamic.js http://flowplayer.org/tools/ */(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:9999});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"},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);jquery.easing.jswing=jquery.easing.swing;jquery.extend(jquery.easing,{def:"easeoutquad",swing:function(e,f,a,h,g){return jquery.easing[jquery.easing.def](e,f,a,h,g);},easeinquad:function(e,f,a,h,g){return h*(f/=g)*f+a;},easeoutquad:function(e,f,a,h,g){return-h*(f/=g)*(f-2)+a;},easeinoutquad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a;}return-h/2*((--f)*(f-2)-1)+a;},easeincubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a;},easeoutcubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a;},easeinoutcubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a;}return h/2*((f-=2)*f*f+2)+a;},easeinquart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a;},easeoutquart:function(e,f,a,h,g){return-h*((f=f/g-1)*f*f*f-1)+a;},easeinoutquart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a;}return-h/2*((f-=2)*f*f*f-2)+a;},easeinquint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a;},easeoutquint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a;},easeinoutquint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a;}return h/2*((f-=2)*f*f*f*f+2)+a;},easeinsine:function(e,f,a,h,g){return-h*math.cos(f/g*(math.pi/2))+h+a;},easeoutsine:function(e,f,a,h,g){return h*math.sin(f/g*(math.pi/2))+a;},easeinoutsine:function(e,f,a,h,g){return-h/2*(math.cos(math.pi*f/g)-1)+a;},easeinexpo:function(e,f,a,h,g){return(f==0)?a:h*math.pow(2,10*(f/g-1))+a;},easeoutexpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-math.pow(2,-10*f/g)+1)+a;},easeinoutexpo:function(e,f,a,h,g){if(f==0){return a;}if(f==g){return a+h;}if((f/=g/2)<1){return h/2*math.pow(2,10*(f-1))+a;}return h/2*(-math.pow(2,-10*--f)+2)+a;},easeincirc:function(e,f,a,h,g){return-h*(math.sqrt(1-(f/=g)*f)-1)+a;},easeoutcirc:function(e,f,a,h,g){return h*math.sqrt(1-(f=f/g-1)*f)+a;},easeinoutcirc:function(e,f,a,h,g){if((f/=g/2)<1){return-h/2*(math.sqrt(1-f*f)-1)+a;}return h/2*(math.sqrt(1-(f-=2)*f)+1)+a;},easeinelastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k)==1){return e+l;}if(!j){j=k*0.3;}if(g *",dx:0,dy:0};a.extend(e,b);if(a.browser.msie||(typeof(a.fn.scale)=="undefined")){e.usescaling=false;}var c;if(typeof(arguments[1])=="function"){var c=arguments[1];}else{if(typeof(arguments[2]=="function")){var c=arguments[2];}}return this.each(function(u){var z;var x=[];var j=a(f).clone();var y=a(this);var h=a(this).css("height");var o;var k=false;var l=a(y).offset();var m=[];var w=a(this).find(e.selector);if(a.browser.msie&&a.browser.version.substr(0,1)<7){y.html("").append(j);return;}var n=0;var r=function(){if(!n){n=1;$todelete=y.find("> *");y.prepend(s.find("> *"));$todelete.remove();if(k){y.css("height",o);}e.enhancement(y);if(typeof c=="function"){c.call(this);}}};var v=y.offsetparent();var t=v.offset();if(v.css("position")=="relative"){if(v.get(0).nodename.tolowercase()=="body"){}else{t.top+=(parsefloat(v.css("border-top-width"))||0);t.left+=(parsefloat(v.css("border-left-width"))||0);}}else{t.top-=(parsefloat(v.css("border-top-width"))||0);t.left-=(parsefloat(v.css("border-left-width"))||0);t.top-=(parsefloat(v.css("margin-top"))||0);t.left-=(parsefloat(v.css("margin-left"))||0);}if(isnan(t.left)){t.left=0;}if(isnan(t.top)){t.top=0;}t.left-=e.dx;t.top-=e.dy;y.css("height",a(this).height());w.each(function(a){m[a]=a(this).offset();});a(this).stop();var q=0;var p=0;w.each(function(a){a(this).stop();var b=a(this).get(0);if(b.style.position=="absolute"){q=-e.dx;p=-e.dy;}else{q=e.dx;p=e.dy;}b.style.position="absolute";b.style.margin="0";b.style.top=(m[a].top-parsefloat(b.style.margintop)-t.top+p)+"px";b.style.left=(m[a].left-parsefloat(b.style.marginleft)-t.left+q)+"px";});var s=a(y).clone();var g=s.get(0);g.innerhtml="";g.setattribute("id","");g.style.height="auto";g.style.width=y.width()+"px";s.append(j);s.insertbefore(y);s.css("opacity",0);g.style.zindex=-1;g.style.margin="0";g.style.position="absolute";g.style.top=l.top-t.top+"px";g.style.left=l.left-t.left+"px";if(e.adjustheight==="dynamic"){y.animate({height:s.height()},e.duration,e.easing);}else{if(e.adjustheight==="auto"){o=s.height();if(parsefloat(h)