jQuery(function () {
	$('#top-content-menu ul li').last().css('border-right','none');
	$('#bottom-content-panel-head ul li').last().css('border-right','none');
	//$('.subMenu li').first().addClass('first');
	$('.subMenu').each(function() {
    	jQuery(this).children('li:last').css('border-bottom','none')
	});
	
	$('.search-field').focus(function()
		{
			if(this.value=='quick search...')
				{
					this.value='';	
				}				
		});
	$('.search-field').blur(function()
		{
			if(this.value=='')
				{
					this.value='quick search...';	
				}
		});
	
	
		$(function () {
			var tabContainers = $('div.tabs > div');
			tabContainers.hide().filter(':first').show();
			
			$('div.tabs ul.tabNavigation a').click(function () {
					tabContainers.hide();
					tabContainers.filter(this.hash).show();
					$('div.tabs ul.tabNavigation a').removeClass('selected');
					$(this).addClass('selected');
					return false;
			}).filter(':first').click();
		});

	
	
	$('#bottom-content-panel-head ul li a').first().css('-moz-border-radius','10px 0px 0px 0px', '-webkit-border-radius', '10px 0px 0px 0px');
	
	jQuery('.tabNavigation li').first().css('margin-left', '0px')
	jQuery('.top-content-right-housing').hide();
	jQuery('.services').show();
	
	jQuery('.housing-tab').click(function(){
    jQuery('.top-content-right-housing').hide();
    jQuery('ul.main-tabs li').removeClass('training-activated services-activated recruitment-activated');
    jQuery(this).addClass('housing-activated');
    jQuery('.housing').show(); 
    jQuery('#services-image').attr('src','http://www.neca.co.uk/wp-content/themes/neca/images/Neca-housing-logo.jpg'); 
  });
  jQuery('.services-tab').click(function(){
    jQuery('.top-content-right-housing').hide();
    jQuery('ul.main-tabs li').removeClass('training-activated housing-activated recruitment-activated');
    jQuery(this).addClass('services-activated');
    jQuery('.services').show();
    jQuery('#services-image').attr('src','http://www.neca.co.uk/wp-content/themes/neca/images/services-tab.jpg');   
  });
  jQuery('.training-tab').click(function(){
    jQuery('.top-content-right-housing').hide();
    jQuery('ul.main-tabs li').removeClass('housing-activated services-activated recruitment-activated');
    jQuery(this).addClass('training-activated');
    jQuery('.training').show(); 
    jQuery('#services-image').attr('src','http://www.neca.co.uk/wp-content/themes/neca/images/training.jpg');  
  });
  jQuery('.recruitment-tab').click(function(){
    jQuery('.top-content-right-housing').hide();
    jQuery('ul.main-tabs li').removeClass('training-activated services-activated housing-activated');
    jQuery(this).addClass('recruitment-activated');
    jQuery('.recruitment').show();
    jQuery('#services-image').attr('src','http://www.neca.co.uk/wp-content/themes/neca/images/recruitment.jpg');   
  });
});


    
        function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "swing",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 5000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 500,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });

