/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


(function($){
  $(document).ready(function(){
    
    
    
    function checkSize()
    {
      var content_height = $('#content .content-area').height();
      var shadow_top_height = $('#content .content-shadow-top').height();

      var shadow_height = content_height - shadow_top_height;

      $('#content .content-shadow').height(shadow_height).css({top: shadow_top_height});
    }
    
    checkSize();
    
    $('.rotating-ads .items, .rotating-magazines .items, .rotating-models .items').cycle({timeout: 10000});
    $('#rotating-banner .rotating-banner .items').cycle({fx:'scrollLeft',timeout: 10000,pager:  '#banner-controls', 
     
    // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
        //var src = $(slide).find('img').attr('src');
        var src = $('#rotating-banner .rotating-banner .items .item').eq(idx).find('img').attr('src');
        return '<li><a href="#"><img src="' + src + '" /></a></li>'; 
    } });
  
    $('#rotating-banner .rotating-banner').hover(function(){
      $(this).find('#banner-controls').animate({bottom: 10}, {duration: 250, queue: false});
    }, function(){
      $(this).find('#banner-controls').animate({bottom: -52}, {duration: 250, queue: false});
    });
  });
})(jQuery);
