<script type="text/javascript">
$(document).ready(function () {
var yOffset = $("div#menu").offset().top;
$(window).scroll(function () {
if ($(window).scrollTop() > yOffset) {
$("div#menu").css({
'width': $(".d960").width() * 0.3,
'top': 0,
'left': $("div#menu").offset().left,
'right': $("div#menu").offset().right,
'position': 'fixed',
});
} else {
$("#menu").css({
'width': "100%",
'top': yOffset + 'px',
'left': 0,
'right': 0,
'position': 'static'
});
}
});
});
</script>
<div id="menu" style="z-index:999; float:left; ">
<div id="nav">
<ul>
<li>
<a href="#"><?php echo $labels['l_menu_immobili']?></a>
<ul class="fallback">
<li><a href="<?php echo $_SESSION["www"]["lang"] ?>/products/287/commerciale"><?php echo $labels['l_menu_commerciale']?></a></li>
<li><a href="<?php echo $_SESSION["www"]["lang"] ?>/products/288/industriale"><?php echo $labels['l_menu_industriale']?></a></li>
<li><a href="<?php echo $_SESSION["www"]["lang"] ?>/products/360/residenziale"><?php echo $labels['l_menu_residenziale']?></a></li>
<li><a href="<?php echo $_SESSION["www"]["lang"] ?>/products/369/terreni"><?php echo $labels['l_menu_terreni']?></a>
//resto del codice...