var $azc;(function(A){A.azc={};$azc=A.azc;$azc.fasttabs=function(C,E){var D=$azc.debug;if(typeof $azc.fasttabs.opts=="undefined"){$azc.fasttabs.opts={};$azc.fasttabs.tries={}}if(!E.wait_selector){E.wait_selector=C}if(typeof $azc.fasttabs.tries[C]=="undefined"){$azc.fasttabs.tries[C]=0;D("starting up fasttabs for "+C)}$azc.fasttabs.opts[C]=jQuery.extend($azc.fasttabs.opts[C],E,{fxSpeed:"fast"});$azc.afterItExists($azc.fasttabs.opts[C].wait_selector,30,function(){jQuery(C).tabs($azc.fasttabs.opts[C])})};$azc.htmlentities=function(C){var E=document.createElement("div");var D=document.createTextNode(C);E.appendChild(D);return E.innerHTML};$azc.debug=function(C){if((window.location.hostname=="devwww.azcentral.com"||window.location.hostname=="dev.www.azcentral.com")&&typeof console!="undefined"&&typeof console.log!="undefined"){console.log("azc.debug: "+C)}};$azc.afterItExists=function(C,H,F){var D=$azc.debug;if(typeof $azc.afterItExists.queue=="undefined"){$azc.afterItExists.queue={};$azc.afterItExists.tries={}}if(typeof H=="undefined"){H=60}if(typeof $azc.afterItExists.tries[C]=="undefined"){$azc.afterItExists.tries[C]=0}if(typeof F!="undefined"){$azc.afterItExists.queue[C]=F;D("starting up afterItExists for "+C)}var E=jQuery(C);if(E.length>0){$azc.debug("executing afterItExists for "+C);F=$azc.afterItExists.queue[C];try{F()}catch(G){$azc.debug("error executing afterItExists function for selector: "+C)}$azc.afterItExists.tries[C]=0;$azc.afterItExists.queue[C]=false}else{if($azc.afterItExists.tries[C]++<(H*2)){setTimeout("$azc.afterItExists('"+C+"', "+H+")",500)}else{$azc.afterItExists.tries[C]=0;$azc.afterItExists.queue[C]=false}}};$azc._olr_cbs=new Array();$azc.onLoginReady=function(D){if($azc.login_ready){D()}else{var C=D;$azc._olr_cbs.push(C)}};$azc.logged_in=false;$azc.login_ready=false;$azc.afterItExists("#loginBox",20,function(){jQuery.getJSON("/members/azc3.php",function(E){if(E&&E.userinfo){var D=E.userinfo;$azc.userinfo=D;var F=jQuery("#azcUsername");if(D.azcusername==""){F.html('Welcome, guest<br /><a href="/members/Register">register</a> | <a href="javascript:void(0);" onclick="jQuery(\'#azcLoginBox\').show(); return false;">log in</a>')}else{F.html('<a href="/members/User/'+D.azcusername+'">Welcome, '+D.azcusername+'</a><br /><a href="/members/User/'+D.azcusername+'">view profile</a> | <a href="/members/EditSettings">edit profile</a> | <a href="http://s.azcentral.com/home/Authenticate_/Logout">log out</a>');if(D.azcusermediapicture!=""){jQuery("#azcUserImage").html('<img src="http://s.azcentral.com/home/File-/picture/'+D.azcusermediapicture+'/1/0/20/20/" width="20" height="20" alt="" id="avatar" />')}$azc.logged_in=true}if(D.azcmessage!=""){jQuery("#azcLoginBox").css({width:"250px"}).show();jQuery("#azcLoginBoxInner").css({padding:"5px 10px 5px 10px"});if(D.azcusername==""){jQuery("#azcLoginBoxInner").prepend('<span style="font-weight: bold; font-size: 16px;">'+D.azcmessage+"</span><hr />")}else{jQuery("#azcLoginBox").css({position:"relative",top:"-27px",left:"-58px",width:"300px"});jQuery("#azcLoginBoxInner").html('<div style="float: right;"><a onclick="showBox(\'azcLoginBox\',\'none\'); return false;" href="#"><img src="/imgs/closeX.gif"/></a></div><span style="font-weight: bold; font-size: 16px;">'+D.azcmessage+"</span>")}}if(D.azcuseremail!=""){jQuery("#newsletteremail").val(D.azcuseremail)}}else{jQuery("#azcUsername").html("")}$azc.login_ready=true;var C;while(C=$azc._olr_cbs.shift()){C()}})});$azc.embedHere=function(G,F){var E=G+$azc.rand();var C="div#embed_"+E;document.write('<div id="embed_'+E+'"></div>');F=jQuery.extend({},{id:G},F);var D="";jQuery.each(F,function(I,H){if(D!=""){D+="&"}D+=encodeURIComponent(I)+"="+encodeURIComponent(H)});jQuery.get("/members/embed/",D,function(H){jQuery(C).html(H)})};function B(){if(!$azc.login_ready){return false}try{if(!$azc.userinfo){$azc.userinfo={persist:{}}}if(!$azc.userinfo.persist){$azc.userinfo.persist={}}}catch(C){return false}return true}$azc.persist_get=function(C){if(!B()){return false}if($azc.userinfo.persist[C]){return $azc.userinfo.persist[C]}else{return false}};$azc.persist_set=function(C,E,F){if(!B()){return false}var D="0";if(typeof F!="function"){F=function(){};D="1"}$azc.userinfo.persist[C]=E;A.getJSON("/members/embed/",{id:"persist-set",key:C,val:E,PHPSESSID:A.cookie("PHPSESSID"),silencio:D},F);return true};$azc.rand=function(){return Math.round(Math.random()*10000000).toString()};$azc.print=function(){if(typeof(s)!="undefined"&&typeof(s.t)!="undefined"){s.pageName=window.location.toString().replace(/azcentral.com/,"azcentral.com/printed").replace(/#comments/,"");void (s.t())}if(typeof(FDCPUrl)!="undefined"){FDCPUrl()}else{window.print()}};$azc.afterItExists("#bigcarousel, #styleWideCarousel, #azcDexCarousel",20,function(){(function(F){var D=false;function C(K){if(typeof $azc.carousel_opts.formatter=="function"){return $azc.carousel_opts.formatter(K)}var I=$azc.htmlentities;var J="";J+='<a href="'+K.url+'" title="'+I(K.headline)+'">';J+='<img src="'+K.imageurl+'" alt="'+I(K.headline)+'"';if($azc.carousel_opts.imgclass!=""){J+=' class="'+$azc.carousel_opts.imgclass+'"'}J+=' border="0" />';J+="</a>";J+='<span class="h4hed">';J+='<a href="'+K.url+'" title="'+I(K.headline)+'">';J+=K.headline;J+="</a>";J+="</span>";J+='<span class="sidebar">';J+=K["abstract"];J+="</span>";return J}function H(){if(F("#bigcarousel_loading:visible").length>0){F("#azc_carousel_socket").slideUp("normal",function(){F("#azc_carousel_socket, .big-wide-carousel, .notso-wide-carousel").remove()})}}if(F("#bigcarousel, #styleWideCarousel, #azcDexCarousel").length>0){var E=window.location.toString();E=E.substr(E.indexOf("/",8)).replace(/\//g,"--");var G="";if($azc.carousel_opts.dimensions!=""){G="/"+encodeURIComponent($azc.carousel_opts.dimensions)}F.getJSON("/embed/carousel-json/"+encodeURIComponent(E)+G,function(K){try{if(K&&K.pics&&K.pics.length>0){D=K.pics;var M=new Array();for(var J=0;J<D.length;J++){M[J]=new Image();M[J].src=D[J]["imageurl"]}var I=3;if(F(".big-wide-carousel").length>0){I=4}F(".carousel-links").fadeIn(1000);F("#bigcarousel_loading").fadeOut(1000,function(){F("#bigcarousel_loading").remove()});F("#bigcarousel").hide().jcarousel({scroll:I,wrap:"circular",easing:"easeOutCubic",animation:750,itemLastInCallback:{onAfterAnimation:function(R,P,O,Q,N){if(O%I>0){F("li.jcarousel-item:first").each(function(){if(F(this).html()==""){F(this).remove()}})}}},itemVisibleInCallback:{onBeforeAnimation:function(S,Q,P,R,O){var N=S.index(P,D.length);S.add(P,C(D[N-1]))}},itemVisibleOutCallback:{onAfterAnimation:function(S,P,O,Q,N){if(Q=="next"){var R=S.get(O);if(!R.length||(O>=S.first&&O<=S.last)){return}var T=S.dimension(R);if(O<S.first){S.list.clone().addClass("bigcarousel-doublebuffer").insertBefore(S.list);S.list.css({left:F.jcarousel.intval(S.list.css(S.lt))+T+"px",width:F.jcarousel.intval(S.list.css(S.wh))-T+"px"});R.remove();setTimeout(function(){F(".bigcarousel-doublebuffer").remove()},0)}else{S.list.css({width:F.jcarousel.intval(S.list.css(S.wh))-T+"px"});R.remove()}}else{S.remove(O)}}}}).show()}else{throw"EmptyJSON"}}catch(L){H()}})}setTimeout(H,10000)})(jQuery)});$azc.carousel_opts={dimensions:""};$azc.set_carousel_opts=function(D){for(var C in D){$azc.carousel_opts[C]=D[C]}};$azc.login_required=function(E,C){try{A("div#azcLoginBoxInner span, div#azcLoginBoxInner hr").remove();A("div#azcLoginBoxInner").prepend('<span style="font-weight: bold; font-size: 16px;">'+E+"</span><hr />");if(C&&C.alturl){A('$azcLoginBox a[href="/members/Register"]').attr("href",C.alturl)}A("div#azcLoginBox").show();if(C&&C.scrollTo){try{setTimeout(function(){A.scrollTo("div#azcLoginBox",250,{offset:-35})},150)}catch(D){window.scrollTo(0,A("div#azcLoginBox").top()-35)}}}catch(D){alert(E)}};A(document).ready(function(){A(document).bind("resize scroll mousemove keydown",function(){if($azc.inactivity>0){$azc.inactivity=0}});setInterval(function(){$azc.inactivity+=3},3000)})})(jQuery);//jQuery(function(){jQuery('div#azcWrap div#slidingBillboard img[alt="AdTech Ad"]').each(function(){if(jQuery(this).attr("width")==jQuery(this).attr("height")==1){jQuery("div#slidingBillboard").hide()}})});
