$(document).ready(function(){
//        $(".menu > li").find("+ ul").slideToggle("medium");
//        $(".menu > li").click(function() {            
//            $(this).toggleClass("nav-on").toggleClass("nav-off");                                   
//            $(this).toggleClass("expanded").toggleClass("collapsed").children("+ ul").slideToggle("medium");
//        });
        jQuery('a[rel*=facebox]').facebox();              

});

function openProductPage(url,objID)
{
    var oldHtml = $('#'+objID).html();
    var imgsrc = './assets/images/spinner.gif';
    
    if (typeof withInput == 'undefined') { 
        $('#'+objID).html('<img src="'+imgsrc+'" />');
    } else {
        $('.contentLoading').show();
    }
    $.ajax({
       type: "POST",
       url: url,
       data: data, 
       success: function(response){
    newwin=window.open(url,'windowname', params);
    if (window.focus) {newwin.focus()}
          $('#'+objID).html(response);
          if ($('.contentLoading').css('display')!='none') $('.contentLoading').hide();
       },
        error:function (xhr, ajaxOptions, thrownError){
            $('#'+objID).html(oldHtml);
            alert('Error code: '+xhr.status);
            if ($('.contentLoading').css('display')!='none') $('.contentLoading').hide();
        }
    });
    return false;
}
