(function(d){d.fn.tabSlideOut=function(f){var a=d.extend({tabHandle:".handle",speed:300,action:"click",tabLocation:"left",topPos:"200px",leftPos:"20px",fixedPosition:false,positioning:"absolute",pathToTabImage:null,imageHeight:null,imageWidth:null,onLoadSlideOut:false},f||{});a.tabHandle=d(a.tabHandle);var b=this;a.positioning=a.fixedPosition===true?"fixed":"absolute";if(document.all&&!window.opera&&!window.XMLHttpRequest)a.positioning="absolute";a.pathToTabImage!=null&&a.tabHandle.css({background:"url("+
a.pathToTabImage+") no-repeat",width:a.imageWidth,height:a.imageHeight});a.tabHandle.css({display:"block",textIndent:"-99999px",outline:"none",position:"absolute"});b.css({"line-height":"1",position:a.positioning});var c={containerWidth:parseInt(b.outerWidth(),10)+"px",containerHeight:parseInt(b.outerHeight(),10)+"px",tabWidth:parseInt(a.tabHandle.outerWidth(),10)+"px",tabHeight:parseInt(a.tabHandle.outerHeight(),10)+"px"};if(a.tabLocation==="top"||a.tabLocation==="bottom"){b.css({left:a.leftPos});
a.tabHandle.css({right:0})}if(a.tabLocation==="top"){b.css({top:"-"+c.containerHeight});a.tabHandle.css({bottom:"-"+c.tabHeight})}if(a.tabLocation==="bottom"){b.css({bottom:"-"+c.containerHeight,position:"fixed"});a.tabHandle.css({top:"-"+c.tabHeight})}if(a.tabLocation==="left"||a.tabLocation==="right"){b.css({height:c.containerHeight,top:a.topPos});a.tabHandle.css({top:0})}if(a.tabLocation==="left"){b.css({left:"-"+c.containerWidth});a.tabHandle.css({right:"-"+c.tabWidth})}if(a.tabLocation==="right"){b.css({right:"-"+
c.containerWidth});a.tabHandle.css({left:"-"+c.tabWidth});d("html").css("overflow-x","hidden")}a.tabHandle.click(function(g){g.preventDefault()});var e=function(){if(a.tabLocation==="top")b.animate({top:"-"+c.containerHeight},a.speed).removeClass("open");else if(a.tabLocation==="left")b.animate({left:"-"+c.containerWidth},a.speed).removeClass("open");else if(a.tabLocation==="right")b.animate({right:"-"+c.containerWidth},a.speed).removeClass("open");else a.tabLocation==="bottom"&&b.animate({bottom:"-"+
c.containerHeight},a.speed).removeClass("open")},h=function(){if(a.tabLocation=="top")b.animate({top:"-3px"},a.speed).addClass("open");else if(a.tabLocation=="left")b.animate({left:"-3px"},a.speed).addClass("open");else if(a.tabLocation=="right")b.animate({right:"-3px"},a.speed).addClass("open");else a.tabLocation=="bottom"&&b.animate({bottom:"-3px"},a.speed).addClass("open")},i=function(){b.click(function(g){g.stopPropagation()});d(document).click(function(){e()})};f=function(){a.tabHandle.click(function(){b.hasClass("open")?
e():h()});i()};var j=function(){b.hover(function(){h()},function(){e()});a.tabHandle.click(function(){b.hasClass("open")&&e()});i()},k=function(){e();setTimeout(h,500)};a.action==="click"&&f();a.action==="hover"&&j();a.onLoadSlideOut&&k()}})(jQuery);
