//Adapt config
var ADAPT_CONFIG = {
   path: 'css/',
   dynamic: true,
   range: [
      '241 to 960px   = mobile.css',
      '960px		    = 960.css'
   ]
};

//yepnope config
yepnope([{
   load: 'http://code.jquery.com/jquery-1.6.1.min.js',
   callback: function (url, result, key) {
      if (!window.jQuery) {
         yepnope('domains/24hourlocksmiths.com.au/js/jquery-1.6.1.min.js');
      }
   }
}, {
   load: 'domains/24hourlocksmiths.com.au/js/jquery-plugins.js',
   callback: function (url, result, key) {
      
      $(document).ready(function() {
         
         $('#brandCarousel').jcarousel({
            "wrap": "circular"
         });
                                    
         function show() {
            var menu = $(this);
            menu.children("ul").slideDown();
            $('#mainPromo').animate({"opacity":0.25});
         }
      
         function hide() { 
            var menu = $(this);
            menu.children("ul").slideUp(250);
            $('#mainPromo').animate({"opacity":1});         
         }

         $("li.services").hoverIntent({
            sensitivity: 1,
            interval: 50,
            over: show,
            timeout: 300,
            out: hide
         });
         
         
         function mobNavShow() {
            // $("li.services ul").animate({"height": "250", useTranslate3d:true }, 1500);
            $("li.services ul").slideDown(250);
            return false;            
         }
         function mobNavHide() {
            // $("li.services ul").animate({"height": "0", leaveTransforms:true }, 1500);            
            $("li.services ul").slideUp(250);
            return false;            
         }
         
         $('#openMobNav').toggle(mobNavShow, mobNavHide);    
      
      

      });
   }
   
}]);

// , {
//    test: Modernizr.geolocation,
//    yep : 'js/geo.js',
//    nope: 'js/geo-polyfill.js', 
//    callback: function(url, result, key) {
//       
//    }

// Scroll past menubar on iPhone
addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);

function hideURLbar(){
   window.scrollTo(0,1);
}


