jQuery(document).ready(function() {
	jQuery("#slider").slides({
		preload: true,
		preloadImage: '/RNA/RNA_ContemporaryForms_V2/images/2011/slider/loading.gif',
		play: 8000,
		pause: 2500,
		hoverPause: true,
		effect: 'fade',
		animationStart: function(){
					$('.caption').animate({
						bottom:-80
					},100);
				},
				animationComplete: function(current){
					$('.caption').animate({
						bottom:0
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log(current);
					};
				}
	});
	jQuery("#footer-specialty").slides({
		generateNextPrev: true,
		generatePagination: false,
		play: 10000,
		pause: 2500,
		hoverPause: true,
		effect: 'fade'
	});
	jQuery("#pressfeed").rssfeed("http://v2.contemporaryforums.showsite.rxnova.com/feeds/pressindex/2856", {
		limit: 5,
		header: false,
		date: false,
		content: false,
		snippet: false,
		errormsg: "We are sorry, the feed is currently unavailable."
	});
	jQuery("#tabs").tabs();
	jQuery("#tabs-calendar").tabs({
		show: function(event, ui) {
			if (ui.index == 0) {
				jQuery("#tabs-calendar div").removeClass("ui-tabs-hide");
			}
		}
	});
	jQuery(".tooltip-hover").tooltip({effect: 'slide', opacity: 0.8});
	jQuery("ul.list2select").each(function() {
		var select=jQuery(document.createElement('select')).insertBefore(jQuery(this).hide());
		jQuery('>li a', this).each(function() {
			option=jQuery(document.createElement('option')).appendTo(select).val(this.href).html(jQuery(this).html());
		});
		select.change(function(){
			if (this.value == "") {
				window.location.href = this.value;
			} else {
				window.open(this.value, "_blank");
			}
		})
	});
	jQuery("ul.list2select_internal").each(function() {
		var select=jQuery(document.createElement('select')).insertBefore(jQuery(this).hide());
		jQuery('>li a', this).each(function() {
			option=jQuery(document.createElement('option')).appendTo(select).val(this.href).html(jQuery(this).html());
		});
		select.change(function(){
			window.location.href = this.value;
		})
	});
	jQuery("#earnceonline-button").click(function() {
		jQuery("#form_search").submit();
	});
	jQuery("label.select").click(function() {
		var selvalue = jQuery("label.select input[type='radio']:checked").val();
		jQuery("#searchBy").val("" + selvalue);
	});
	var myRandom = Math.floor(Math.random() * jQuery("#conference-quote .quote").length);
	jQuery("#conference-quote .quote:eq(" + myRandom + ")").show();
});
