jQuery(document).ready(function($){

var state = "closed";

$('.subscribeBtn').click(function(){


	if (state == "open"){
	
		$('#inline-sample').animate({"height":"0px"});
		state = "closed";
		$(this).attr('src', '/images/stories/subscribeplus.jpg');
	
	} else {
		
		$('#inline-sample').animate({"height":"200px"});
		state = "open";
		$(this).attr('src', '/images/stories/subscribeminus.jpg');
	
	}

	

});

$('#hero').innerfade({ animationtype: 'fade', speed: 1500, timeout: 7500, type: 'sequence', containerheight: '330px' });


if ($('a.test1 h2').attr("class") == "colour1 test1"){
	
	$('#header_logo img').attr("src", "/templates/commonCss/images/logo_left_1.jpg");

}

if ($('a.test2 h2').attr("class") == "colour2 test2"){
	
	$('#header_logo img').attr("src", "/templates/commonCss/images/logo_left_2.jpg");

}

if ($('a.test3 h2').attr("class") == "colour3 test3"){

	$('#header_logo img').attr("src", "/templates/commonCss/images/logo_left_3.jpg");

}

$('a.yuimenuitemlabel').hover(function(){

if ($(this).attr('href') == '/services/opportunity-strategy.html'){
	
	$(this).css({"color":"#ca006c"});

}

if ($(this).attr('href') == '/services/opportunity-expansion.html'){
	
	$(this).css({"color":"#00a389"});

}

if ($(this).attr('href') == '/services/opportunity-activation.html'){
	
	$(this).css({"color":"#f99d31"});

}

}, function(){

	$(this).css({"color":"#A4A9B6"});
	
});

$('a.drops').hover(function(){

	if ($(this).attr('id') == 63){
	    
		$(this).css({"color":"#ca006c"});
	        	
	} else {
	
		$(this).css({"color":"#009bdc"})
	
	}
	        	
	if ($(this).attr('id') == 64){
	        	
		$(this).css({"color":"#00a389"});
	        	
	}
	        	
	if ($(this).attr('id') == 65){
	        	
		$(this).css({"color":"#f99d31"});
	        	
	}

}, function(){

	$(this).css({"color":"#000"});

});

/*var $div = $('#homepage_rebrand div');
var height = $div.height();

$div.hide().css({ height : 0 });

$('#homepage_rebrand span').click(function () {
  if ( $div.is(':visible') ) {
  
  	$('#newsticker').slideDown();
  	$('#homepage_rebrand span').html('Read More');
    $div.animate({ height: 0 , opacity: 0}, { duration: 500, complete: function () {
        $div.hide();
      } 
    });
    
  } else {
  
  	$('#newsticker').slideUp();
  	$('#homepage_rebrand span').html('Hide');
    $div.show().animate({ height : 170, opacity:1 }, { duration: 500 });
    
  }
    
  return false;
});*/


});
