/* 
  - Requires Jquery 1.2.1
  - Site level Javascript that will be loaded for all pages
*/

jQuery(document).ready(function(){
  
  //pageWidthHelper.setWidthStyles();
  jQuery('#toppage_teaser .who a').click(function(eventObj){
			expandTopTeaser(); 
			eventObj.preventDefault(); 
	});
  jQuery('#toppage_teaser .quote a').click(function(eventObj){
			expandTopTeaser(); 
			eventObj.preventDefault(); 
	});
	//load <a href="..." rel="external"> links like target="_blank"
	jQuery('a[rel=external]').click(function(eventObj){
		window.open(this.href);
		eventObj.preventDefault(); 
	});
});	


/* show option to expand top teaser */
function expandTopTeaser(){
	jQuery('#toppage_teaser .quote_full').show();
}
function closeTopTeaser(){
	jQuery('#toppage_teaser .quote_full').hide();
}


/*
jQuery(window).resize(function(){
  pageWidthHelper.setWidthStyles(jQuery(window).width());
});
*/
/* 
  helper class to set width styles according to page width 
  Requires Jquery 1.2.1 
 
pageWidthHelper = {
    // Properties
    width_breakpoint : 1280,
    standard_class : 'standard_window',
    wide_class : 'wide_window',
    
    setWidthStyles: function() {
      var winWidth = jQuery(window).width();
      
      //set appropriate CSS for this browser width
      if(winWidth > this.width_breakpoint){
        jQuery('#wrapper').removeClass(this.standard_class);
        jQuery('#wrapper').addClass(this.wide_class);
        //alert('wider');
      }else{
        jQuery('#wrapper').removeClass(this.wide_class);
        jQuery('#wrapper').addClass(this.standard_class);
        //alert('smaller');
      }
    }
    
};  */ 

//helps remove background image flicker in IE
try {
	document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}