function formatText(index, panel) {
	  return index + "";
    }

$(function () {   
	
	$('li:last-child, .two-col .col:last-child, .three-col .col:last-child, .four-col .col:last-child, tr:last-child, td:last-child').addClass('last');
	$('li:first-child:not(.show), .two-col .col:first-child, .three-col .col:first-child, .four-col .col:first-child').addClass('first');
	
	$('tr:even').addClass('even');
	
	$('#nav li a').each(function(index) {
	    if($(this).text().length > 23) {
			$(this).parent().addClass('large');
		}
	});
	
	$('#nav li.large.active').addClass('large-active');
	
	
	$(".lightbox-gallery").fancybox({
		'width'				: 867,
		'height'			: 520,
		'padding'           : 7,
		'overlayOpacity'    : 0.5,
		'overlayColor'      : '#000',
		'scrolling'         : 'no',
		'autoScale'         : false,
		'type'				: 'iframe',
		'centerOnScroll'    : true     
	});
	
    $('.slider').anythingSlider({
        easing: "easeInOutExpo",     
        autoPlay: false,             
        delay: 3000,                 
        startStopped: true,          
        animationTime: 600,          
        hashTags: true,              
        buildNavigation: true,       
		pauseOnHover: true,          
		startText: "Go",             
     stopText: "Stop",               
     navigationFormatter: formatText 
    });
    
    $("#slide-jump").click(function(){
        $('.slider').anythingSlider(4);
    });

	/**/

	$('img').each(function(){
		$(this).wrap('<span></span>');
		var html = $(this).parent().html();
		var alt = html.match( /alt=/ );
		if(alt==null) {
			$(this).css('border','2px dotted #0FF');
		} else {
			$('img[alt=""]').css('border','5px solid #0F0');
		}
	});

	$('a[target="_blank"]').css('border','2px dashed #FC0');

	/**/
	$('.blank').click(function() {
		window.open($(this).attr('href'));
		return false;
	});

});


