require(['jquery', 'jquery/ui'], function($) {
// Mobile navigation
if ($(window).width() < 768) {
$('.navigation .navigation-list > .level0').each(function() {
var categoryUrl = $('.level-top', this).attr('href');
$('.submenu > .level1.first', this).before('
View All');
$('.level-top', this).attr('href', 'javascript:void(0)');
});
}
// Set the MDF Pre-Approval Form url
$(document).ready(function() {
$('.submenu > .level1 > a').each(function() {
if ($(this).text() == 'MDF Pre-Approval Form') {
$(this).attr({
//'href': '//drive.google.com/file/d/0B1GNG1LVJ74GNk5pdXJFaVhfQlE/view',
'href': 'https://www.orafol.com/fileadmin/americas/downloads/mdf-program/orafol-mdf-pre-approval-form.pdf',
'target': '_blank'
});
}
});
})
// Top links toggles
$('.top-links .account-top').on("click", function() {
if (!$('.account-links-list', this).hasClass("show")) {
$('.account-links-list', this).addClass("show");
} else {
$('.account-links-list', this).removeClass("show");
}
});
$('.cart-top .showcart').on("click", function() {
if ($('.account-top .account-links-list').hasClass("show")) {
$('.account-top .account-links-list').removeClass("show");
}
});
});