﻿jQuery(function() {

    jQuery.getFeed({
        url: 'js/jfeed/proxy.php?url=http://www.1888pressrelease.com/rss/pharmaceuticals.xml',
        success: function(feed) {
        
           /* jQuery('#ind_news').append('<h2>'
            + 'Industry News'
            + '</h2>');*/
                        
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<strong><p class="feed">'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>'
                + '</p></strong>';
                                
                html += '<p class="feed">'
                + item.description
                + '</p><br/>';
            }
            
            jQuery('#press_rel').append(html);
        }    
    });
});

jQuery(function() {

    jQuery.getFeed({
        url: 'js/jfeed/proxy.php?url=http://www.pharmaceutical-business-review.com/rss',
        success: function(feed) {
        
           /* jQuery('#ind_news').append('<h2>'
            + 'Industry News'
            + '</h2>');*/
                        
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<strong><p class="feed">'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>'
                + '</p></strong>';
                                
                html += '<p class="feed">'
                + item.description
                + '</p><br/>';
            }
            
            jQuery('#ind_news').append(html);
        }    
    });
});

//-----------------------------------
window.onload = function () {
  // only apply to IE
  if (!/*@cc_on!@*/0) return;

  // find every element to test
  var all = document.getElementsByTagName('*'), i = all.length;

  // fast reverse loop
  while (i--) {
    // if the scrollWidth (the real width) is greater than
    // the visible width, then apply style changes
    if (all[i].scrollWidth > all[i].offsetWidth) {
      all[i].style['paddingBottom'] = '20px';
      all[i].style['overflowY'] = 'hidden';
    }
  }
};
