$(function () {
					    var tabContainers = $('div.tabs > div');
                        tabContainers.hide().filter(':first').show();
                        
                        $('div.tabs ul.tabNavigation a').click(function () {
                                tabContainers.hide();
                                tabContainers.filter(this.hash).show();
                                $('div.tabs ul.tabNavigation a').removeClass('selected');
                                $(this).addClass('selected');
                                return false;
                        }).filter(':first').click();
                });


    $(document).ready(function(){ 
        $("ul.sf-menu").supersubs({ 
            minWidth:    9,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
    }); 
	    $(document).ready(function(){ 
        $("ul.v-menu").supersubs({ 
            minWidth:    9,   // minimum width of sub-menus in em units 
            maxWidth:    12,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
    }); 
		
function popup(k){
var newWindow=window.open(k,"","Left=80,Top=60,scrollbars, resizable=yes, width=720, height=550");
if (parseInt(navigator.appVersion) >= 4) {
	newWindow.window.focus();
	}
}

$(document).ready(function() {
	  $('.books').cycle({
		    fx:     'fade', 
			speed: 2500,
		    timeout: 0,
			next:   '#next2', 
		    prev:   '#prev2',
			before:   onBefore
	});
});

$(document).ready(function() {
 $('#newsitems').cycle({ 
    fx:     'scrollUp', 
    timeout: 5000, 
    delay:  -2000,
	height: 190,
	pause: true,
	next:   '#next1', 
	prev:   '#prev1'
});
});

function onBefore() { 
    $('#output').html(this.title);
   
}

$(document).ready(function(){ 
$(window).scroll(function()
	{
  		$('#message_box').animate({top:$(window).scrollTop()+"px" },{queue: false, duration: 350});  
	});
    //when the close button at right corner of the message box is clicked 
	$('#close_message').click(function()
	{
  		//the messagebox gets scrool down with top property and gets hidden with zero opacity 
		//$('#message_box').animate({width:"-=100%",opacity:0}, "slow");
                $('#message_box').animate({ top:"+=15px",opacity:0,width:"-=100%" }, "slow");
	});
})



