<script src=https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js></script><script>jQuery(function(e){function a(e){function a(e){return("0"+parseInt(e).toString(16)).slice(-2)}return e=e.match(/^rgb((d+),s*(d+),s*(d+))$/),"#"+a(e[1])+a(e[2])+a(e[3])}for(var c,f=0,o=["#f48fb1","#f06292","#ec407a","#e91e63","#d81b60","#c2185b","#ad1457","#880e4f","#ff80ab","#ff4081","#f50057","#c51162","#f3e5f5","#e1bee7","#ce93d8","#ba68c8","#ab47bc","#9c27b0","#8e24aa","#7b1fa2","#6a1b9a","#4a148c","#ea80fc","#e040fb","#d500f9","#aa00ff","#ede7f6","#d1c4e9","#b39ddb","#9575cd","#7e57c2","#673ab7","#5e35b1","#512da8","#4527a0","#311b92","#b388ff","#7c4dff","#651fff","#6200ea","#e8eaf6","#c5cae9","#9fa8da","#7986cb","#5c6bc0","#3f51b5","#3949ab","#303f9f","#283593","#1a237e","#8c9eff","#536dfe","#3d5afe","#304ffe","#e3f2fd","#bbdefb","#90caf9","#64b5f6","#42a5f5","#2196f3","#1e88e5","#1976d2","#1565c0","#0d47a1","#82b1ff","#448aff","#2979ff","#263238","#f48fb1","#f06292","#f48fb1","#f06292","#ec407a","#e91e63","#d81b60","#c2185b","#ad1457","#880e4f","#ff80ab","#ff4081","#f50057","#c51162","#f3e5f5","#e1bee7"],t=0;o.length>t;t++)e("#colors-container").append('<div class="palette" style="background: '+o[t]+'"><span class="code">'+o[t]+'</span><span class="close">×</span></div>');0==f&&e("#carret div.seleccio").append('<div id="carret-buit">Cart is empty.</div>'),e("div.palette").hover().mouseenter(function(){e(this).append('<div id="codeShown">'+a(e(this).css("backgroundColor"))+"</div>")}).mouseleave(function(){e("#codeShown").remove()}),e("div.palette").on("click",function(){e("#carret-buit").remove(),f<=9?(c=e(this).css("backgroundColor"),e("#carret div.seleccio").append('<div class="color-seleccionat" style="width: 10%;height:58px;display:inline-block;text-shadow: 1px 1px 1px rgba(0, 0, 0, 1);line-height:58px;text-align:center;color:#fff;background:'+c+'"><span class="code-color">'+a(c)+'</span><div class="delete-overlay"><i class="fa fa-trash"></i></div></div>'),f+=1):alert("Oops! Your cart is full. Make some room in the cart before adding more colors to it.")}),e("#carret, #final-palette").on("click",".color-seleccionat",function(){e(this).remove(),0==(f-=1)&&e("#carret div.seleccio").append('<div id="carret-buit">Cart is empty.</div>')}),e("#solicitar").on("click",function(){e("#colors-form").fadeIn("fast"),e("#carret div.seleccio").appendTo(e("#final-palette")),e("#send-palette").html(e("#final-palette div.seleccio").html())}),e("p.close-colors-form").on("click",function(){e("#colors-form").fadeOut("fast"),e("#final-palette div.seleccio").appendTo(e("#carret"))})})</script><style>div#colors-container{width:100%;height:auto;background:#fff}*,:after,:before{box-sizing:border-box}body{margin:0}.palette{width:7.14%;height:100px;float:left;position:relative;-webkit-transform-origin:0 100%;transform-origin:0 100%;-webkit-transition:.1s;transition:.1s;z-index:5}.palette:hover{z-index:10;cursor:pointer;-webkit-transform:translateY(-10px);transform:translateY(-10px);box-shadow:0 5px 12px rgba(0,0,0,.3),0 4px 15px rgba(0,0,0,.3)}.palette #codeShown{position:absolute;height:100px;line-height:100px;text-align:center;width:100%;left:0;top:0;background:0 0;color:#fff;text-shadow:1px 1px 1px rgba(0,0,0,1)}.palette.open{-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:scale(2.5) rotate(90deg);transform:scale(2.5) rotate(90deg);z-index:50}.palette.open:hover{z-index:55}.palette.open .close{display:block}.palette.open .code{opacity:1}.palette.open .code::after{opacity:1;color:transparent;text-shadow:none}.close{display:none;color:#fff;padding-left:3px;text-shadow:0 1px 0 rgba(0,0,0,.3);font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.code{opacity:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);position:absolute;color:#fff;font-size:14px;left:0;top:50%;padding:10px;text-shadow:0 0 1px rgba(0,0,0,.5)}@media (max-width:640px){.palette{width:14.25%}}@media (max-width:480px){.palette{width:25%}}@media (max-width:320px){.palette{width:33%}}</style><div id=colors-container></div>