/* skin-one.com javascript written by All Web Promotion, Inc. allwebpromotion.com */
(function(a){a.fn.distributeHorizontalNav=function(){return this.each(function(){var e=a(this),d=a(this).innerWidth(),l,i,f,g,h,k,b,c,j;if(!e.is("ul")){e=e.find("ul:first");}l=e.find("> li");i=l.size();g=0;l.each(function(){g+=a(this).outerWidth();});h=d-g;if(h<1){return;}b=0;k=true;for(p=0;p<h;p++){if(b>i){b=0;k=!k;}f=l.eq(b).find("a");c=k?"padding-left":"padding-right";j=parseInt(f.css(c),10);if(isNaN(j)){j=0;}j++;f.css(c,j+"px");b++;}});};a.fn.centerHorizontalNav=function(){var b=["paddingLeft","paddingRight","marginLeft","marginRight","borderLeftWidth","borderRightWidth"];return this.each(function(){var e=a(this);var f=e.width();var g=0;var d=e.find("> li");var h=d.size();d.eq(0).css("margin-left","0");d.eq(h-1).css("margin-right","0");d.each(function(){var j;var m=a(this);g=g+m.width();for(var l=0;l<b.length;l++){j=parseInt(m.css(b[l]));if(!isNaN(j)){g=g+j;}}});var c=f-g;if(c>0){var i=parseInt(e.css("padding-left"));i=isNaN(i)?0:i;i=parseInt((c/2)+i);a(this).css({"padding-left":i+"px",width:"auto"});}});};a.fn.awpDefaultInputText=function(){return this.each(function(){a(this).data("colorActive",a(this).css("color")).blur(function(){var b=a(this).val();if(!(typeof b==="string"&&b.length>1)){a(this).val(a(this).metadata().text);}a(this).css("color",a(this).metadata().color);}).focus(function(){a(this).css("color",a(this).data("colorActive"));if(a(this).val()==a(this).metadata().text){a(this).val("");}}).trigger("blur");});};(function(b){b.fn.flymenu=function(g){var e=b.extend({showDelay:0,switchDelay:0,hideDelay:0,menuSel:"ul",itemSel:"li",hideSel:".flash-container",show:function(){this.style.visibility="visible";},hide:function(){this.style.visibility="hidden";}},g);var f=function(c,h,d){b(c).attr("pending",h);window.setTimeout(function(){if(b(c).attr("pending")==h){if(h=="show"){if(e.hideSel){b(e.hideSel).hide();}b(c).bgiframe();b(c).parent().addClass("active");e.show.call(c);}else{b(".bgiframe",c).remove();b(c).parent().removeClass("active");e.hide.call(c);if(e.hideSel){b(e.hideSel).show();}}}},d);};b(this).children(e.itemSel).each(function(d){var c=this;if(d==0){b(this).addClass("first");}if(d==b(this).parent().children(e.itemSel).length-1){b(this).addClass("last");}if(b(this).children(e.menuSel).size()>0){b(this).addClass("parent").hover(function(){var h=this;b(this).parent().children(".active").each(function(){if(this!=h){f(b(this).children(e.menuSel).get(0),"hide",e.switchDelay);}});f(b(this).children(e.menuSel).get(0),"show",b(this).parent().children(".active").size>0?e.switchDelay:e.showDelay);},function(){f(b(this).children(e.menuSel).get(0),"hide",e.hideDelay);});}b(this).children(e.menuSel).each(function(){b(this).flymenu(e);});});return b(this);};})(jQuery);a.awpDisableTextSelection=function(b){if(typeof document.onselectstart!=="undefined"){document.onselectstart=function(){if(b){alert(b);}return false;};}else{document.onmousedown=function(d){var c="input textarea select";if(c.indexOf(d.target.tagName.toLowerCase())==-1){if(b){alert(b);}return false;}};document.onmouseup=function(c){return true;};}};a.awpDisableRightClick=function(c){function b(){if(event.button===2){if(c){alert(c);}return false;}}function d(e){if(document.layers||document.getElementById&&!document.all){if(e.which===2||e.which===3){if(c){alert(c);}return false;}}}if(document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=d;}else{if(document.all&&!document.getElementById){document.onmousedown=b;}}document.oncontextmenu=function(){if(c){alert(c);}return false;};};if(!a.isFunction(a.fn.setSelector)){a.fn.setSelector=function(b){return this.each(function(){if(b.indexOf(".")===0){a(this).addClass(b.substr(1));}if(b.indexOf("#")===0){a(this).attr("id",b.substr(1));}});};}})(jQuery);function popUp(a){window.open(a,"pop","width=650,height=500,toolbars=0,scrollbars=1");}function CheckSS(){var b=document.frmSS;var a=b.Email.value.indexOf(".");var c=b.Email.value.indexOf("@");if(a==-1||c==-1){alert("Please enter a valid email address.");b.Email.focus();b.Email.select();return false;}return true;}var mysite={contentsVerticalAlignSelectors:[".reviews-rating",".size",".prices",".multiLineOption",".button-container"],settings:{isEditor:false,defaultInputTextSel:".default-input-text",bookmarkthispageLinkSel:".bookmarkthispage",footerNavSel:"#footer-nav",shopbySel:"#shopby-bar-shopby select",ie6FixPngSel:null,contentProtectionUse:true,editorUrl:null,contentProtectionMessage:"Images and Source Code Copyright 1999-2011 Skin One"},start:function(){var c=this;c.extendSettings();c.ie6FixPng();$("#top-nav").distributeHorizontalNav();c.contentsEqualHeight();var b=new Date();var e=b.getFullYear();var d=b.getMonth();var a=b.getDate();if(a<10){a="0"+a;}var f=["January","February","March","April","May","June","July","August","September","October","November","December"];$(".date-now").text(f[d]+" "+a+", "+e);$(".tellafriend-link").click(function(){popUp("http://tools.all-web-promotion.com/skin1/tellafriend/friend.php?id="+document.URL);return false;});c.setupbookmarkthispage();$(".bookmarksite-link").click(function(){var g="http://www.skin-one.com/",h="Skin 1";if(document.all){window.external.AddFavorite(g,h);}else{if(window.sidebar){window.sidebar.addPanel(h,g,"");}}return false;});$("#itemarea .review-rating-image","#contents .reviews-rating-image").tooltip({track:true,delay:0,showURL:false,extraClass:"rating-image",left:0,right:0});$.awpEmailSignup({debug:0,url:"https://p.secure.hostingprod.com/@site.skin-one.com/ssl/awplib/email-signup.php"});$(c.settings.footerNavSel).centerHorizontalNav();$("#top-nav").flymenu({hideDelay:300,switchDelay:50,showDelay:75});if((typeof awpShopbyBarContents=="string")&&awpShopbyBarContents!==""){if($(c.settings.shopbySel).size()>0){$(c.settings.shopbySel).append(c.reformHtml(awpShopbyBarContents)).change(function(){var g,h,i=$(this).val();if(c.settings.isEditor&&c.settings.editorUrl){h=c.settings.editorUrl;}else{if(c.settings.isEditor){h=window.location.protocol+window.location.host;}else{h="http://www.skin-one.com";}}g=h+"/"+i;$(this).addClass("progress");window.location.replace(g);return false;});}}},reformHtml:function(a){return a.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#58;/g,":");},contentsEqualHeight:function(){if($("body.entrytype,body.brandtype,body.shopbytype").size()>0){$("#contents-table td.item-cell").each(function(){$(this).find("table").height($(this).height());});}},contentsVerticalAlign:function(){var a=this;if($("body").hasClass("contents2")){$("#contents-table tr").each(function(i){var h=0,b,d=true,c=true,g=0,f,e=$(this);e.find(".item-cell-content").each(function(){var j=$(this).height();h=Math.max(h,j);if(j!=b){d=false;}b=j;j=$(this).find(".name .name-content").height();g=Math.max(g,j);if(j!=f){c=false;}f=j;});if(!d){e.find(".item-cell-content").each(function(){var j=0,m,l=$(this);l.css("height",h);for(var k=a.contentsVerticalAlignSelectors.length-1;k>=0;k--){l.find(a.contentsVerticalAlignSelectors[k]).each(function(){$(this).css({position:"absolute",bottom:j+"px",left:"0"});j+=$(this).outerHeight();});}});}if(!c){e.find(".item-cell-content .name").css({height:g+"px","min-height":"1px"});}});}},isTrue:function(a){return(a==="T"||a==="t"||a==="true"||a===true);},extendSettings:function(){var c=this,b;if(!(typeof mysiteSettings==="object"&&mysiteSettings!==null)){return;}b=[];for(key in c.settings){if(typeof c.settings[key]==="boolean"){b.push(key);}}$.extend(c.settings,mysiteSettings);for(key in c.settings){if(c.inArray(b,key)){c.settings[key]=c.isTrue(c.settings[key])?true:false;}}},inArray:function(a,c){var b;for(b=0;b<a.length;b++){if(a[b]===c){return true;}}return false;},setupbookmarkthispage:function(){var a=this;if(a.settings.bookmarkthispageLinkSel){$(a.settings.bookmarkthispageLinkSel).click(function(){a.bookmarkthispage();});}},bookmarkthispage:function(){var a=window.location.href,c=document.getElementsByTagName("TITLE");if(c.length>0){c=c[0].innerHTML;}else{c=a;}if(window.sidebar){window.sidebar.addPanel(c,a,"");}else{if(window.opera&&window.print){var b=document.createElement("a");b.setAttribute("href",a);b.setAttribute("title",c);b.setAttribute("rel","sidebar");b.click();}else{if(document.all){window.external.AddFavorite(a,c);}}}},ie6FixPng:function(){if($.browser.msie&&$.browser.version=="6.0"){if(me.settings.ie6FixPngSel){$(me.settings.ie6FixPngSel).css({background:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+settings.image+"',sizingMethod='scale')"});}}}};$(function(){mysite.start();});if(awpIsContentProtection){var myDisableRightClickMessage="Images and Source Code Copyright 1999-2011 Skin One";var omitformtags=["input","textarea","select"];omitformtags=omitformtags.join("|");function disableselect(a){if(omitformtags.indexOf(a.target.tagName.toLowerCase())==-1){return false;}}function reEnable(){return true;}if(typeof document.onselectstart!="undefined"){document.onselectstart=new Function("return false");}else{document.onmousedown=disableselect;document.onmouseup=reEnable;}jQuery(document).ready(function(){function a(){if(event.button==2){alert(message);return false;}}function b(c){if(document.layers||document.getElementById&&!document.all){if(c.which==2||c.which==3){alert(message);return false;}}}if(document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=b;}else{if(document.all&&!document.getElementById){document.onmousedown=a;}}document.oncontextmenu=new Function("alert(myDisableRightClickMessage);return false");});}
