var name1 = "#floatMenu1";
var menuYloc = null;
var name2 = "#floatMenu2";
var menuYloc2 = null;

$(document).ready(function () {
    
    //menuYloc = parseInt($(name1).css("top").substring(0,$(name1).css("top").indexOf("px")))
    //$(window).scroll(function () { 
    //    offset = menuYloc+$(document).scrollTop()+"px";
    //    $(name1).animate({
    //        top:offset
    //    },{
    //        duration:500,
    //        queue:false
    //    });
			
    //});
			
    //menuYloc2 = parseInt($(name2).css("top").substring(0,$(name2).css("top").indexOf("px")))
    //$(window).scroll(function () { 
    //    offset = menuYloc2+$(document).scrollTop()+"px";
    //    $(name2).animate({
    //        top:offset
    //    },{
    //        duration:500,
    //        queue:false
    //    });
			
    //});
			
    ddsmoothmenu.init({
        mainmenuid: "main_nav", //menu DIV id
        orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
        classname: 'ddsmoothmenu', //class added to menu's outer DIV
        //customtheme: ["#1c5a80", "#18374a"],
        contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
    })
});

$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'fade', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed:800, // Slide transition speed
        pauseTime:6000, // How long each slide will show
        startSlide:0, // Set starting Slide (0 index)
        directionNav:false, // Next & Prev navigation
        directionNavHide:true, // Only show on hover
        controlNav:false, // 1,2,3... navigation
        controlNavThumbs:false, // Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, // Use image rel for thumbs
        keyboardNav:false, // Use left & right arrows
        pauseOnHover:false, // Stop animation while hovering
        manualAdvance:false, // Force manual transitions
			    
    });
    $("a[rel]").overlay({
	 
        mask: 'white',
        effect: 'apple',
	 
        onBeforeLoad: function() {
	 
            // grab wrapper element inside content
            var wrap = this.getOverlay().find(".contentWrap");
	 
            // load the page specified in the trigger
            wrap.load(this.getTrigger().attr("href"));
        }
	 
    });
});
