
$.include('/_scripts/general/css_browser_selector.js');
$.include('/_scripts/jquery/jquery.easing.1.3.js');
$.include('/_scripts/jquery/jquery.easing.compatibility.js');
//$.include('/_scripts/jquery/jquery.colorbox.min.js');
//$.include('/_scripts/jquery/jquery.tools.min.js');

$(document).ready(function() {
/* jQuery document.ready BugFix */ 
if (document.readyState != "complete" && (!$.browser.mozilla)) 
{    
  setTimeout( arguments.callee, 100 ); return;
} 
/* End BugFix */
  
  /* BrowserCheck */
  if ($.browser.msie && $.browser.version < 7.0) {    
    document.location = '/browser/';
  }

  $("#btnGoToShoppingcart").click(function() {
    window.location = "/sushi/winkelwagen/";
  })    
          
  $(".imgLogo").click(function() {
    window.location = "/";
  })  
      
  $(".dGoBack").click(function () {
    $.fn.colorbox.close();    
  });    
  
  $(".dSubMenuItem, .dHomePageMenuItem, .dHomePageMenuItemSelected, .dSubMenuItemSelected").click(function() {
    if ($(this).find('a').attr('href'))
      window.location = $(this).find('a').attr('href');    
  });
  
  $(".dSubMenuItem").hover(function() {
    $(this).addClass("dSubMenuItemHover");
  }, function() {
    $(this).removeClass("dSubMenuItemHover");
  });
  
  $(".dNewsMessage").find('img').each(function(){
    $(this).addClass('imgBorder');
  })
  
  $(".dClick").click(function() {
    if ($(this).attr('link'))
      window.location = $(this).attr('link');    
  }); 
  
  $(".dPageNav").click(function(event) {    
    event.preventDefault();
    var Link = $(this).attr("link");    
    if (Link)
      window.location.href = Link;            
  });     
  
  $("a[rel='slMenu']").colorbox({close : "sluit venster", current: "gerecht {current} van {total}", previous : "vorige", next : "volgende" });
                                       
});

function LaunchModal(aSource, aWidth, aCouldBeClosed, aEvents)
{
  var event = (aEvents != undefined) ? aEvents : { }; 
  if (!aWidth)
    aWidth = "468px";
  if (event.onOpen == undefined || !event.onOpen)
    event.onOpen = function() { ModalDialogIsOpen = true; };
  if (event.onClosed == undefined || !event.onClosed)
    event.onClosed = function() { ModalDialogIsOpen = false; };

  $.fn.colorbox({
    initialWidth:"200px",
    initialHeight:"200px",
    width: aWidth, 
    opacity:0.7,      
    inline:true,   
    overlayClose: aCouldBeClosed,         
    escKey: aCouldBeClosed,
    close:"",
    href: aSource,
    onOpen: event.onOpen,
    onComplete: event.onComplete,                    
    onCleanup: event.onCleanup,
    onClosed: event.onClosed
  });
}
