function addEvent(c,b,e,a){if(c.addEventListener){c.addEventListener(b,e,a);return true}else{if(c.attachEvent){var d=c.attachEvent("on"+b,e);return d}else{return false}}}function knackerEvent(a){if(a&&a.stopPropagation){a.stopPropagation()}if(window.event&&window.event.cancelBubble){window.event.cancelBubble=true}if(a&&a.preventDefault){a.preventDefault()}if(window.event){window.event.returnValue=false}}function cancelEventSafari(){return false}function getElementStyle(b,d){var c=document.getElementById(b);if(c.currentStyle){return c.currentStyle[toCamelCase(d)]}else{if(window.getComputedStyle){var a=window.getComputedStyle(c,"");return a.getPropertyValue(d)}else{return""}}}function toCamelCase(e){var b=e.toLowerCase().split("-");if(b.length==1){return b[0]}var a=(e.indexOf("-")==0)?b[0].charAt(0).toUpperCase()+b[0].substring(1):b[0];for(var c=1;c<b.length;c++){var d=b[c];a+=d.charAt(0).toUpperCase()+d.substring(1)}return a}function disableTestLinks(){var b=document.getElementsByTagName("a");for(var a=0;a<b.length;a++){if(b[a].href.match(/[^#]#$/)){addEvent(b[a],"click",knackerEvent,false)}}}function createCookie(c,d,e){var a="";if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}document.cookie=c+"="+d+a+"; path=/"}function readCookie(b){var d=document.cookie.split(";");var e=b+"=";for(var c=0;c<d.length;c++){var a=d[c];while(a.charAt(0)==" "){a=a.substring(1,a.length)}if(a.indexOf(e)==0){return a.substring(e.length,a.length)}}return null}function eraseCookie(a){createCookie(a,"",-1)}addEvent(window,"load",init,false);function init(){var c=document.getElementsByTagName("input");for(var a=0;a<c.length;a++){var b=c[a];if(b.type=="text"&&b.className.match(/\bcleardefault\b/)){addEvent(b,"focus",clearDefaultText,false);addEvent(b,"blur",replaceDefaultText,false);if(b.value!=""){b.defaultText=b.value}}}}function clearDefaultText(b){var a=window.event?window.event.srcElement:b?b.target:null;if(!a){return}if(a.value==a.defaultText){a.value=""}}function replaceDefaultText(b){var a=window.event?window.event.srcElement:b?b.target:null;if(!a){return}if(a.value==""&&a.defaultText){a.value=a.defaultText}}(function(a){a.fn.tabSlideOut=function(k){var e=a.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},k||{});e.tabHandle=a(e.tabHandle);var f=this;if(e.fixedPosition===true){e.positioning="fixed"}else{e.positioning="absolute"}if(document.all&&!window.opera&&!window.XMLHttpRequest){e.positioning="absolute"}if(e.pathToTabImage!=null){e.tabHandle.css({background:"url("+e.pathToTabImage+") no-repeat",width:e.imageWidth,height:e.imageHeight})}e.tabHandle.css({display:"block",textIndent:"-99999px",outline:"none",position:"absolute"});f.css({"line-height":"1",position:e.positioning});var i={containerWidth:parseInt(f.outerWidth(),10)+"px",containerHeight:parseInt(f.outerHeight(),10)+"px",tabWidth:parseInt(e.tabHandle.outerWidth(),10)+"px",tabHeight:parseInt(e.tabHandle.outerHeight(),10)+"px"};if(e.tabLocation==="top"||e.tabLocation==="bottom"){f.css({left:e.leftPos});e.tabHandle.css({right:0})}if(e.tabLocation==="top"){f.css({top:"-"+i.containerHeight});e.tabHandle.css({bottom:"-"+i.tabHeight})}if(e.tabLocation==="bottom"){f.css({bottom:"-"+i.containerHeight,position:"fixed"});e.tabHandle.css({top:"-"+i.tabHeight})}if(e.tabLocation==="left"||e.tabLocation==="right"){f.css({height:i.containerHeight,top:e.topPos});e.tabHandle.css({top:0})}if(e.tabLocation==="left"){f.css({left:"-"+i.containerWidth});e.tabHandle.css({right:"-"+i.tabWidth})}if(e.tabLocation==="right"){f.css({right:"-"+i.containerWidth});e.tabHandle.css({left:"-"+i.tabWidth});a("html").css("overflow-x","hidden")}e.tabHandle.click(function(l){l.preventDefault()});var d=function(){if(e.tabLocation==="top"){f.animate({top:"-"+i.containerHeight},e.speed).removeClass("open")}else{if(e.tabLocation==="left"){f.animate({left:"-"+i.containerWidth},e.speed).removeClass("open")}else{if(e.tabLocation==="right"){f.animate({right:"-"+i.containerWidth},e.speed).removeClass("open")}else{if(e.tabLocation==="bottom"){f.animate({bottom:"-"+i.containerHeight},e.speed).removeClass("open")}}}}};var g=function(){if(e.tabLocation=="top"){f.animate({top:"-3px"},e.speed).addClass("open")}else{if(e.tabLocation=="left"){f.animate({left:"-3px"},e.speed).addClass("open")}else{if(e.tabLocation=="right"){f.animate({right:"-3px"},e.speed).addClass("open")}else{if(e.tabLocation=="bottom"){f.animate({bottom:"-3px"},e.speed).addClass("open")}}}}};var c=function(){f.click(function(l){l.stopPropagation()});a(document).click(function(){d()})};var j=function(){e.tabHandle.click(function(l){if(f.hasClass("open")){d()}else{g()}});c()};var h=function(){f.hover(function(){g()},function(){d()});e.tabHandle.click(function(l){if(f.hasClass("open")){d()}});c()};var b=function(){d();setTimeout(g,500)};if(e.action==="click"){j()}if(e.action==="hover"){h()}if(e.onLoadSlideOut){b()}}})(jQuery);$(function(){$(".slide-out-div").tabSlideOut({tabHandle:".handle",pathToTabImage:"http://www.icegrips.co.uk/images/tabTrade.png",imageHeight:"25px",imageWidth:"119px",tabLocation:"right",speed:300,action:"click",topPos:"0",leftPos:"20px",fixedPosition:false})});
