if(!window.pnp_shop){
var pnp_shop;
}
(function(){
function _1(){
var _2=this;
var _3="http://shop.pixnpals.com";
var _4="5";
var _5=parseInt("500");
var _6="false";
var _7="0";
if(_7=="0"){
_7=null;
}
var _8=parseInt("0");
var _9="0";
if(_9=="0"){
_9=null;
}
var _a="#ffffff";
var _b="#ff8b4d";
var _c="#fff8e7";
var _d="#555555";
var _e="#ffffff";
var _f="#ff8b4d";
var _10="#b5b5b5";
var _11="#fff8e7";
var _12="#ffefc8";
var _13="#555555";
var _14="#ff0000";
var _15="#333333";
var _16="#692805";
var _17="#ffffff";
var _18="#ffffff";
var _19;
var _1a;
var _1b;
var _1c;
var _1d;
var _1e;
var _1f;
var _20;
var _21=function(_22){
var _23=window.location.search;
var _24=_23.indexOf(_22+"=");
if(_24<0){
return null;
}
_24+=_22.length+1;
var end=_23.indexOf("&",_24);
if(end<0){
end=_23.length;
}
var _26=_23.substr(_24,(end-_24));
return unescape(_26);
};
var _27=function(_28){
var url=window.location.href;
var _2a;
var _2b=url.indexOf(_28+"=");
if(_2b<0){
return url;
}
_2a=url.substr(0,_2b);
_2b+=_28.length+1;
var end=url.indexOf("&",_2b);
if(end>=0){
_2a+=url.substr(end+1);
}else{
_2a=_2a.substr(0,_2a.length-1);
}
return _2a;
};
var _2d=function(){
var _2e=_2f();
window.document.documentElement.style.overflow="hidden";
window.scroll(0,_2e);
};
var _30=function(){
var _31=_32();
var _33=_34();
var _35=_2f();
if(_31>_33.height){
window.document.documentElement.style.overflowY="scroll";
}else{
window.document.documentElement.style.overflow="auto";
}
window.scroll(0,_35);
};
var _2f=function(){
var _36=0;
if(typeof window.document.pageYOffset!="undefined"){
_36=window.document.pageYOffset;
}else{
if(typeof window.document.documentElement.scrollTop!="undefined"&&window.document.documentElement.scrollTop>0){
_36=window.document.documentElement.scrollTop;
}else{
if(typeof window.document.body.scrollTop!="undefined"){
_36=window.document.body.scrollTop;
}
}
}
return parseInt(_36);
};
var _32=function(){
var _37=(document.body.offsetHeight!==undefined)?document.body.offsetHeight:document.height;
return parseInt(_37);
};
var _34=function(){
var w=0;
var h=0;
if(!window.innerWidth){
if(!(document.documentElement.clientWidth==0)){
w=document.documentElement.clientWidth;
h=document.documentElement.clientHeight;
}else{
w=document.body.clientWidth;
h=document.body.clientHeight;
}
}else{
w=window.innerWidth;
h=window.innerHeight;
}
return {width:parseInt(w),height:parseInt(h)};
};
var _3a=function(url){
var _3c=url.replace(/\//g,"+");
_3c=_3c.replace(/\?/g,"&");
return encodeURIComponent(_3c);
};
_2.renderShop=function(_3d,_3e,_3f){
if(_3e){
if(_3e.background_color){
_e=_3e.background_color;
}
if(_3e.theme_color_1){
_f=_3e.theme_color_1;
}
if(_3e.theme_color_2){
_10=_3e.theme_color_2;
}
if(_3e.theme_color_3){
_11=_3e.theme_color_3;
}
if(_3e.theme_color_4){
_12=_3e.theme_color_4;
}
if(_3e.text_color){
_13=_3e.text_color;
}
if(_3e.error_text_color){
_14=_3e.error_text_color;
}
if(_3e.button_line_color){
_15=_3e.button_line_color;
}
if(_3e.button_fill_color){
_16=_3e.button_fill_color;
}
if(_3e.button_inner_line_color){
_17=_3e.button_inner_line_color;
}
if(_3e.button_text_color){
_18=_3e.button_text_color;
}
}
var _40=_3;
var _41=_21("pnp_pd");
var _42=_21("pnp_type");
var _43=_21("pnp_paid");
var _44;
var _45;
var _46;
var _47="location/"+_3a(_27("pnp_paid"))+"/";
if(_3d){
if(_3d.pnp_pd){
_41=_3d.pnp_pd;
}
if(_3d.pnp_type||_3d.pnp_type==0){
_42=_3d.pnp_type;
}
if(_3d.height){
_5=_3d.height;
}
if(_3d.api_key){
_8=parseInt(_3d.api_key);
}
if(_3d.transaction_key){
_9=_3d.transaction_key;
}
if(_3d.photoId){
_44=_3d.photoId;
_46=true;
}
if(_3d.popup){
_45=_3d.popup;
}
if(_3d.hideMenu){
_46=true;
}
}
var _48="";
if(_8>0){
_48+="apiKey/"+_8+"/";
}
if(_9){
_48+="transactionKey/"+_9+"/";
}
if(_44){
_48+="photo/"+_44+"/";
}
if(_45){
_48+="popup/1/";
}
if(_46){
_48+="hidemenu/1/";
}
var _49="";
if(_6=="false"||_6==false){
_49="/rx/"+document.domain;
}
if(_43!=null){
if(_43=="false"){
_40+="/confirm/index/shop/"+_4+_49+"/pnp_paid/false/";
}else{
_40+="/finalpage/index/shop/"+_4+_49+"/orderID/"+_43+"/email/true/";
}
}else{
if(_41){
if(_41=="cart"){
_40+="/shopping-cart/index/shop/"+_4+_49+"/";
}else{
if(_42||_42==0){
_40+="/info/index/shop/"+_4+"/pd/"+_41+"/type/"+_42+_49+"/";
}else{
_40+="/info/index/shop/"+_4+"/pd/"+_41+_49+"/";
}
}
}else{
if(_8>0){
_40+="/api-advertising/index/shop/"+_4+_49+"/";
}else{
_40+="/index/index/";
}
}
}
var _4a="bkg/"+_e+"/"+"t1/"+_f+"/"+"t2/"+_10+"/"+"t3/"+_11+"/"+"t4/"+_12+"/"+"text1/"+_13+"/"+"textErr/"+_14+"/"+"bline/"+_15+"/"+"bfill/"+_16+"/"+"biline/"+_17+"/"+"btext/"+_18+"/";
var _4b=_40+_48+_4a.replace(/#/g,"")+_47;
if(window.pageTracker){
var _4c;
try{
_4c=pageTracker._getLinkerUrl(_4b);
}
catch(err){
}
if(_4c){
_4b=_4c;
}
}
if(_3f){
return _4b;
}else{
document.write("<iframe id='pnp_shop_iframe' name='pnp_shop_iframe' frameborder='0' border='0' cellspacing='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>");
var _4d=document.getElementById("pnp_shop_iframe");
_4d.style.width="100%";
_4d.style.height=_5+"px";
_4d.style.backgroundColor="transparent";
window.frames["pnp_shop_iframe"].location=_4b;
}
};
_2.renderCart=function(_4e,_4f){
if(_4f){
if(_4f.header_color){
_a=_4f.header_color;
}
if(_4f.header_background_color){
_b=_4f.header_background_color;
}
if(_4f.content_background_color){
_c=_4f.content_background_color;
}
if(_4f.text_color){
_d=_4f.text_color;
}
}
if(_4e){
if(_4e.shop_url){
_7=_3a(_4e.shop_url);
}
}
document.write("<iframe id='pnp_shop_cart' name='pnp_shop_cart' scrolling = 'no' frameborder='0' border='0' cellspacing='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>");
var _50=document.getElementById("pnp_shop_cart");
_50.style.width="100%";
_50.style.height="64px";
_50.style.backgroundColor="transparent";
var _51=_3;
var _52=document.domain;
_51+="/shopping-cart/small/shop/"+_4+"/";
if(_7!=null){
_51+="shopurl/"+_7+"/";
}
var _53="bkg/"+_a+"/"+"t1/"+_b+"/"+"t3/"+_c+"/"+"text1/"+_d+"/";
window.frames["pnp_shop_cart"].location=_51+"rx/"+_52+"/"+_53.replace(/#/g,"")+"?shopUrl="+window.location.href;
};
_2.popupValues=function(_54){
if(_54!=true&&(!_19||parseInt(_19.style.top)==-1000)){
return;
}
_1c=_34();
_1d=_32();
_1e=_2f();
var _55=parseInt(_1c.width-30);
var _56=parseInt(_1c.height-30);
if(_1f>0&&_1f<_55){
_55=_1f;
}
if(_20>0&&_20<_56){
_56=_20;
}
var top=parseInt((_1c.height-_56-10)/2+_1e);
var _58=parseInt((_1c.width-_55-10)/2);
_19.style.top=top+"px";
_19.style.left=_58+"px";
_19.style.width=_55+"px";
_19.style.height=_56+"px";
_1b.style.height=_56+"px";
_1b.style.width=_55+"px";
var _59=_1c.height;
if(_1d>_59){
_59=_1d;
}
_1a.style.height=_59+"px";
_1a.style.width=_1c.width+"px";
};
_2.closePopup=function(){
if(_19){
_19.style.left="-1000px";
_19.style.top="-1000px";
_19.style.width="0px";
_19.style.height="0px";
}
if(_1a){
document.body.removeChild(_1a);
_1a=null;
}
_30();
};
_2.popup=function(_5a,_5b){
if(!_5a){
_1f=0;
}else{
_1f=_5a;
}
if(!_5b){
_20=0;
}else{
_20=_5b;
}
if(!_19){
_19=document.createElement("div");
_19.id="pnp_popup";
_19.style.position="absolute";
_19.style.zIndex=999;
_19.style.overflow="hidden";
_19.style.backgroundColor=_e;
_19.style.border="5px solid black";
var _5c=document.createElement("div");
_5c.style.position="relative";
var _5d=document.createElement("div");
_5d.style.position="absolute";
_5d.style.zIndex=10;
_5d.style.top="5px";
_5d.style.right="5px";
_5d.style.width="16px";
_5d.style.height="16px";
_5d.style.cursor="pointer";
_5d.style.background="url("+_3+"/res/icons/remove.gif)";
_5d.onclick=function(){
_2.closePopup();
};
_5c.appendChild(_5d);
_5c.appendChild(_1b);
_19.appendChild(_5c);
document.body.appendChild(_19);
}
if(!_1a){
_1a=document.createElement("div");
_1a.id="pnp_cover";
_1a.style.opacity=0.4;
_1a.style.filter="alpha(opacity=40)";
_1a.style.backgroundColor="black";
_1a.style.position="absolute";
_1a.style.zIndex=998;
_1a.style.top="0px";
_1a.style.left="0px";
}
_2d();
document.body.appendChild(_1a);
};
_2.edit=function(url,_5f,_60){
url=url.replace(/\+/g,"%2B");
if(!_1b){
_1b=document.createElement("iframe");
_1b.id="pnp_product";
_1b.name="pnp_product";
_1b.style.border="0px";
_1b.style.margin="0px";
}
_2.popup(_5f,_60);
window.frames["pnp_product"].location=url;
_2.popupValues(true);
};
_2.addToCart=function(url){
url=url.replace(/\+/g,"%2B");
if(window.frames["pnp_shop_iframe"]!=undefined){
_2.closePopup();
window.frames["pnp_shop_iframe"].location=_3+url;
}else{
if(window.frames["pnp_product"]!=undefined){
if(window.frames["pnp_shop_cart"]!=undefined){
_2.closePopup();
}
window.frames["pnp_product"].location=_3+url;
}
}
};
_2.viewCart=function(_62){
var _63=new Object();
_63.popup=true;
_63.pnp_pd="cart";
_63.hideMenu=true;
var url=_2.renderShop(_63,_62,true);
_2.edit(url,750,460);
};
_2.fixShopFrameHeight=function(_65){
var _66=_5;
if(_65>_5){
_66=_65;
}
var _67=document.getElementById("pnp_shop_iframe");
if(_67){
_67.style.height=_66+"px";
}
};
_2.fixProductFrameSize=function(_68,_69){
var _6a=document.getElementById("pnp_product");
if(_6a){
if(_68&&_69){
_1f=_68;
_20=_69;
}else{
_1f=0;
_20=0;
}
_2.popupValues();
}
};
_2.openProduct=function(_6b,_6c){
if(!_6b){
_6b=new Object();
}
_6b.popup=true;
var url=_2.renderShop(_6b,_6c,true);
_2.edit(url,750,460);
};
var _6e=function(){
setTimeout(function(){
if(window.frames["pnp_shop_iframe"]==undefined){
var _6f=_21("pnp_paid");
if(_6f!=null){
_2.openProduct();
}
}
},500);
}();
};
pnp_shop=new _1();
window.onresize=pnp_shop.popupValues;
})();


