/* MENU FUNCTION */

$(function() {
    $('#clients').cycle({
        fx:     'scrollHorz',
        speed:  1000,
        timeout: 8000,
        prev:   '#cycle-prev', 
    	next:   '#cycle-next',
		slideExpr: 'div.row'
    });
});

$(function() {
    $('#theNews').cycle({
        fx:     'scrollVert',
        speed:  1000,
        timeout: 8000,
		slideExpr: 'div.NewsSummary'
    });
});

$(document).ready(function(){

	$(" #header .nav li ul").css({display: "none"}); // Opera Fix
	$(" #header .nav li").hover(function(){
        $(this).find('ul:first').css({visibility: "visible",display: "none"}).show(200);
        },function(){
        $(this).find('ul:first').css({visibility: "hidden"});
        });

	$(".various1").click(function() {
				thetitle = $(this).attr('title');
				$("#ipapername").text(thetitle);
				$("#ipaper-hidden").val(thetitle);

                 return false;
            });	
		
	$(".various1").fancybox();
		
	$("#movie").click(function() {
                 $.fancybox({
                  'padding'             : 0,
                  'autoScale'   		: false,
                  'transitionIn'        : 'elastic',
                  'transitionOut'       : 'elastic',
                  'title'               : this.title,
                  'width'               : 680,
                  'height'              : 495,
                  'href'                : this.href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/') + '&autoplay=1',
                  'type'                : 'swf',    // <--add a comma here
                  'swf'					: {
				  'allowfullscreen'		: 'true'
				  }
                  });
                 return false;
            });
});



	
