$(document).ready(function(){
	try{
		// news swap
		$('a[id^=link]')
			.each(function(){
				$('a[rel=big_'+$(this).attr('id').replace("link_","")+']').lightBox();
				$('a[rel=bigwhole_'+$(this).attr('id').replace("link_","")+']').lightBox();
			})
			.click(function(){
				$('div[id^=post_]').hide();
				$('div[id=postwhole_'+$(this).attr('id').replace("link_","")+']').show();
				return false;
			});
		$('a[id^=showallnews]').click(function(){
			$('div[id^=post_]').show();
			$('div[id^=postwhole_]').hide();
			return false;
		});
		//lightbox
		$('a[rel=gallery]').lightBox();
		// aToolTip
		$('a.normalTip').aToolTip();
		$('a.fixedTip').aToolTip({fixed: true});
		$('a').aToolTip({  
			  clickIt : false                     // set to true for click activated tooltip  
			, closeTipBtn : 'aToolTipCloseBtn'    // you can set custom class name for close button on tooltip  
			, fixed : false                       // Set true to activate fixed position  
			, inSpeed : 100                       // Speed tooltip fades in  
			, outSpeed : 100                      // Speed tooltip fades out  
			, tipContent:  ''                     // Pass in content or it will use objects 'title' attribute  
			, toolTipClass : 'aToolTip'           // Set custom class for tooltip  
			, xOffset : 1                         // x Position  
			, yOffset : 5                          // y position  
		});
		// slider
		$('#offers_slider').accessNews({
	          headline : "Business as Usual"
	        , speed : "slow"
			, slideBy : 3
	    });
	}catch(e){}
});
