$(document).ready(function(){

//  $('#myGallery').spacegallery({
//    loadingClass: 'loading'
//  });
//
//  setInterval(function() {
//    $("#myGallery a").click();
//  }, 5000); 

  var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
  var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

  if (jQuery.browser.msie && (ie55 || ie6)) {
    $("div.shadow_top").wrap("<div />");
    $("div.shadow_top").parent().wrap("<div id=\"shadow_top_cont\" />");
  }

  // PNG fix for IE6
  $("#c_index_right div.steps, #shadow_top_cont, #shopping_cart_right").pngFix();

  //if (jQuery.browser.msie) {
  //  $(".admin_list_table tbody tr td:first-child").addClass(".b_left");
  //  $(".admin_list_table tbody tr td:last-child").addClass(".b_right");
  //}

  // Swap value for search
  swap_val = [];
  $(".swap").each(function(i){
    swap_val[i] = $(this).val();
    $(this).bind("focus", function(){
      if ($(this).val() == swap_val[i]) {
        $(this).val("");
      }
    }).bind("blur", function(){
      if ($.trim($(this).val()) == "") {
        $(this).val(swap_val[i]);
      }
    });
  });

});
