$(document).ready(function() {
    $('#mycarousel').jcarousel({scroll: 4});
	
    $("#mycarousel ul img").live('mouseover', function() {
		$('#scrollDivContent').html($(this).parent().attr('title'));
		$('#scrollDivContentExcerpt').html($(this).parent().attr('excerpt'));
	}).first().trigger('mouseover');
	
	$('#mycarousel2').jcarousel({scroll: 2});
	$('#mycarousel3').jcarousel({scroll: 1});
	
	$('li.navMore').hover( function(){
		 $('ul.navMoreUl').toggle();
	       
	    });	
	 $('ul.navMoreUl').mouseenter( function(){
		 $(this).show();
	 }).mouseleave( function(){
		 $(this).hide();
	 });
	 
	// This function is for user hover in header// 
	var Div3 = $( "div.div3" );
    $( "#lgHover" ).click( function( e ) {
        if( Div3.is( ':hidden' ) ) {
            Div3.show();
        }
    });
    $( "div.div3" ).mouseleave(function(){
        $( "div.div3" ).hide();
        $( "div.brLogo" ).hide();
    });
	
});


//This function is used to make rounded images. It also uses jQuery
//ref: http://www.webdesignerwall.com/tutorials/css3-rounded-image-with-jquery/
$(document).ready(function() {
 $(".rounded-img-50, .rounded-img-50-vb, .owner-img-30, .contributer-img-30, .rounded-img-40, .owner-img-45, .rounded-img-45, .en-rounded-img-40").load(function() {
     $(this).wrap(function(){
         return '<span class="' + $(this).attr('class') + '" style="background:url(' + $(this).attr('src') + ') no-repeat center center; width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;" />';
     });
     $(this).css("opacity","0");
 });
});

