/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 4:34:32 AM PST                            */
/*      Machine:  10.16.140.110                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/8rixrqbu87oco808.pkg.js h:e268jm7f                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/8rixrqbu87oco808.pkg.js                                   */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/8rixrqbu87oco808.pkg.js"]); }

function PlatformCanvasController(_L0,_L1,_L2,_L3,_L4,_L5){this.sessionKey=_L1;this.appName=_L3;this.appId=_L0;this.callback=_L4;this.api_key=_L5;this.isFirstPage=false;this.isIFrame=false;this._movingPage=false;this.sessionRefresh=(_L2*900);if(this.appId&&this.sessionKey&&this.sessionRefresh)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);PlatformCanvasController.singleton=this;Arbiter.inform('PLATFORM_HAS_API_KEY',_L5,Arbiter.BEHAVIOR_PERSISTENT);}PlatformCanvasController.AUTO_REFRESH=30000;PlatformCanvasController.prototype.setUpIFrame=function(_L0){PageTransitions.registerHandler(this.handleChange.bind(this));this.isIFrame=true;this.isStatic=_L0;};PlatformCanvasController.prototype.autoRefreshAd=function(){if(this.isIFrame){this.isFirstPage=true;$('app'+this.appId+'_iframe_canvas').onload=this._clickRefresh.bind(this);}this._ignoreNext=true;this._loopRefresh();};PlatformCanvasController.prototype.requireLogin=function(){var _L0=FB.IFrameUtil.CanvasUtilServer.loginResponse;FBML.requireLogin(this.appId,_L0.bind(null,true),_L0.bind(null,false),null,true,true);};PlatformCanvasController.prototype.closeLogin=function(){FBML.closeLoginDialog();};PlatformCanvasController.prototype.showFeedDialog=function(_L0,_L1,_L2,_L3,_L4,_L5){FBML.showFeedDialog(this.appId,_L0,_L1,_L2,_L3,FB.IFrameUtil.CanvasUtilServer.loginResponse.bind(null),_L4,_L5);};PlatformCanvasController.prototype._loopRefresh=function(){if(this._ignoreNext){this._ignoreNext=false;}else this.refreshAd();this._loopRefresh.bind(this).defer(PlatformCanvasController.AUTO_REFRESH);};PlatformCanvasController.prototype._clickRefresh=function(){this.refreshAd();this._ignoreNext=true;};PlatformCanvasController.prototype.refreshAppSession=function(){new AsyncRequest().setURI('/ajax/session.php').setData({'app_id':this.appId,'session_key':this.sessionKey}).setReadOnly(true).setHandler(function(_L0){var _L1=_L0.getPayload();if(_L1['session_end']>0)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);}.bind(this)).send();};PlatformCanvasController.prototype.refreshUrl=function(_L0){var _L1=_L0.href;if(_L1.startsWith(this.callback)){var _L2=new URI(_L1.substring(this.callback.length));this.changeUrlSuffix(_L2,true);}return false;};PlatformCanvasController.refreshUrl=function(_L0){if(PlatformCanvasController.singleton)PlatformCanvasController.singleton.refreshUrl(_L0);};PlatformCanvasController.prototype.changeUrlSuffix=function(_L0,_L1){this.currentUri=URI.getRequestURI().getUnqualifiedURI();var _L2=new URI(this.getAppPrefix()+_L0);this.stripFbParams(_L2);var _L3=_L1&&PlatformCanvasController.storesIFrameHistory(this.isStatic);if(this.currentUri.toString()!=_L2.toString()){this.currentUri=_L2;this.refreshAd();PageTransitions.go(_L2.toString(),_L3);}};PlatformCanvasController.prototype.getAppPrefix=function(){return "/"+this.appName+"/";};PlatformCanvasController.prototype.convertFromApps=function(uri){var _L1=this.getAppPrefix();var _L2=uri.getUnqualifiedURI().toString().substring(_L1.length);return new URI(this.callback+_L2);};PlatformCanvasController.prototype.convertToApps=function(uri){var _L1=uri.toString().substring(this.callback.length);return new URI(this.getAppPrefix()+_L1);};PlatformCanvasController.prototype.stripFbParams=function(uri){var _L1=uri.getQueryData();var _L2={};for(key in _L1)if((!key.startsWith("fb_")||key.startsWith("fb_force_mode"))&&!key.startsWith("_fb")&&!key.startsWith("quickling_apps"))_L2[key]=_L1[key];uri.setQueryData(_L2);};PlatformCanvasController.prototype.refreshAd=function(){if(this.isFirstPage){this.isFirstPage=false;}else ads_refresh(this.appName,'/canvas.php');};PlatformCanvasController.prototype.handleChange=function(uri){if(!uri.getPath().startsWith("/"+this.appName)||this._movingPage)return false;var _L1=uri.getUnqualifiedURI();this.stripFbParams(_L1);if(this.currentUri.toString()!=_L1.toString()){FB.IFrameUtil.CanvasUtilServer.loadNewUrl(this.convertFromApps(uri).toString());this.currentUri=_L1;}PageTransitions.transitionComplete();return true;};PlatformCanvasController.prototype.goURI=function(uri){this._movingPage=true;var _L1=new URI(uri);_L1.addQueryData({_fb_q:true});PageTransitions.go(_L1);};PlatformCanvasController.storesIFrameHistory=function(_L0){if(ua.ie()){return true;}else if(ua.firefox()){if(_L0){return true;}else return false;}else if(ua.safari()){return false;}else return false;};var smartIframes=[];function smartSizingFrameAdded(){window.onresize=_resizeSmartFrames;smartIframes=[];var _L0=document.getElementsByTagName('iframe');for(var i=0;i<_L0.length;i++){var _L2=_L0[i];if(_L2.className=='smart_sizing_iframe'){smartIframes.push(_L2);_L2.style.width=_L2.parentNode.scrollWidth-2+"px";}}_resizeSmartFrames();}if(window.innerHeight){var windowHeight=function(){return window.innerHeight;};}else if(document.documentElement&&document.documentElement.clientHeight){var windowHeight=function(){return document.documentElement.clientHeight;};}else var windowHeight=function(){return DOMScroll.getScrollRoot().clientHeight;};function _resizeSmartFrames(){var _L0=windowHeight();for(var i=0;i<smartIframes.length;i++){var _L2=smartIframes[i];var _L3=_L0-elementY(_L2)-61;_L2.style.height=_L3/(smartIframes.length-i)+'px';}}
var details_shown=false;function toggle_stored_cc(obj){if(obj.checked==true){show('cvv2_div');hide_new_cc();}else{hide('cvv2_div');show_new_cc();}}function hide_cc_payment(){hide('card_payment');hide('cvv2_div');hide_new_cc();var _L0=ge('cc_id');if(_L0)_L0.checked=false;}function show_cc_payment(){show('card_payment');}function hide_new_cc(){hide('cc_input');hide('enter_new_card');}function show_new_cc(){show('cc_input');show('enter_new_card');if(details_shown)toggleStoredCreditCardDetails();}function toggleStoredCreditCardDetails(){var _L0=ge('toggle_stored_credit_card_details_link');if(!details_shown){show('stored_credit_card_details');_L0.innerHTML=_tx("esconder detalhes");details_shown=true;}else{hide('stored_credit_card_details');_L0.innerHTML=_tx("exibir detalhes");details_shown=false;}}function show_csc_info(_L0){var _L1=_tx("O C\u00f3digo de Seguran\u00e7a do Cart\u00e3o (CSC) \u00e9 uma medida de seguran\u00e7a de cart\u00f5es de d\u00e9bito e cr\u00e9dito que visa reduzir fraudes no uso dos cart\u00f5es. O gr\u00e1fico a seguir ilustra onde encontrar o c\u00f3digo CSC em seu cart\u00e3o de cr\u00e9dito.");var _L2='float: left;';var _L3='text-align: center; margin: 5px 0;';var _L4='';_L4+='<div style="'+_L2+'">';_L4+='<img src="/images/cvv2_types/amex_csc.gif" alt="" />';_L4+='<p style="'+_L3+'">'+_tx("American Express")+'</p>';_L4+='</div>';var _L5='';_L5+='<div style="margin-right: 8px;'+_L2+'">';_L5+='<img src="/images/cvv2_types/backofcard.gif" alt="" />';_L5+='<p style="'+_L3+'">'+_tx("Visa, Mastercard, JCB")+'</p>';_L5+='</div>';var _L6='';_L6+='<div class="clearfix">';_L6+='<p>'+_L1+'</p>';if(_L0==null){_L6+=_L5;_L6+=_L4;}else if(_L0==65){_L6+=_L4;}else _L6+=_L5;_L6+='</div>';new Dialog().setClassName('csc_type').setTitle(_tx("What's a CSC?")).setBody(_L6).setButtons([Dialog.OK]).show();}function show_csc_validation_info(){var _L0='';_L0+='<div class="clearfix">';_L0+='<div style="float: left">';_L0+='<p style="text-align: left; margin: 5px 0;">';_L0+=_tx("A fim de evitar fraudes de cart\u00e3o de cr\u00e9dito, come\u00e7amos a impor o uso da valida\u00e7\u00e3o de c\u00f3digo CSC em pagamentos com cart\u00e3o de cr\u00e9dito. Os cart\u00f5es de cr\u00e9dito j\u00e1 armazenados dever\u00e3o ser validados para CSC uma \u00fanica vez. Depois que seu cart\u00e3o for validado, voc\u00ea n\u00e3o ser\u00e1 mais solicitado a valid\u00e1-lo no futuro.");_L0+='</p>';_L0+='</div>';_L0+='</div>';new Dialog().setClassName('validation').setTitle(_tx("Por que raz\u00e3o o c\u00f3digo de seguran\u00e7a CSC \u00e9 requerido?")).setBody(_L0).setButtons([Dialog.OK]).show();}function get_selected_cc_type(_L0,_L1){if(_L1){cc_type=get_form_select_value(get_dialog_pro_elem(_L0));}else cc_type=get_form_select_value(ge(_L0));return cc_type;}function validate_csc(_L0,_L1){if(_L1){var _L2=get_dialog_pro_elem('cc_cvv2');}else var _L2=ge('cc_cvv2');var _L3=get_selected_cc_type(_L0,_L1);if(_L3==65){if(_L2.value.length!=4){_L2.style.border="1px solid red;";}else _L2.style.border="";}else if(_L2.value.length!=3){_L2.style.border="1px solid red;";}else _L2.style.border="";}function get_dialog_pro_elem(_L0){var _L1=document.getElementsByName(_L0);var i;var _L3=null;for(i=0;i<_L1.length;i++){var _L4=_L1[i];if(DOM.contains('pop_content',_L4))_L3=_L4;}return _L3;}

if (window.Bootloader) { Bootloader.done(["js\/8rixrqbu87oco808.pkg.js"]); }