function genPath(str) {

    str = str.replace(/[^a-zA-Z +0-9]/g,'');
    str = str.replace(/\+/g,"-");
    str = str.replace(/  /g," ");
    str = str.replace(/ /g,"-");

    return str.toLowerCase();

}

$(document).ready(function() {
   //$(".subnav").hide();

   $(".tabs li").hover(function() {
        $(".subnav").hide(); // hide any open sub menus
        if ($(this).children(".subnav").length) {
            //var pos = $(this).position();
            var h = $(this).height();

            //$("#subnav").css("top","40px").css("left","0px").show();

            var pos = $(this).offset();
            var pos2 = $(this).position();
            var wid = 211;
            var doc = document.width;

            if ($.browser.msie) {
                doc = $(window).width();
            }

            if (pos.left+wid > doc) {
                var diff = doc - (pos.left+wid);
                //var left = pos2.left + diff - $(this).width() + 4;
                var left = (pos2.left + $(this).width()) - wid;
            } else {
                var left = pos2.left;
            }

            $(this).children(".subnav").css("top", (pos2.top+h)+"px").css("left", (left)+"px").show();
        }
    }, function() {
       $(this).children(".subnav").hide(); // hide sub menu
    });

    if ($(".slider").length) {
        //$(".slider").easySlider({controlsShow:false, auto:true, continuous:true, pause:4000});
        $('.slider').cycle({
            fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
            timeout:  6000,
            speed:  3000
	});
    }


});


