// THE SLIDE TOGGLE
// This thing is massive fail on ie8, so it's turned off.
/*$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('.categoryInfo').hide();

 // toggles the slickbox on clicking the noted link  
 
  $('.infoIcon').click(function() {
    if ( $('.categoryInfo') != null) {
      $('.categoryInfo').slideToggle();//(400);
      return false;
    }
  });
});
*/

// FONT REPLACEMENT
$(document).ready(function() {
	Cufon.replace('.page_item a, #banner-info a span', { fontFamily: 'VistaSansReg' });
	Cufon.replace('#latest h2, #featured h2, #categories h2, #platforms h2, .cat580 h2, #purchase h2, #tags h2, .sectionheader h2, #banner-info h2', { fontFamily: 'VistaSansBold' });
	Cufon.replace('.title, .storytitle, .contactForm h2', { fontFamily: 'VistaSansLight', hover: true, hoverables: { div: true, a: true} });
	Cufon.replace('.catSlider h2, .filosofia', { fontFamily: 'Filosofia Grand OT' });
});


// If using IE, returns version number, otherwise -1
function getInternetExplorerVersion() {

    var rv = -1;

    if (navigator.appName == 'Microsoft Internet Explorer') {
        var ua = navigator.userAgent;
        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
        if (re.exec(ua) != null)
            rv = parseFloat(RegExp.$1);
    }

    return rv;
}

// manually place purchase menu on ie6 due to css fail
$(document).ready(function() {
  //var purchaseCol = $('.wrapper2802');
  var ieVer = getInternetExplorerVersion();
  if (ieVer == -1 || ieVer > 6) return;
  
  // Only ie6 gets here...
  
  var purchaseCol = $('.wrapper2802');
  var titleHeader = $('.wrapper').height();
  if(purchaseCol != null && purchaseCol.offset() != null && titleHeader != null) {
    purchaseCol.css( { "top": + ( purchaseCol.offset().top - titleHeader + 190) + "px"} );
  }
});


