(function(A){if(typeof window.Philips=="undefined"){window.Philips={};}var B=window.Philips;
B.Visual=B.Visual||{};B.Visual.pageCurl=function(C){var D=A.extend({},this.defaults,C);
var E=A(D.element);E.html(this.render(D.template,D,null));A("."+D.belowClass+", ."+D.maskClass,E).css("width",D.minWidth+"px").css("height",D.minHeight+"px");
this.animate(E,D);};B.Visual.pageCurl.prototype.defaults={element:"",link:"",topImage:"",topClass:"curlTop",belowImage:"",belowClass:"curlBelow",maskImage:"/consumerfiles/assets/components/visual/pagecurl/philips.curl.png",maskClass:"curlMask",minMaskWidth:31,minMaskHeight:32,minBelowWidth:28,minBelowHeight:28,minDuration:220,maxMaskWidth:374,maxMaskHeight:179,maxBelowWidth:360,maxBelowHeight:142,maxDuration:500,template:"            <a href='<%= link %>'>                <img class='<%= maskClass %>' src='<%= maskImage %>' style='position: absolute; right: 0; top: 0; z-index: 2; width: <%= minMaskWidth %>px; height: <%= minMaskHeight %>px;' />                <div class='<%= belowClass %>' style='background: url(\"<%= belowImage %>\") no-repeat top right; position: absolute; right: 0; top: 0; z-index: 1; width: <%= minBelowWidth %>px; height: <%= minBelowHeight %>px;'></div>                <img class='<%= topClass %>' src='<%= topImage %>' style='position: absolute; right: 0; top: 0; z-index: 0;' />            </a>"};
B.Visual.pageCurl.prototype.animate=function(E,D){var F=E.find("."+D.belowClass);
var C=E.find("."+D.maskClass);console.log(F,C);E.hover(function(){F.stop().animate({width:D.maxBelowWidth,height:D.maxBelowHeight},D.maxDuration);
C.stop().animate({width:D.maxMaskWidth,height:D.maxMaskHeight},D.maxDuration);},function(){C.stop().animate({width:D.minMaskWidth,height:D.minMaskHeight},D.minDuration);
F.stop().animate({width:D.minBelowWidth,height:D.minBelowHeight},D.minDuration-20);
});};B.Visual.pageCurl.prototype.render=function(G,F,D){D=D||/<%=([\s\S]+?)%>/g;var C="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+G.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(D,function(H,I){return"',"+I.replace(/\\'/g,"'")+",'";
}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";
var E=new Function("obj",C);return F?E(F):E;};})(jQuery);jQuery("head").append("<style>div.pagecurl  img.curl-top {	position: absolute;	right: 0;	top: 0; 	z-index: 0;}</style>");

