/** 
 * jQuery ifixpng plugin Copyright (c) 2007 Kush M. 
 *  
 * Cookie plugin Copyright (c) 2006 Klaus Hartl (stilbuero.de) 
 * Both Plugins Dual licensed under the MIT and GPL licenses: 
 * http://www.opensource.org/licenses/mit-license.php 
 * http://www.gnu.org/licenses/gpl.html 
 *  
 */ 
jQuery.preloadImages=function(){for(var A=0;A<arguments.length;A++){jQuery("<img>").attr("src",arguments[A])}};(function(B){B.ifixpng=function(C){B.ifixpng.pixel=C};B.ifixpng.getPixel=function(){return B.ifixpng.pixel||"/images/pixel.gif"};var A={ltie7:B.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),filter:function(C){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+C+"')"}};B.fn.ifixpng=A.ltie7?function(){return this.each(function(){var C=B(this);var E=false;if(C.is("img")||C.is("input")){if(C.attr("src")){if(C.attr("src").match(/.*\.png([?].*)?$/i)){var D=(E&&C.attr("src").substring(0,1)!="/")?E+C.attr("src"):C.attr("src");C.css({filter:A.filter(D),width:C.width(),height:C.height()}).attr({src:B.ifixpng.getPixel()}).positionFix()}}}else{var F=C.css("backgroundImage");if(F.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)){F=RegExp.$1;C.css({backgroundImage:"none",filter:A.filter(F)}).children().positionFix()}}})}:function(){return this};B.fn.iunfixpng=A.ltie7?function(){return this.each(function(){var C=B(this);var D=C.css("filter");if(D.match(/src=["']?(.*\.png([?].*)?)["']?/i)){D=RegExp.$1;if(C.is("img")||C.is("input")){C.attr({src:D}).css({filter:""})}else{C.css({filter:"",background:"url("+D+")"})}}})}:function(){return this};B.fn.positionFix=function(){return this.each(function(){var D=B(this);var C=D.css("position");if(C!="absolute"&&C!="relative"){D.css({position:"relative"})}})}})(jQuery);jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+L.path:"";var G=L.domain?"; domain="+L.domain:"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};(function(D){var C=[];var B=false;var A=20;D.elReady=function(F,E){C.push({selector:F,func:E})};D.elReady.run=function(){var H=C.length;var E=false;for(var G=0;G<H;++G){if(typeof C[G].selector!="undefined"&&typeof C[G].func!="undefined"){var F=D(C[G].selector);if(F.length>0){C[G].func.apply(F);E=true}}else{E=true}if(E||B){C=C.slice(0,G).concat(C.slice(G+1));G=G-1;H=H-1}E=false}if(C.length>0||!B){window.setTimeout(D.elReady.run,A)}};D.elReady.init=function(){D(document).ready(function(){B=true});window.setTimeout(D.elReady.run,A)};D.elReady.init()})(jQuery);var searchLabel;var c1host="www.capitalone.com";var c1proto=window.location.protocol;if(window.location.hostname.search(/(?:qa|dev|local).*?\.capitalone\.com/)){c1host=window.location.hostname}var c1server=c1proto+"//"+c1host;var c1ZipCode={tbHeight:126,tbWidth:425,hover:false,direct:false,noPromptCookie:"nozip",goToUrl:"",regionalUrls:["/bank/(?!commercial|banking|services/online|index\\.php).*?","/banking/personal.*?","/checking-accounts.*?","/savings-accounts.*?","/certificates-deposit.*?","/personalloans.*?","/smallbusiness.*?","/contactus/index\\.php","/sitemap/index\\.php","/login\\.php","/redirect.php.*?capitalonehomeloans\\.com.*?"],askForZip:function(A){if(this.validZip()||window.c1zip==1){return true}this.goToUrl=A;var B="#TB_inline";var C="zipContent";tb_show(null,B+"?height="+this.tbHeight+"&width="+this.tbWidth+"&inlineId="+C+"&modal=true",false);jQuery("#zip_form input.zipCodeInput").focus();document.onkeyup=function(D){if(D==null){keycode=event.keyCode}else{keycode=D.which}if(keycode==27){c1ZipCode.rejectZip()}};return false},rejectZip:function(){jQuery.cookie(this.noPromptCookie,"true",{path:"/",domain:".capitalone.com"});tb_remove();window.location.assign(this.goToUrl);return false},submitZip:function(C){var A=window.c1zip;var B=null;window.c1zip=jQuery("#"+C+" input.zipCodeInput").val();if(!this.validZip()){if(C=="zip_form"){jQuery("span.tb_message").text("Please enter a valid five-digit ZIP Code.").css("fontWeight","bold").css("color","#f2cf6f")}else{jQuery("#ddMessage").text("ZIP Code must be five digits").css("fontWeight","bold").css("fontSize","10px").css("color","red")}window.c1zip=A;return false}else{if(window.location.hostname.search(/(?:qa|dev|local|www|((kdc|pdc)staging)).*?\.capitalone\.com/)==-1){B=document.createElement("input");jQuery(B).attr("type","hidden").attr("name","exthost").attr("value",escape(window.location.href));jQuery("#"+C).append(B)}else{if(c1ZipCode.goToUrl==""){c1ZipCode.goToUrl=window.location.href}B=document.createElement("input");jQuery(B).attr("type","hidden").attr("name","dest").attr("value",escape(c1ZipCode.goToUrl));jQuery("#"+C).append(B);if(c1ZipCode.direct){inputDirect=document.createElement("input");jQuery(inputDirect).attr("type","hidden").attr("name","direct").attr("value","yes");jQuery("#"+C).append(inputDirect)}if(C=="change_zip"){jQuery.cookie("setzipcode","yes",{path:"/",domain:".capitalone.com"})}if(typeof tb_remove=="function"){tb_remove()}}}return true},validateLink:function(C){var E=new RegExp("((https?|ftp)://([^/]+))?(/[^?]*)?(\\?.*)?");var I=new RegExp("(?:"+c1ZipCode.regionalUrls.join("|")+")");var F=jQuery(C).attr("href");var B=E.exec(F);var H=jQuery(C).attr("rel");if(typeof H!="undefined"){if(H=="direct"){c1ZipCode.direct=true}else{if(H=="zipcode"){c1ZipCode.askForZip(F);return false}}}var A="";if(B.length>=5&&typeof B[4]=="string"){A=B[4]}if(B.length>=6&&typeof B[5]=="string"&&B[5].indexOf("capitalonehomeloans")!=-1){A+=B[5]}if(A.substr(A.length-1)=="/"){A+="index.php"}if(typeof A!="undefined"&&!(A.indexOf("open")!=-1&&A.indexOf("account")!=-1)&&A.indexOf("apply")==-1&&A.match(I)){if(A=="/"||A=="/indexa.php"||A=="/index.php"||A=="/bank/"||A=="/bank/index.php"){return }var G=window.location.pathname.substr(0,window.location.pathname.lastIndexOf("/"));var D=A.substr(0,A.lastIndexOf("/"));if(A.indexOf("banking.php")!=-1||G==""||G=="/contactus"||G=="/sitemap"||G!=D){c1ZipCode.askForZip(F);return false}}},validRegion:function(){if(typeof window.validRegion=="undefined"){return false}if(window.validRegion!==true){return false}return true},validZip:function(){if(typeof window.c1zip=="undefined"){return false}if(window.c1zip.constructor!=String){return false}if(/\d{5}/.test(window.c1zip)==false){return false}var A=parseInt(window.c1zip,10);if(A<500||A>99999){return false}return true}};jQuery.elReady("span.lobLogo img",function(){jQuery.ifixpng(c1proto+"//www.capitalone.com/images/https-common/spacer.gif");this.ifixpng()});jQuery.elReady(".globalNav dl.findProducts",function(){this.hover(function(){jQuery(this).addClass("findProductsOver")},function(){jQuery(this).removeClass("findProductsOver")})});jQuery.elReady(".globalNav dl.accessYourAccount",function(){this.hover(function(){jQuery(this).addClass("accessYourAccountOver")},function(){jQuery(this).removeClass("accessYourAccountOver")})});jQuery.elReady(".globalNav dl.customerService",function(){this.hover(function(){jQuery(this).addClass("customerServiceOver")},function(){jQuery(this).removeClass("customerServiceOver")})});jQuery.elReady(".globalNav dl.zipCode",function(){this.hover(function(){jQuery(this).addClass("zipCodeOver")},function(){jQuery(this).removeClass("zipCodeOver")})});jQuery.elReady("dl.zipCode dd",function(){this.mouseover(function(){c1ZipCode.hover=true});this.mouseout(function(){c1ZipCode.hover=false})});jQuery.elReady(".search_field",function(){var A=jQuery("#header #search label").remove().text();this.val(A);this.mouseover(function(){jQuery(".globalNav dl.customerService").removeClass("customerServiceOver");jQuery(".globalNav dl.zipCodeOver").removeClass("zipCodeOver")});this.focus(function(){jQuery(this).addClass("js-focus");if(this.value==A){jQuery(this).val("")}});this.blur(function(){jQuery(this).removeClass("js-focus");if(this.value==""){jQuery(this).val(A)}});jQuery("#c1-search-form").submit(function(){if(jQuery(".search_field").val()==A){jQuery(".search_field").val("")}if(typeof cg2!="undefined"){$(this).append('<input type="hidden" name="cg2" value="'+unescape(cg2)+'" />')}$(this).append('<input type="hidden" name="refer" value="'+encodeURI(location.href)+'" />')})});jQuery.elReady(".search_btn",function(){this.hover(function(){jQuery(this).addClass("js-hover")},function(){jQuery(this).removeClass("js-hover")})});jQuery.elReady("html",function(){this.click(function(){if(!c1ZipCode.hover){jQuery(".globalNav dl.zipCode").removeClass("zipCodeOver")}})});jQuery.elReady("#zipCode",function(){this.focus(function(){jQuery(this).addClass("js-focus");jQuery(".globalNav dl.zipCode").unbind();jQuery(".search_field").mouseover(function(){jQuery(".globalNav dl.customerService").removeClass("customerServiceOver")})});this.blur(function(){jQuery(this).removeClass("js-focus");jQuery(".globalNav dl.zipCode").hover(function(){jQuery(this).addClass("zipCodeOver")},function(){jQuery(this).removeClass("zipCodeOver")});jQuery(".search_field").mouseover(function(){jQuery(".globalNav dl.customerService").removeClass("customerServiceOver");jQuery(".globalNav dl.zipCodeOver").removeClass("zipCodeOver")})})});jQuery(document).ready(function(){if(!c1ZipCode.validZip()&&!c1ZipCode.validRegion()&&window.location.hostname.indexOf("capitalone.com")!=-1&&(document.cookie.indexOf(c1ZipCode.noPromptCookie)==-1||jQuery.cookie(c1ZipCode.noPromptCookie)!="true")&&typeof tb_show=="function"&&window.c1zip!==1){jQuery("a").click(function(){return c1ZipCode.validateLink(this)})}jQuery(".close").click(function(){c1ZipCode.rejectZip()});jQuery.preloadImages(c1server+"/images/presentation/header/zip_code_bg.png")});try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}; 

