jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);  
};

$(document).ready(function() { 

	 $('#carousel').cycle({		
	        speed:  800,
	        timeout: 12000,
	        pager:  '#pager',
	        pagerAnchorBuilder: function(idx, slide) {
	            // return sel string for existing anchor
	            return '#pager li:eq(' + (idx) + ') a';
	        }
	
		});	
			
	$(".year:first").addClass("active");
	$(".months:not(:first)").hide();
	
	$(".year").click(function(){
		$(this).next(".months").slideFadeToggle("normal");
		$(this).toggleClass("active");
	});
	if($(".colorbox").length) {
		$(".colorbox").colorbox({initialWidth:100, initialHeight:100, maxWidth:"90%", maxHeight:"90%"});
	}
	
	if($("#search #query").length) {
		if($("#search #query").val() == '') {
			$("#search #query").val('Search');
		}
		$("#search #query").focus(function(){
			if (this.value == 'Search') {
				this.value='';
			}
		});
		
		$("#search #query").blur(function(){
			if (this.value == '') {
				this.value='Search';
			}
		});
	}
});

var delta = {
	src: '/flash/delta.swf',
	wmode: 'transparent',
	ratios: [9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]
};


sIFR.useStyleCheck = true;
sIFR.activate(delta);

sIFR.replace(delta, {
selector: 'h1'
,css: [
  '.sIFR-root { font-weight: bold; color: #b20838; font-size: 27px;}'
  ,'a { text-decoration: none; }'
  ,'a:link { color: #643b1f; }'
  ,'a:hover { color: #643b1f; }'
]
});




