/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



jQuery(document).ready(function(){

    //twitter
    jQuery("#twitter").getTwitter({
        userName: "mooiut",
        numTweets: 5,
        loaderText: "Loading tweets...",
        slideIn: true,
        slideDuration: 750,
        showHeading: false,
        headingText: "Latest Tweets",
        showProfileLink: false,
        showTimestamp: false
    });
    //fancybox
    if ( jQuery("a.toEnlarge").length > 0 ) {
        jQuery("a.toEnlarge").fancybox({
            'transitionIn'	:	'elastic',
            'transitionOut'	:	'elastic',
            'speedIn'		:	600,
            'speedOut'		:	200,
            'overlayShow'	:	false
        });
    }
    jQuery('.picts-only .poLink').each(function(index) {
        var linkurl = jQuery(this).attr('href');

        jQuery(this).parent().parent().bind('click', function() {
            document.location.href = linkurl;
        });
    });
    //menu hover fix
    jQuery("#navi01 li").bind('mouseover', function(i) {
       currentAct = jQuery("#navi01 li.act").index();
       currentIndex = jQuery(this).index();
       if(currentAct == currentIndex - 1 && currentIndex != 5 ) {
       jQuery(this).addClass('noleft');
       }
       if(currentAct == 4 && currentIndex == 3) {
           jQuery(this).addClass('noright');
       }
       if(currentAct == currentIndex + 1 ) {
           jQuery(this).addClass('noright');
       }
});
});

