var photoList=new Array(),$activeColor=false,firstProductShown=false;$(function(){var $body=$("body");$("#social-nav a").hover(function(){$(this).dequeue().animate({"margin-top":4},250)},function(){$(this).dequeue().animate({"margin-top":0},250)});$("#main-nav a, #secondary-nav a").hover(function(){$(this).dequeue().animate({"color":"#ff0000"},150,function(){$(this).css("color","#ff0000")})},function(){$(this).dequeue().animate({"color":"#ffffff"},150,function(){$(this).css("color","#ffffff")})});$("#footer-links a").hover(function(){$(this).dequeue().animate({"color":"#ff0000"},150,function(){$(this).css("color","#ff0000")})},function(){$(this).dequeue().animate({"color":"#cccccc"},150,function(){$(this).css("color","#cccccc")})});$(".white2red").hover(function(){$(this).dequeue().animate({"color":"#ff0000"},150,function(){$(this).css("color","#ff0000")})},function(){$(this).dequeue().animate({"color":"#ffffff"},150,function(){$(this).css("color","#ffffff")})});if($body.hasClass("hp")){if($.browser.msie){if(!$("body").hasClass("dontFix")){$(".shapeImage img","#shapes-index").fixPNG()}$(".off img, .on img","#shapes-index").click(function(){$(this).parent().parent().click()})}$("#shapes-index a").each(function(){$(this).hover(function(){$(".on .shapeText",this).fadeIn(350);$(".off .shapeText",this).fadeOut(350);$(".on .shapeImage",this).css("z-index","500").stop().animate({opacity:1,height:135,width:308,left:-55,top:-25},300,function(){$(this).show()});$(".off .shapeImage",this).stop().animate({opacity:0,height:135,width:308,left:-55,top:-25},300)},function(){$(".on .shapeText",this).fadeOut(350);$(".off .shapeText",this).fadeIn(350);$(".on .shapeImage",this).css("z-index","100").stop().animate({opacity:0,height:83,width:188,left:21,top:0},300);$(".off .shapeImage",this).stop().animate({opacity:1,height:83,width:188,left:21,top:0},300,function(){$(this).show()})})});$("#home-feature").cycle({timeout:6000,speed:1000,pause:1})}if($body.hasClass("modellist")){$("#shape-info ul a").hover(function(){$(this).dequeue();$(this).animate({"margin-top":4},250)},function(){$(this).dequeue();$(this).animate({"margin-top":0},250)})}if($body.hasClass("products")){$("#color-select li").click(function(){if($activeColor){if($(this).attr("id")!=$activeColor.attr("id")){$activeColor.removeClass("sprites");$(".product-image",$activeColor).stop().animate({"top":150,"left":-30,"height":1,"width":1},500);$activeColor=false}}if(!$activeColor){$activeColor=$(this);$(".product-image",$activeColor).stop().css({"top":-180,"left":940,"height":1,"width":1,"zoom":1}).animate({"top":-150,"left":180,"height":282,"width":704},500);$activeColor.addClass("sprites")}});$("#product-detail-tabs li.off").hover(function(){if($(this).hasClass("off")){$("span",this).dequeue().animate({"color":"#ffac3c"},200)}},function(){if($(this).hasClass("off")){$("span",this).dequeue().animate({"color":"#ffffff"},200)}}).click(function(){$obj=$(this);$("#product-detail-tabs li.on").removeClass("on").addClass("off").children().css("color","#ffffff");$obj.removeClass("off").addClass("on");$(".tabbedContent").fadeOut("fast");$("#"+$obj.attr("rel")).fadeIn("slow")});if($(".gallery-image").length<=1){$("#backNext").remove();photoList[0]=false}else{i=0;$(".gallery-image").each(function(){photoList[i++]={photo:$(this).attr("href"),active:false}})}$(".gallery-image").click(function(){$obj=$(this);$("#shadow-overlay").fadeTo(250,.6);$("#fullsize-photo").html($("<img>").attr("src",$obj.attr("href")).css("display","none").load(function(){$(this).show();$("#fullsize-glam").fadeIn("slow")}));if(photoList[0]){for(i=0;i<photoList.length;i++){if(photoList[i].photo==$obj.attr("href")){photoList[i].active=true;break}}if($obj.parent().hasClass("first")){$("#gallery-back").hide();$("#gallery-next").show()}else if($obj.parent().hasClass("last")){$("#gallery-next").hide();$("#gallery-back").show()}else{$("#gallery-next").show();$("#gallery-back").show()}}return false});$("#gallery-close, #shadow-overlay").click(function(){$("#fullsize-glam, #shadow-overlay").fadeOut(200);for(i=0;i<photoList.length;i++){photoList[i].active=false}});if(photoList[0]){$("#gallery-next").click(function(){nextPhotoCheck=false,hasNext=0;for(i=0;i<photoList.length;i++){if(hasNext==1){hasNext=2;break}if(nextPhotoCheck){nextPhoto=photoList[i].photo;photoList[i].active=true;hasNext=1}else if(photoList[i].active==true){nextPhotoCheck=true;photoList[i].active=false}}$("#fullsize-photo img").fadeTo("fast",.2,function(){$(this).attr("src",nextPhoto).css({"height":"auto","width":"auto"}).fadeTo("fast",1)});$("#gallery-back").fadeIn("fast");if(hasNext<2){$("#gallery-next").fadeOut("fast")}});$("#gallery-back").click(function(){lastPhotoCheck=false,hasBack=0;for(i=photoList.length-1;i>=0;i--){if(hasBack==1){hasBack=2;break}if(lastPhotoCheck){lastPhoto=photoList[i].photo;photoList[i].active=true;hasBack=1}else if(photoList[i].active==true){lastPhotoCheck=true;photoList[i].active=false}}$("#fullsize-photo img").fadeTo("fast",.2,function(){$(this).attr("src",lastPhoto).css({"height":"auto","width":"auto"}).fadeTo("fast",1)});$("#gallery-next").fadeIn("fast");if(hasBack<2){$("#gallery-back").fadeOut("fast")}})}$("#share-links a").hover(function(){$(this).dequeue();$(this).animate({"margin-left":4},250)},function(){$(this).dequeue();$(this).animate({"margin-left":0},250)});$("#color-select .product-image:first").load(function(){setTimeout(function(){$("#color-select li:first").click();firstProductShown=true},250)});setTimeout(function(){if(!firstProductShown){$("#color-select li:first").click()}},1500);$("#product-detail-tabs li:last").click()}if($body.hasClass("artistsList")){$("#artistList .artistRowLink").hover(function(){$("td, td a",this).dequeue().css("text-decoration","underline").animate({"color":"#ffac3c"},100,function(){$(this).css("color","#ffac3c")})},function(){$("td, td a",this).dequeue().css("text-decoration","none").animate({"color":"#ffffff"},100,function(){$(this).css("color","#ffffff")})}).click(function(){window.location.href=$("a",this).attr("href")})}if($body.hasClass("artistPage")){$("#artistGear a").hover(function(){$("h4",this).dequeue().animate({"color":"#ff0000"},150,function(){$(this).css("color","#ff0000")})},function(){$("h4",this).dequeue().animate({"color":"#ffffff"},150,function(){$(this).css("color","#ffffff")})});$(".video-popup").click(function(){$obj=$(this);$("#shadow-overlay").fadeTo(250,.6);$("#artistVideoPlayer").html($(".hiddenEmbed",$obj.parent()).html()).show();$("#shadow-overlay").click(function(){$("#artistVideoPlayer, #shadow-overlay").fadeOut(200);$("#artistVideoPlayer").hide().empty()});return false});if($(".gallery-image").length<=1){$("#backNext").remove();photoList[0]=false}else{i=0;$(".gallery-image").each(function(){photoList[i++]={photo:$(this).attr("href"),active:false}})}$(".gallery-image").click(function(){$obj=$(this);$("#shadow-overlay").fadeTo(250,.6);$("#fullsize-photo").html($("<img>").attr("src",$obj.attr("href")).css("display","none").load(function(){$(this).show();$("#fullsize-glam").fadeIn("slow")}));if(photoList[0]){for(i=0;i<photoList.length;i++){if(photoList[i].photo==$obj.attr("href")){photoList[i].active=true;break}}if($obj.parent().hasClass("first")){$("#gallery-back").hide();$("#gallery-next").show()}else if($obj.parent().hasClass("last")){$("#gallery-next").hide();$("#gallery-back").show()}else{$("#gallery-next").show();$("#gallery-back").show()}}$("#gallery-close, #shadow-overlay").click(function(){$("#fullsize-glam, #shadow-overlay").fadeOut(200);for(i=0;i<photoList.length;i++){photoList[i].active=false}});return false});if(photoList[0]){$("#gallery-next").click(function(){nextPhotoCheck=false,hasNext=0;for(i=0;i<photoList.length;i++){if(hasNext==1){hasNext=2;break}if(nextPhotoCheck){nextPhoto=photoList[i].photo;photoList[i].active=true;hasNext=1}else if(photoList[i].active==true){nextPhotoCheck=true;photoList[i].active=false}}$("#fullsize-photo img").fadeTo("fast",.2,function(){$(this).attr("src",nextPhoto).css({"height":"auto","width":"auto"}).fadeTo("fast",1)});$("#gallery-back").fadeIn("fast");if(hasNext<2){$("#gallery-next").fadeOut("fast")}});$("#gallery-back").click(function(){lastPhotoCheck=false,hasBack=0;for(i=photoList.length-1;i>=0;i--){if(hasBack==1){hasBack=2;break}if(lastPhotoCheck){lastPhoto=photoList[i].photo;photoList[i].active=true;hasBack=1}else if(photoList[i].active==true){lastPhotoCheck=true;photoList[i].active=false}}$("#fullsize-photo img").fadeTo("fast",.2,function(){$(this).attr("src",lastPhoto).css({"height":"auto","width":"auto"}).fadeTo("fast",1)});$("#gallery-next").fadeIn("fast");if(hasBack<2){$("#gallery-back").fadeOut("fast")}})}}if($body.hasClass("newsPage")){$("#caption").html($(".photo-caption:first").text());$("#newsPhotos").cycle({timeout:0,speed:0,height:320,next:'#newsNext',prev:'#newsBack',after:function(curr,next){$("#caption").html($(".photo-caption",curr).html())}})}});																										
(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end)}fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")"}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3){return color}if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)){return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])]}if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)){return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55]}if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)){return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]}if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)){return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)]}return colors[jQuery.trim(color).toLowerCase()]}function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))break;attr="backgroundColor"}while(elem=elem.parentNode);return getRGB(color)};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
(function($){$.fn.extend({fixPNG:function(){this.each(function(){var obj=this;obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+obj.src+"', sizingMethod='scale')";obj.src="images/empty.gif"});return this}})})(jQuery);
(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);
$(".gallery-image").click(function(){$obj=$(this);$("#shadow-overlay").fadeTo(250,.6); $("#fullsize-control").html($("<img>").attr("src",$obj.attr("href")).css("display","none").load(function(){$(this).show(); $("#fullsize-controlglam").fadeIn("slow")}));}); $("#control-close, #shadow-overlay").click(function(){$("#fullsize-controlglam, #shadow-overlay").fadeOut(200)});
