// Adds values to forms that disappear when user inputs and when form is submitted
jQuery.fn.DefaultValue = function(text){
    return this.each(function(){
		//Make sure we're dealing with text-based form fields
		if(this.type != 'text' && this.type != 'password' && this.type != 'textarea')
			return;
		
		//Store field reference
		var fld_current=this;
		
		//Set value initially if none are specified
        if(this.value=='') {
			this.value=text;
		} 
		
		//Remove values on focus
		jQuery(this).focus(function() {
			if(this.value==text || this.value=='')
				this.value='';
		});
		
		//Place values back on blur
		jQuery(this).blur(function() {
			if(this.value==text || this.value=='')
				this.value=text;
		});
		
		//Capture parent form submission
		//Remove field values that are still default
		jQuery(this).parents("form").each(function() {
			//Bind parent form submit
			jQuery(this).submit(function() {
				if(fld_current.value==text) {
					fld_current.value='';
				}
			});
		});
    });
};

jQuery(document).ready(function($) {
			//Assign default value to form field #1
			$("#tab-events #events-swhat").DefaultValue("What are you looking for?");
			$("#tab-events #events-swhere").DefaultValue("Where is it?");
			$("#tab-events #events-swhen").DefaultValue("When is it?");
			$("#tab-venues #venues-swhat").DefaultValue("What are you looking for?");
			$("#tab-venues #venues-swhere").DefaultValue("Where is it?");
			$("#tab-movies #movies-swhat").DefaultValue("What are you looking for?");
			$("#tab-movies #movies-swhere").DefaultValue("Where is it?");
			$("#tab-movies #movies-swhen").DefaultValue("When is it?");
			$("#tab-restaurants #restaurants-swhat").DefaultValue("What are you looking for?");
			$("#tab-restaurants #restaurants-swhere").DefaultValue("Where is it?");
			$("#tab-performers #performers-swhat").DefaultValue("Who are you looking for?");
		});


// Sets default tab for access search in header
jQuery(function($){
  // Story subscribe callout
  $('body#aastory #ajc-slider').before('<div class="story-callout"><a href="https://www.formrouter.net/circulation@ajc/subscribe.aspx?page_id=deliver"><strong>Unplug & Relax</strong>. Subscribe and get two months home delivery for the price of one&nbsp;&raquo;</a></div>');
   

		// Tabs
		if ($('body').attr('id') == "movies") {
			$('#access-tab-search').tabs({ selected: 2 });
		  }
		else if ($('body').attr('id') == "restaurants") {
			
		$('#access-tab-search').tabs({ selected: 3 });

		}
		else {
		
		$('#access-tab-search').tabs({ selected: 0 });

		}
		
	});



var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();

jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

function PadDigits(n, totalDigits) 
  { 
      n = n.toString(); 
      var pd = ''; 
      if (totalDigits > n.length) 
      { 
          for (i=0; i < (totalDigits-n.length); i++) 
          { 
              pd += '0'; 
          } 
      } 
      return pd + n.toString(); 
  }

jQuery(document).ready(function($){

jQuery('.ajc-story #ajc-slider').before('<div class="story-callout"><a href="https://www.formrouter.net/circulation@ajc/subscribe.aspx?page_id=deliver"><strong>Unplug & Relax</strong>. Subscribe and get two months home delivery for the price of one&nbsp;&raquo;</a></div>');

	// Get date objects for today and yesterday
	today = new Date();
	hour = today.getHours();	
	var yesterday=new Date();
	yesterday.setDate(yesterday.getDate()-1);
	
	// Letters to the editor should be published by 5am
	// Show previous day's letters if not yet 5am
	if (hour > 5)
	{
		year = today.getFullYear();
		month = PadDigits(today.getMonth() + 1, 2);
		date = PadDigits(today.getDate(), 2);
	}
	else
	{
		year = yesterday.getFullYear();
		month = PadDigits(yesterday.getMonth() + 1, 2);
		date = PadDigits(yesterday.getDate(), 2);

	}
	
	// Add link to opinion section under news dropdown
	jQuery('.ajc-container ul.nav div.opinion ul').prepend('<li><a href="http://www.ajc.com/opinion/content/printedition/' + year + '/' + month + '/' + date + '/lettsed' + month + date + '.html">Letters to the Editor</a>');

	jQuery.preloadImages("http://media.ajc.com/ajc/images/nav-on-bg.gif", "http://media.ajc.com/ajc/images/nav-pane.png", "http://media.ajc.com/ajc/images/nav-pane-small.png", "http://media.ajc.com/ajc/images/nav-pane-ie.gif");

	jQuery('ul li:last-child').addClass('last');
	
    jQuery(".homepage-focal a, #cmslite-focal a").each(function() {

		// if the link is a gallery coming from the homepage focal area, add #homepage_tab_newstab to url
		if (jQuery(this).attr('href').indexOf('gallery/view/') != -1)
		{
			jQuery(this).attr('href', jQuery(this).attr('href') + '#homepage_tab_newstab');
		}

		// for all other links, add query string cxntlid=homepage_tab_newstab to url
		else
		{
			if (jQuery(this).attr('href').indexOf('?') != -1){
				// if there's already a query string, append to it
				jQuery(this).attr('href', jQuery(this).attr('href') + '&cxntlid=homepage_tab_newstab');
			}
			else {
				// add query string if there's not one
				jQuery(this).attr('href', jQuery(this).attr('href') + '?cxntlid=homepage_tab_newstab');
			}
		}
    });

	if (jQuery('#ajc-most-popular-tabs li').length > 1)
	{

		if (jQuery('body').attr('class') == "ajcvendor")
		{
			jQuery('#ajc-most-popular-tabs > ul').tabs({selected: 1});
		}
		else if (jQuery)
		{
			jQuery('#ajc-most-popular-tabs > ul').tabs();	
		}
	
	}
	
	jQuery('#ajc-verticals-search > ul').tabs({ selected: 3 });

	jQuery('li.search-ajc').bind('click', function() {
		jQuery('.ajc-header .ajc-search form').attr('action','http://projects.ajc.com/search/');
		jQuery('.ajc-header .ajc-search form').attr('method','get');
		jQuery('.ajc-header .ajc-search input.query').attr('name','term');
	});

	jQuery('li.search-archives').bind('click', function() {
		jQuery('.ajc-header .ajc-search form').attr('action','http://www.newslibrary.com/nlsearch.asp?REGION=at&s_hidethis=no&search_mode=basic&sort=d:h');
		jQuery('.ajc-header .ajc-search form').attr('method','post');
		jQuery('.ajc-header .ajc-search input.query').attr('name','search_text');
	});

	jQuery('li.search-kudzu').bind('click', function() {
		jQuery('.ajc-header .ajc-search form').attr('action','http://www.kudzu.com/controller.jsp?N=0&currentLocation=Atlanta%2C%20GA%2030303&searchType=keyword&Ns=P_PremiumPlacement');
		jQuery('.ajc-header .ajc-search form').attr('method','post');
		jQuery('.ajc-header .ajc-search input.query').attr('name','searchVal');
	});

	
	var hostName = window.location.host;
	if (window.location.port != ""){ var hostName = "http://"+hostName+"/ajc"; }
	else { hostName = ""; }
	
	jQuery('li.search-web').bind('click', function() {
    jQuery('.ajc-container .ajc-header .ajc-search form').attr('action','http://www.ajc.com/search/search/searchclass/SearchDelegator?from=CIAA&state=GA&city=Atlanta&searchby=ys');
		jQuery('#cxContainer .ajc-header .ajc-search form').attr('action',hostName+'/yahoo-search/?searchType=web&searchType=unified_search&firstResult=0&numResults=10&Submit.x=0&Submit.y=0&Submit=Submit');
		jQuery('.ajc-header .ajc-search form').attr('method','post');
		jQuery('.ajc-container .ajc-header .ajc-search input.query').attr('name','QueryText');
		jQuery('#cxContainer .ajc-header .ajc-search input.query').attr('name','searchString');
	});
	
	jQuery('ul.nav').hoverIntent({
		sensitivity: 5,
		over: function() {
			jQuery('#ad-hp01, #breaking_news_banner, div.newsbuzz').css('z-index','-1');

			// Hide select box of channel promo tool for IE6
			if (jQuery.browser.msie && jQuery.browser.version < 7)
			{
				jQuery('div.channel_promos select, div.most-popular-panel select').css('visibility','hidden');
			}
		},
		timeout: 500,
		out: function() {
			jQuery('#ad-hp01, #breaking_news_banner, div.newsbuzz').css('z-index','2');

			if (jQuery.browser.msie && jQuery.browser.version < 7)
			{
				jQuery('div.channel_promos select, div.most-popular-panel select').css('visibility','visible');				
			}
		}
	});

	var nav_hover_config = {    
	     sensitivity: 5,
	     over: function () {
			jQuery('.nav-pane').hide();
			jQuery('ul.nav li a').removeClass('on');
			jQuery('.nav-pane',this).show();
			jQuery(this).children("a:first").addClass('on');
		},
	     timeout: 500,
	     out: function () {  
			jQuery(this).children("a:first").removeClass("on")
			jQuery(this).children("div.nav-pane").hide();
		}
	};

	jQuery('.nav > li').hoverIntent(nav_hover_config);  
	
	var search_hover_config = {    
	     sensitivity: 3,
	     over: function () {
			jQuery('div.search-select').show();
			jQuery('div.newsbuzz').css('z-index','-1');
		},
	     timeout: 500,
	     out: function () {  
			jQuery('div.search-select').hide();
			jQuery('div.newsbuzz').css('z-index','2');
		}
	};
	
	jQuery('div.ajc-header div.ajc-search').hoverIntent(search_hover_config);
	
	jQuery("div.ajc-header div.ajc-search input[name='search-type']").bind('click', function() {
		jQuery('div.ajc-header div.ajc-search input.query').focus();
	});

	jQuery('div.ajc-sitemap textarea').focus(function() {
		jQuery(this).css('height','200px');
		jQuery('p.types').slideDown('fast');
	});

	jQuery('div.ajc-sitemap p.types a').bind('click', function() {
		jQuery('p.types a').removeClass('selected');
		jQuery(this).addClass('selected');
	});

	swapValues = [];
		jQuery(".swap_value").each(function(i){
		    swapValues[i] = jQuery(this).val();
		    jQuery(this).focus(function(){
		        if (jQuery(this).val() == swapValues[i]) {
		            jQuery(this).val("");
		        }
		    }).blur(function(){
		        if (jQuery.trim(jQuery(this).val()) == "") {
		            jQuery(this).val(swapValues[i]);
		        }
		    });
		});

	jQuery("select.navigation").change(function()
	{
		if(jQuery(this).attr('value'))
		{
			window.location=jQuery(this).attr('value');
		}
	});

  // Feedback form
  $('.site-map-feedback p.types a').click(function() {
    $('.site-map-feedback form').attr('action', 'http://projects.ajc.com/feedbackwidget/' + $(this).attr('id') + '/')
  });
  $('.site-map-feedback form').submit(function() {
    if ($('.site-map-feedback textarea').attr('defaultValue') != $('.site-map-feedback textarea').val()
    && $('.site-map-feedback input.email').attr('defaultValue') != $('.site-map-feedback input.email').val())
    {
      return true;
    }
    alert('Please enter your e-mail address and comment before submitting the form.')
    return false;
  });

 });

function insert_kudzu_heds(headlines) {
    var notdefined;
    if(headlines == notdefined) {
        return false;
    }
    try {
       area = document.getElementById("kudzu_headlines");
       content = "<ul>\n";
       for(url in headlines) {
            headline = headlines[url];
            content = content + '<li><a href="' + url + '">' + headline + '</a></li>\n';            
       }
       content = content + "</ul>";
       area.innerHTML = content;
    }
    catch(e) {
        //pass
        return false;
    }
}


(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);

jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",easeInOutExpo:function(B,C,A,E,D){if(C==0){return A}if(C==D){return A+E}if((C/=D/2)<1){return E/2*Math.pow(2,10*(C-1))+A}return E/2*(-Math.pow(2,-10*--C)+2)+A}});(function(C){var A=C.scrollTo=function(F,E,D){A.window().scrollTo(F,E,D)};A.defaults={axis:"y",duration:1};A.window=function(){return C(C.browser.safari?"body":"html")};C.fn.scrollTo=function(F,E,D){if(typeof E=="object"){D=E;E=0}D=C.extend({},A.defaults,D);E=E||D.speed||D.duration;D.queue=D.queue&&D.axis.length>1;if(D.queue){E/=2}D.offset=B(D.offset);D.over=B(D.over);return this.each(function(){var M=this,K=C(M),L=F,J,H={},N=K.is("html,body");switch(typeof L){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(L)){L=B(L);break}L=C(L,this);case"object":if(L.is||L.style){J=(L=C(L)).offset()}}C.each(D.axis.split(""),function(R,S){var T=S=="x"?"Left":"Top",V=T.toLowerCase(),Q="scroll"+T,O=M[Q],P=S=="x"?"Width":"Height",U=P.toLowerCase();if(J){H[Q]=J[V]+(N?0:O-K.offset()[V]);if(D.margin){H[Q]-=parseInt(L.css("margin"+T))||0;H[Q]-=parseInt(L.css("border"+T+"Width"))||0}H[Q]+=D.offset[V]||0;if(D.over[V]){H[Q]+=L[U]()*D.over[V]}}else{H[Q]=L[V]}if(/^\d+$/.test(H[Q])){H[Q]=H[Q]<=0?0:Math.min(H[Q],G(P))}if(!R&&D.queue){if(O!=H[Q]){I(D.onAfterFirst)}delete H[Q]}});I(D.onAfter);function I(O){K.animate(H,E,D.easing,O&&function(){O.call(this,F)})}function G(O){var P=N?C.browser.opera?document.body:document.documentElement:M;return P["scroll"+O]-P["client"+O]}})};function B(D){return typeof D=="object"?D:{top:D,left:D}}})(jQuery);(function(A){var B=A.serialScroll=function(C){A.scrollTo.window().serialScroll(C)};B.defaults={duration:1000,axis:"x",event:"click",start:0,step:1,lock:true,cycle:true,constant:true};A.fn.serialScroll=function(D){D=A.extend({},B.defaults,D);var F=D.event,E=D.step,C=D.lazy;return this.each(function(){var J=D.target?this:document,H=A(D.target||this,J),L=H[0],R=D.items,N=D.start,S=D.interval,G=D.navigation,I;if(!C){R=K()}if(D.force){T({},N)}A(D.prev||[],J).bind(F,-E,M);A(D.next||[],J).bind(F,E,M);if(!L.ssbound){H.bind("prev.serialScroll",-E,M).bind("next.serialScroll",E,M).bind("goto.serialScroll",T)}if(S){H.bind("start.serialScroll",function(U){if(!S){O();S=true;P()}}).bind("stop.serialScroll",function(){O();S=false})}H.bind("notify.serialScroll",function(W,V){var U=Q(V);if(U>-1){N=U}});L.ssbound=true;if(D.jump){(C?H:K()).bind(F,function(U){T(U,Q(U.target))})}if(G){G=A(G,J).bind(F,function(U){U.data=Math.round(K().length/G.length)*G.index(this);T(U,this)})}function M(U){U.data+=N;T(U,this)}function T(a,Y){if(!isNaN(Y)){a.data=Y;Y=L}var b=a.data,U,c=a.type,Z=D.exclude?K().slice(0,-D.exclude):K(),X=Z.length,V=Z[b],W=D.duration;if(c){a.preventDefault()}if(S){O();I=setTimeout(P,D.interval)}if(!V){U=b<0?0:X-1;if(N!=U){b=U}else{if(!D.cycle){return }else{b=X-U-1}}V=Z[b]}if(!V||c&&N==b||D.lock&&H.is(":animated")||c&&D.onBefore&&D.onBefore.call(Y,a,V,H,K(),b)===false){return }if(D.stop){H.queue("fx",[]).stop()}if(D.constant){W=Math.abs(W/E*(N-b))}H.scrollTo(V,W,D).trigger("notify.serialScroll",[b])}function P(){H.trigger("next.serialScroll")}function O(){clearTimeout(I)}function K(){return A(R,L)}function Q(V){if(!isNaN(V)){return V}var W=K(),U;while((U=W.index(V))==-1&&V!=L){V=V.parentNode}return U}})}})(jQuery);jQuery(document).ready(function(){if(jQuery("#ajc-slider").length>0){jQuery(".ajcstory #ajc-slider a, #aastory #ajc-slider a").each(function(){if(jQuery(this).attr("href").indexOf("gallery/view/")!=-1){jQuery(this).attr("href",jQuery(this).attr("href")+"#sldr")}else{if(jQuery(this).attr("href").indexOf("?")!=-1){jQuery(this).attr("href",jQuery(this).attr("href")+"&cxntlid=sldr")}else{jQuery(this).attr("href",jQuery(this).attr("href")+"?cxntlid=sldr")}}});jQuery("#ajchome #ajc-slider a").each(function(){if(jQuery(this).attr("href").indexOf("gallery/view/")!=-1){jQuery(this).attr("href",jQuery(this).attr("href")+"#sldr_hm")}else{if(jQuery(this).attr("href").indexOf("?")!=-1){jQuery(this).attr("href",jQuery(this).attr("href")+"&cxntlid=sldr_hm")}else{jQuery(this).attr("href",jQuery(this).attr("href")+"?cxntlid=sldr_hm")}}});jQuery("div.panel").hover(function(){jQuery(this).addClass("on")},function(){jQuery(this).removeClass("on")});jQuery("#ajc-slider .left").css("opacity","0.2");var C=jQuery("#ajc-slider .scrollContainer > div");var E=jQuery("#ajc-slider .scrollContainer");E.css("width",C[0].offsetWidth*C.length);var B=jQuery("#ajc-slider .scroll").css("overflow","hidden");B.before('<img class="scrollButtons left" src="http://media.ajc.com.coxnewsweb.com/access/images/holiday-guide/prev.gif" style="opacity:0.3;filter: alpha(opacity = 30);"/>').after('<img class="scrollButtons right" src="http://media.ajc.com.coxnewsweb.com/access/images/holiday-guide/next.gif" />');function A(I,H,G,F,J){if((J+1)==1){jQuery("#ajc-slider .left").css("opacity","0.3")}else{jQuery("#ajc-slider .left").css("opacity","1")}if((J+1)==C.length-2){jQuery("#ajc-slider .right").css("opacity","0.3")}else{jQuery("#ajc-slider .right").css("opacity","1")}}var D={target:B,items:C,prev:"img.left",next:"img.right",step:3,exclude:2,cycle:false,duration:400,easing:"easeInOutExpo",onBefore:A};jQuery("#ajc-slider").serialScroll(D);jQuery("#ajc-slider").css("visibility","visible")}});

;(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(el){$(el).attr('unselectable','on').css('MozUserSelect','none');},enableSelection:function(el){$(el).attr('unselectable','off').css('MozUserSelect','');},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args);}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options));}});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value);}).bind('getData.'+name,function(e,key){return self.getData(key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(key){return this.options[key];},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this.setData('disabled',false);},disable:function(){this.setData('disabled',true);}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true;}
this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true;},this.options.delay);}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
this._mouseMoveDelegate=function(e){return self.mouseMove(e);};this._mouseUpDelegate=function(e){return self.mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e);}
if(this._mouseStarted){this.mouseDrag(e);return false;}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));}
return!this._mouseStarted;},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e);}
return false;},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},mouseDelayMet:function(e){return this._mouseDelayMet;},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.tabs",{init:function(){this.options.event+='.tabs';this.tabify(true);},setData:function(key,value){if((/^selected/).test(key))
this.select(value);else{this.options[key]=value;this.tabify();}},length:function(){return this.$tabs.length;},tabId:function(a){return a.title&&a.title.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+$.data(a);},ui:function(tab,panel){return{options:this.options,tab:tab,panel:panel,index:this.$tabs.index(tab)};},tabify:function(init){this.$lis=$('li:has(a[href])',this.element);this.$tabs=this.$lis.map(function(){return $('a',this)[0];});this.$panels=$([]);var self=this,o=this.options;this.$tabs.each(function(i,a){if(a.hash&&a.hash.replace('#',''))
self.$panels=self.$panels.add(a.hash);else if($(a).attr('href')!='#'){$.data(a,'href.tabs',a.href);$.data(a,'load.tabs',a.href);var id=self.tabId(a);a.href='#'+id;var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.panelClass).insertAfter(self.$panels[i-1]||self.element);$panel.data('destroy.tabs',true);}
self.$panels=self.$panels.add($panel);}
else
o.disabled.push(i+1);});if(init){this.element.addClass(o.navClass);this.$panels.each(function(){var $this=$(this);$this.addClass(o.panelClass);});if(o.selected===undefined){if(location.hash){this.$tabs.each(function(i,a){if(a.hash==location.hash){o.selected=i;if($.browser.msie||$.browser.opera){var $toShow=$(location.hash),toShowId=$toShow.attr('id');$toShow.attr('id','');setTimeout(function(){$toShow.attr('id',toShowId);},500);}
scrollTo(0,0);return false;}});}
else if(o.cookie){var index=parseInt($.cookie('ui-tabs'+$.data(self.element)),10);if(index&&self.$tabs[index])
o.selected=index;}
else if(self.$lis.filter('.'+o.selectedClass).length)
o.selected=self.$lis.index(self.$lis.filter('.'+o.selectedClass)[0]);}
o.selected=o.selected===null||o.selected!==undefined?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.$lis.filter('.'+o.disabledClass),function(n,i){return self.$lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1)
o.disabled.splice($.inArray(o.selected,o.disabled),1);this.$panels.addClass(o.hideClass);this.$lis.removeClass(o.selectedClass);if(o.selected!==null){this.$panels.eq(o.selected).show().removeClass(o.hideClass);this.$lis.eq(o.selected).addClass(o.selectedClass);var onShow=function(){$(self.element).triggerHandler('tabsshow',[self.fakeEvent('tabsshow'),self.ui(self.$tabs[o.selected],self.$panels[o.selected])],o.show);};if($.data(this.$tabs[o.selected],'load.tabs'))
this.load(o.selected,onShow);else
onShow();}
$(window).bind('unload',function(){self.$tabs.unbind('.tabs');self.$lis=self.$tabs=self.$panels=null;});}
for(var i=0,li;li=this.$lis[i];i++)
$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass(o.selectedClass)?'addClass':'removeClass'](o.disabledClass);if(o.cache===false)
this.$tabs.removeData('cache.tabs');var hideFx,showFx,baseFx={'min-width':0,duration:1},baseDuration='normal';if(o.fx&&o.fx.constructor==Array)
hideFx=o.fx[0]||baseFx,showFx=o.fx[1]||baseFx;else
hideFx=showFx=o.fx||baseFx;var resetCSS={display:'',overflow:'',height:''};if(!$.browser.msie)
resetCSS.opacity='';function hideTab(clicked,$hide,$show){$hide.animate(hideFx,hideFx.duration||baseDuration,function(){$hide.addClass(o.hideClass).css(resetCSS);if($.browser.msie&&hideFx.opacity)
$hide[0].style.filter='';if($show)
showTab(clicked,$show,$hide);});}
function showTab(clicked,$show,$hide){if(showFx===baseFx)
$show.css('display','block');$show.animate(showFx,showFx.duration||baseDuration,function(){$show.removeClass(o.hideClass).css(resetCSS);if($.browser.msie&&showFx.opacity)
$show[0].style.filter='';$(self.element).triggerHandler('tabsshow',[self.fakeEvent('tabsshow'),self.ui(clicked,$show[0])],o.show);});}
function switchTab(clicked,$li,$hide,$show){$li.addClass(o.selectedClass).siblings().removeClass(o.selectedClass);hideTab(clicked,$hide,$show);}
this.$tabs.unbind('.tabs').bind(o.event,function(){var $li=$(this).parents('li:eq(0)'),$hide=self.$panels.filter(':visible'),$show=$(this.hash);if(($li.hasClass(o.selectedClass)&&!o.unselect)||$li.hasClass(o.disabledClass)||$(this).hasClass(o.loadingClass)||$(self.element).triggerHandler('tabsselect',[self.fakeEvent('tabsselect'),self.ui(this,$show[0])],o.select)===false){this.blur();return false;}
self.options.selected=self.$tabs.index(this);if(o.unselect){if($li.hasClass(o.selectedClass)){self.options.selected=null;$li.removeClass(o.selectedClass);self.$panels.stop();hideTab(this,$hide);this.blur();return false;}else if(!$hide.length){self.$panels.stop();var a=this;self.load(self.$tabs.index(this),function(){$li.addClass(o.selectedClass).addClass(o.unselectClass);showTab(a,$show);});this.blur();return false;}}
if(o.cookie)
$.cookie('ui-tabs'+$.data(self.element),self.options.selected,o.cookie);self.$panels.stop();if($show.length){var a=this;self.load(self.$tabs.index(this),$hide.length?function(){switchTab(a,$li,$hide,$show);}:function(){$li.addClass(o.selectedClass);showTab(a,$show);});}else
throw'jQuery UI Tabs: Mismatching fragment identifier.';if($.browser.msie)
this.blur();return false;});if(!(/^click/).test(o.event))
this.$tabs.bind('click.tabs',function(){return false;});},add:function(url,label,index){if(index==undefined)
index=this.$tabs.length;var o=this.options;var $li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label));$li.data('destroy.tabs',true);var id=url.indexOf('#')==0?url.replace('#',''):this.tabId($('a:first-child',$li)[0]);var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.hideClass).data('destroy.tabs',true);}
$panel.addClass(o.panelClass);if(index>=this.$lis.length){$li.appendTo(this.element);$panel.appendTo(this.element[0].parentNode);}else{$li.insertBefore(this.$lis[index]);$panel.insertBefore(this.$panels[index]);}
o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this.tabify();if(this.$tabs.length==1){$li.addClass(o.selectedClass);$panel.removeClass(o.hideClass);var href=$.data(this.$tabs[0],'load.tabs');if(href)
this.load(index,href);}
this.element.triggerHandler('tabsadd',[this.fakeEvent('tabsadd'),this.ui(this.$tabs[index],this.$panels[index])],o.add);},remove:function(index){var o=this.options,$li=this.$lis.eq(index).remove(),$panel=this.$panels.eq(index).remove();if($li.hasClass(o.selectedClass)&&this.$tabs.length>1)
this.select(index+(index+1<this.$tabs.length?1:-1));o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n});this.tabify();this.element.triggerHandler('tabsremove',[this.fakeEvent('tabsremove'),this.ui($li.find('a')[0],$panel[0])],o.remove);},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1)
return;var $li=this.$lis.eq(index).removeClass(o.disabledClass);if($.browser.safari){$li.css('display','inline-block');setTimeout(function(){$li.css('display','block');},0);}
o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this.element.triggerHandler('tabsenable',[this.fakeEvent('tabsenable'),this.ui(this.$tabs[index],this.$panels[index])],o.enable);},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.$lis.eq(index).addClass(o.disabledClass);o.disabled.push(index);o.disabled.sort();this.element.triggerHandler('tabsdisable',[this.fakeEvent('tabsdisable'),this.ui(this.$tabs[index],this.$panels[index])],o.disable);}},select:function(index){if(typeof index=='string')
index=this.$tabs.index(this.$tabs.filter('[href$='+index+']')[0]);this.$tabs.eq(index).trigger(this.options.event);},load:function(index,callback){var self=this,o=this.options,$a=this.$tabs.eq(index),a=$a[0],bypassCache=callback==undefined||callback===false,url=$a.data('load.tabs');callback=callback||function(){};if(!url||!bypassCache&&$.data(a,'cache.tabs')){callback();return;}
var inner=function(parent){var $parent=$(parent),$inner=$parent.find('*:last');return $inner.length&&$inner.is(':not(img)')&&$inner||$parent;};var cleanup=function(){self.$tabs.filter('.'+o.loadingClass).removeClass(o.loadingClass).each(function(){if(o.spinner)
inner(this).parent().html(inner(this).data('label.tabs'));});self.xhr=null;};if(o.spinner){var label=inner(a).html();inner(a).wrapInner('<em></em>').find('em').data('label.tabs',label).html(o.spinner);}
var ajaxOptions=$.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(a.hash).html(r);cleanup();if(o.cache)
$.data(a,'cache.tabs',true);$(self.element).triggerHandler('tabsload',[self.fakeEvent('tabsload'),self.ui(self.$tabs[index],self.$panels[index])],o.load);o.ajaxOptions.success&&o.ajaxOptions.success(r,s);callback();}});if(this.xhr){this.xhr.abort();cleanup();}
$a.addClass(o.loadingClass);setTimeout(function(){self.xhr=$.ajax(ajaxOptions);},0);},url:function(index,url){this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs',url);},destroy:function(){var o=this.options;this.element.unbind('.tabs').removeClass(o.navClass).removeData('tabs');this.$tabs.each(function(){var href=$.data(this,'href.tabs');if(href)
this.href=href;var $this=$(this).unbind('.tabs');$.each(['href','load','cache'],function(i,prefix){$this.removeData(prefix+'.tabs');});});this.$lis.add(this.$panels).each(function(){if($.data(this,'destroy.tabs'))
$(this).remove();else
$(this).removeClass([o.selectedClass,o.unselectClass,o.disabledClass,o.panelClass,o.hideClass].join(' '));});},fakeEvent:function(type){return $.event.fix({type:type,target:this.element[0]});}});$.ui.tabs.defaults={unselect:false,event:'click',disabled:[],cookie:null,spinner:'',cache:false,idPrefix:'ui-tabs-',ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:'<div></div>',navClass:'ui-tabs-nav',selectedClass:'ui-tabs-selected',unselectClass:'ui-tabs-unselect',disabledClass:'ui-tabs-disabled',panelClass:'ui-tabs-panel',hideClass:'ui-tabs-hide',loadingClass:'ui-tabs-loading'};$.ui.tabs.getter="length";$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){continuing=continuing||false;var self=this,t=this.options.selected;function start(){self.rotation=setInterval(function(){t=++t<self.$tabs.length?t:0;self.select(t);},ms);}
function stop(e){if(!e||e.clientX){clearInterval(self.rotation);}}
if(ms){start();if(!continuing)
this.$tabs.bind(this.options.event,stop);else
this.$tabs.bind(this.options.event,function(){stop();t=self.options.selected;start();});}
else{stop();this.$tabs.unbind(this.options.event,stop);}}});})(jQuery);

/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
jQuery.fn.truncate=function(max,settings){settings=jQuery.extend({chars:/\s/,trail:["...",""]},settings);var myResults={};var ie=$.browser.msie;function fixIE(o){if(ie){o.style.removeAttribute("filter")}}return this.each(function(){var $this=jQuery(this);var myStrOrig=$this.html().replace(/\r\n/gim,"");var myStr=myStrOrig;var myRegEx=/<\/?[^<>]*\/?>/gim;var myRegExArray;var myRegExHash={};var myResultsKey=$("*").index(this);while((myRegExArray=myRegEx.exec(myStr))!=null){myRegExHash[myRegExArray.index]=myRegExArray[0]}myStr=jQuery.trim(myStr.split(myRegEx).join(""));if(myStr.length>max){var c;while(max<myStr.length){c=myStr.charAt(max);if(c.match(settings.chars)){myStr=myStr.substring(0,max);break}max--}if(myStrOrig.search(myRegEx)!=-1){var endCap=0;for(eachEl in myRegExHash){myStr=[myStr.substring(0,eachEl),myRegExHash[eachEl],myStr.substring(eachEl,myStr.length)].join("");if(eachEl<myStr.length){endCap=myStr.length}}$this.html([myStr.substring(0,endCap),myStr.substring(endCap,myStr.length).replace(/<(\w+)[^>]*>.*<\/\1>/gim,"").replace(/<(br|hr|img|input)[^<>]*\/?>/gim,"")].join(""))}else{$this.html(myStr)}myResults[myResultsKey]=myStrOrig;$this.html(["<div class='truncate_less'>",$this.html(),settings.trail[0],"</div>"].join("")).find(".truncate_show",this).click(function(){if($this.find(".truncate_more").length==0){$this.append(["<div class='truncate_more' style='display: none;'>",myResults[myResultsKey],settings.trail[1],"</div>"].join("")).find(".truncate_hide").click(function(){$this.find(".truncate_more").css("background","#fff").fadeOut("normal",function(){$this.find(".truncate_less").css("background","#fff").fadeIn("normal",function(){fixIE(this);$(this).css("background","none")});fixIE(this)});return false})}$this.find(".truncate_less").fadeOut("normal",function(){$this.find(".truncate_more").fadeIn("normal",function(){fixIE(this)});fixIE(this)});jQuery(".truncate_show",$this).click(function(){$this.find(".truncate_less").css("background","#fff").fadeOut("normal",function(){$this.find(".truncate_more").css("background","#fff").fadeIn("normal",function(){fixIE(this);$(this).css("background","none")});fixIE(this)});return false});return false})}})};

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" wmode=\"transparent\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+=" />";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
_19+="<PARAM NAME=wmode VALUE=transparent />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;

jQuery(document).ready(function($) {

  $('.cxRotatingTease').each(function() {

    var $panels = jQuery('.scrollContainer > div', $(this));
    var $container = $('.scrollContainer', $(this));
    $container.css('width', $panels[0].offsetWidth * $panels.length);

    $('.scroll', $(this))
    .before('<img class="scrollButtons left" src="http://media.ajc.com.coxnewsweb.com/access/images/holiday-guide/prev.gif" />')
    .after('<img class="scrollButtons right" src="http://media.ajc.com.coxnewsweb.com/access/images/holiday-guide/next.gif" />');

    $(this).is('.auto') ? intval = 5000 : intval = 0;

    var $prev = $('.left', $(this)).css('opacity','0.3'),
    $next = $('.right', $(this));

    $(this).serialScroll({
     target:    '.scroll',
     items:     '.panel',
     prev:      '.left',
     next:      '.right',
     cycle:     true,
     force:     true,
     interval:  intval,
     duration:  400,
     
     onBefore: function( e, elem, $pane, $items, pos ) {
       $prev.add($next).css('opacity', '1');
       if(pos == 0)
         $prev.css('opacity', '0.3');
      else if (pos == $items.length-1)
        $next.css('opacity','0.3');
     }
     
    });
    
  });

});

// http://media.ajc.com/projects/zag/zag-cookie-parse.min.js
(function(){function f(k){var m=k+"=";var j=document.cookie.split(";");for(var l=0;l<j.length;l++){var n=j[l];while(n.charAt(0)===" "){n=n.substring(1,n.length)}if(n.indexOf(m)===0){return n.substring(m.length,n.length)}}return null}var c=f("zag");if(c&&(c.length>2)){while(c.charAt(0)==='"'){c=c.substring(1)}while(c.charAt(c.length-1)==='"'){c=c.substring(0,c.length-1)}var g={};var e=c.split("&");for(var b=0;b<e.length;b++){var h=e[b].indexOf("=");if(h<1){continue}var a=e[b].substring(0,h);var d=e[b].substring(h+1);if(!d||(d.indexOf("window.zag.")>=0)){continue}g[a]=unescape(d)}window.zag=g}})();