﻿/**
 * Description: general javascript actions and functions for the news Module News V2
 * User: António Ramos
 * Date: 26/July/2011
 **/

$( function() {
  $("#newsContainer,.itemPromotionsList").parents("#mainContent").css("position","static");
} );

/* animate HighlightPromotion */
function onLoadAnimationHomePromotionHighlight() {
  /* animate HighlightPromotion On */
  $( ".highlightPromotion a" ).click( function() {
    $( "div.textIn,div.textIn span" ).show();
    $( "div.textIn" ).animate( {
      width:"230px"
    } )
  } );

  /* animate HighlightPromotion Off */
  $( "div.textIn span" ).click( function() {
    $( "div.textIn" ).animate( {
      width:"0px"
    } , $( this ).hide() )
  } );
}

/* animation Promotion List on hover */
function onLoadAnimationPromotionList(){
	$( ".promotionsList li:first" ).prepend( $( ".promotionTitle" ) );

  $( ".promotionsList li" ).hover( function() {

    $( this ).animate( {
      backgroundColor:"#0B0C07"
    } );
  } , function() {
    $( this ).animate( {
      backgroundColor:"#171813"
    } );

  } );
}
