// JavaScript Document
//Mypod Pod page init
            $(function()
			{
				// this initialises the  scollpanes on the page.
				$('#pane').jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
				
				// fix miscalculated values in jScrollPane initialization
				$('div.TabbedPanelsContent').each(function(){
					$(this).show();
					$('div.scroll-pane2', this).jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
					$(this).hide();
				})
				.eq(0).show(); // show the first one
			});

// NEWS CLIP REGION
$(document).ready(function() {
	
	// MENU		
	$(".nav")
	.superfish({
		animation : { opacity:"show", height:"show" }
	})
	.find(">li:has(ul)")
		.mouseover(function(){
			$("ul", this).bgIframe({opacity:false, src:'#'});
		})
		.find("a")
			.focus(function(){
				$("ul", $(".nav>li:has(ul)")).bgIframe({opacity:false});
			});		
	//NewsLinks 
		
	
 	$('.newslink').ajaxContent({
			loaderType:'img',   
            loadingMsg:'/images/ajax-barloader.gif',
			target:'#newsregion'
		});

  
	// Cat Ajax
	$('.cati').ajaxContent({
	  loaderType:'img',   
          loadingMsg:'/images/ajax-barloader.gif',
		  //beforeSend:function(obj,target){
          //          stp_plyr();
          // },
		  //debug: true,
	  target:'#podcontainer'
          });

	
    	// open window
	$('a.newwin').click(function() {
    var href = $(this).attr('href');
    window.open(href, 'AD',
    'height=600,width=600,scrollbars=yes,toolbar=no');
    return false;

  });
  					   
	// password
	$('#password-clear').show();
    $('#Password').hide();

/*
	$('#password-clear').mouseover(function() {
		$('#password-clear').hide();
		$('#Password').show();
		$('#Password').focus();
	});
	*/
    $('#password-clear').focus(function() {
		$('#password-clear').hide();
		$('#Password').show();
		$('#Password').focus();
	}); 

	$("#prereg").dialog({ modal: true, hide: 'close', height: 440, width: 800 });

	// end onload
	   
	});

// dropdown
function submit_newssel() {	
		var options = { 
        target:        '#newsregion'};
		$('#newslink2').ajaxForm(options);
		$('#newslink2').ajaxSubmit(options);
	 	//return false;
	}
	// $('#newslink2').ajaxForm(options);
	 