/**
 * This function checks the CSS properties to see if the element is actually
 * visible to the user. 
 */
function isVisible(obj) {
  if (obj == document) return true

  if (!obj) return false
  if (!obj.parentNode) return false
  if (obj.style) {
      if (obj.style.display == 'none') return false
      if (obj.style.visibility == 'hidden') return false
  }

  //Try the computed style in a standard way
  if (window.getComputedStyle) {
      var style = window.getComputedStyle(obj, "")
      if (style.display == 'none') return false
      if (style.visibility == 'hidden') return false
  }

  //Or get the computed style using IE's proprietary way
  var style = obj.currentStyle
  if (style) {
      if (style['display'] == 'none') return false
      if (style['visibility'] == 'hidden') return false
  }

  return isVisible(obj.parentNode)
}

//IE6 png fix
function pngContentFix() {
	// Fix transparent png images
	$('.fix').pngFix();		
	$('#relative_container').pngFix();
}

$(document).ready(function() {
  
   // Runs png fix for IE6
   pngContentFix();
	
   // Sidebar open / close functionality
   $(".sidebar-hdr").click(function(){
      $(this).next().slideToggle(400);
         $(this).parent().toggleClass("close");
      return false;
   });

   // Applys horizontal jScrollPane to element
   //$('.accessories-selector').jScrollHorizontalPane({ showArrows:true });
   
   // Applys jTab to element
   $('.tab-containerTK').tabs();

});

//disable this
var phoneProductArray = false;

