/*$(function() {
	
	if ($('#rotator').length > 0)
	{
    	$('#rotator').cycle({ 
    		fx: 'fade', 
    		speed: 1000, 
    		timeout: 5500
    	});
	}
	
});
*/
$(document).ready(function() {
	
		
	if ($('#rotator').length)
	{
    	$('#rotator').cycle({ 
    		fx: 'fade', 
    		speed: 1000, 
    		timeout: 5500
    	});
	}
	
	
	// Clear the searchfield on focus
	$('#q').click(function() {
		$(this).val('');
	});
	
	// If javascript is available void the href for the q link
	$('a#quicklink').removeAttr('href');
	
	/* Image Rollovers */			
	$(".rollover a").hover(
	      function () {
			var i = $(this).children("img").attr("src").replace("off", "on");
	        $(this).children("img").attr("src", i);
	      }, 
	      function () {
	        var i = $(this).children("img").attr("src").replace("on", "off");
	        $(this).children("img").attr("src", i);
	      }
	 ); /* End Image Rollovers */
	
	$(".qroll a").hover(
	      function () {
			var i = $(this).children("img").attr("src").replace("off", "on");
	        $(this).children("img").attr("src", i);
	      }, 
	      function () {
			
	      }
	 ); /* End Image Rollovers */
	
	$("a#quicklink").hover(
		function() {
			$(this).css("cursor", "pointer");
		},
		function() {
			$(this).css("cursor", "crosshair");
		}
	);
	// On click show hide the navbar
	var qlink = $('#qlink-list').hide();
	$('a#quicklink').click(function(){
	   var vis = qlink.is(':visible');
	   qlink[ vis ? 'hide' : 'show' ]();
	   if (vis)
	   {
	   		$("img#ql").attr("src", "_xbase/images/shared/qlinks-off.gif");
			$("#quicklink").html("Quicklinks +");
	   }
	   else
	   {
	   		$("img#ql").attr("src", "_xbase/images/shared/qlinks-on.gif");
			$("#quicklink").html("Quicklinks -&nbsp;");
	   }

	}); /* End navbar */
	
	
	// Show hide
	var sh = $(".listing p").show();
	$("a.showhide").click(function() {
		var vis = sh.is(':visible');
		sh[ vis ? $('a.showhide').html('ABSTRACT VIEW') : $('a.showhide').html('LIST VIEW')];
		sh[ vis ? 'hide' : 'show']();
		
		
		return false;
	});
	
	var showHide = $(".abstractOnOff").show();
	$("a.toggleAbsract").click(function() {
	   $(".profileAbstract").toggle();
	   return false;
	});
	// $(".showandhide h4>p");
	
	// Video--Popup
	// $('#dialog').jqm();
	
});
