
  $(document).ready(function () {  
   
  
    $("#blogFeed").rssfeed("http://ptarmiganbellpottinger.wordpress.com/feed/", {
      limit: 3,
      titletag: "h4",
      content: false, 
      header: false
    });
    
    
    
   $("#twitterFeed").tweet({
          count: 2,
   filter: function(t){ return ! /^@\w+/.test(t["tweet_raw_text"]); },   
      username: ["nathanlane", "pablosrodriguez", "si_brown", "SandrinePowell", "AdamBurnsPR", "SianFletcher", "RobertStebbings", "TezzaG", "ClairePace" ],
   loading_text: "Loading tweets..."             
        });   
    
    
    
    
    

 
  
  
  
  
  
  
    $("#flickrFeed").jflickrfeed({
      limit: 14,
      qstrings: {
        id: "56306326@N03"},
      cleanDescription: true,
      itemTemplate: '<li><a  href="{{link}}" target="_blank"><img src="{{image}}"  alt="{{image}}" width="218" height="144" /></a></li>'
    },
                                 
    function(data) {
      $("#flickrFeed").cycle({
        fx:     "fade",
        speed:    800,
        timeout:  0,
        next:   "#nextBtn",
        prev:   "#prevBtn"
      });
    }); 

  
  
    
    
        //Caption Sliding (Partially Hidden to Visible)
    $(".caption").each(function(index){
      $("#caption"+(index+1)).hover(function(){
        $("#hover"+(index+1)).addClass("caseStudyHighlighted");
        $("#cover"+(index+1), this).stop().animate({
          top:"20px"
        },{
          queue:false,
          duration:300
        });
      }, function() {
        $("#cover"+(index+1), this).stop().animate({
          top:"160px"
        },{
          queue:false,
          duration:300,
          complete:function(){$("#hover"+(index+1)).removeClass("caseStudyHighlighted");}
        });
      });
    });
    $(".hoverBtn").each(function(index){
      $("#hover"+(index+1)).hover(function(){
        $("#hover"+(index+1)).addClass("caseStudyHighlighted");
        $("#cover"+(index+1), ".boxgrid.caption").stop().animate({
          top:"20px"
        },{
          queue:false,
          duration:300
        });
      },function(){
        $("#cover"+(index+1), ".boxgrid.caption").stop().animate({
          top:"160px"
        },{
          queue:false,
          duration:300,
          complete:function(){$("#hover"+(index+1)).removeClass("caseStudyHighlighted");}
        });
      });                       
    });
  });


