var $j = jQuery.noConflict();

$j(function() {
	
// PNG FIX
	$j(document).pngFix();
	
// NAVIGATION

	$j("#nav").lavaLamp({
		fx: 'easeInOutSine',
		speed: 300,
		click: function(){return true},
		autoReturn: true
	});

// BOX-ORANGE

	$j(".box-orange").prepend("<span>&#147;</span>");

// LINKS

$j('.post').biggerlink({clickableclass:'post', hoverclass:'post-hover'});
$j('.post-blog').biggerlink({clickableclass:'post-blog', hoverclass:'post-blog-hover'});
$j('.post-img').biggerlink({clickableclass:'post-img', hoverclass:'post-hover'});
$j('small span').biggerlink();

// TOP IMAGE 

var slideLength = $j('#top-image-wrap ul li').length;
var iconNav		= $j('#iconNav').length;

// Check to see if there is more than two slides and check for iconNav
if (slideLength >= 2 && iconNav != 1) {

	$j('#top-image').anythingSlider({
		easing: "easeInOutExpo",
		autoPlay: true,
		startStopped: false,
		delay: 5000,
		animationTime: 800,
		hashTags: true,
		buildNavigation: false,
		pauseOnHover: true,
		startText: "Start",
		stopText: "Stop",
		navigationFormatter: null
	});
		 
} else {
	

	$j('#top-image-wrap').css({'overflow' : 'hidden'});

}

	$j('#slide-jump').click(function(){
	
		$j('#top-image').anythingSlider();
	
	});
	
	// Set the tab, fade, history effect for the Data Driven Business custome-subpage.
	$j("#iconNav")
		.tabs("#panes > div", {
			effect: 'fade'
		})
		.history();

});