This probably wont make a difference, but try to change $(window).load(function() {
to $(document).ready(funciton() {
or $(function() {
Futher reading: window.onload vs $(document).ready()
window.onload is the built-in Javascript event, but as its implementation had subtle quirks across browsers (FF/IE6/IE8/Opera)
Also, make sure you surround your jQuery selectors in a if ($(selector).length)
check, if they are not present on the page, it will cause an error and scripts will stop processing:
$(function() {
if ($('.slider').length) {
$('.slider').flexslider({
animation: "slide",
slideshowSpeed: 6000,
animationSpeed: 800,
pauseOnAction: false
});
};
if ($('.testimonials .flexslider').length) {
$('.testimonials .flexslider').flexslider({
animation: "slide",
slideshowSpeed: 600000,
animationSpeed: 800,
pauseOnAction: false,
directionNav: false
});
};
if ($('.nav li').length) {
$('.nav li').hover(function() {
$('.sub-menu', this).stop(true, true).slideDown();
}, function() {
$('.sub-menu', this).slideUp();
});
});
});