// ------------------- SEARCH
  
$(function(){
  $(document).ready(function($){

    // Show Main Navigation (fixed load flicker)
    //setTimeout(function(){$('#subNavBar').css('width','990px');}, 2500);
    
    //Load title hints
    $('input[title!=""]').hint();
    
    // Load Store Account Tools
    $('#linkMyAccount').click(function () {
        $('#myAccountMenu ul').toggle();
    });
    
    // Load Store Cart Tools
    $('#linkMyCart').click(function () {
        $('#myCartMenu ul').toggle();
    });
    
    // Load SLI Search
    //sli_load();
                       
    // Intialize PrettyPhoto
    $("a[rel^='prettyPhoto']").prettyPhoto({overlay_gallery:true, show_title:false, social_tools:false});
    
    // Lazy Load Images
    $("img").lazyload({ 
      placeholder : "/images/lazyload.gif",
      effect : "fadeIn",
      threshold : 200
    });
    
    //// Load Main navigation
    //$('#mega-menu-tut').dcMegaMenu({
    //rowItems: '4',
    //speed: 'fast'
    //});
  
    //// Load Store Cart Tools
    //  $('#cartmenu').click(function () {
    //  $('ul.the_cartmenu').slideToggle('fast');
    //});
    
  });
});


function showCallouts(LeftNav,Left,Right){
  if (LeftNav) {
    if ($(window).width() < 1240) {
      $("#callOutLeftNav").hide();
    }
    else {
      $("#callOutLeftNav").show();
    }
  }
  else { $("#callOutLeftNav").hide(); }
  if (Left) { $("#callOutLeft").show(); }
    else { $("#callOutLeft").hide(); }
  if (Right) {
    if ($(window).width() < 1235) {
      $("#callOutRight").hide();
    }
    else {
      $("#callOutRight").show();
    }
  }
  else { $("#callOutRight").hide(); }
  
}
