jQuery(document).ready(function(){

// sidebar accordion
	jQuery("#Sidebar").accordion({
		header:'h4',
		autoHeight: false,
		collapsible: true
	});
	
// disclaimer accordion
	jQuery("#disclaimer").accordion({
		event: 'mouseover',
		active: false,
		header: '#clickdisc',
		autoHeight: false,
		collapsible: true
	});

// newsletter toggle area
	function addDrop1(){
		jQuery("#secondary").fadeIn("slow");
		jQuery(".smalltab").addClass('hovertab');
	}
	
	function removeDrop1(){
		jQuery("#secondary").fadeOut("slow");
		jQuery(".smalltab").removeClass('hovertab');
	}
	
	jQuery('.smalltab').mouseenter(addDrop1);
	jQuery('#secondary').mouseleave(removeDrop1);
	

// fader
	jQuery('.testimonial').cycle({
		fx: 'fade',
		speed: 500,
		timeout: 9000,
		pause: true,
		next: '.next1',
		prev: '.prev1',
		fit: 1
	});

	
// newsletter submit image replace
	jQuery('input[cm-ajax-submit]').addClass('side-submit');


// tabs
	jQuery(function() {
		jQuery("#tabs").tabs();
	});

// testimonial pagination
	jQuery('#postPagination a').live('click', function(e) {
		e.preventDefault();
		var link = jQuery(this).attr('href');
		jQuery('#testimonial-block').fadeOut(500).load(link+' #testimonial-inner', function(){
			jQuery('#testimonial-block').fadeIn(500);
		});
	});
	
// aw showcase
	jQuery('#showcase').awShowcase({
		content_width:			500,
/* 		content_height:			500, */
		hundred_percent:		false,
		auto:					false,
		interval:				3000,
		continuous:				false,
		loading:				true,
		tooltip_width:			200,
		tooltip_icon_width:		32,
		tooltip_icon_height:	32,
		tooltip_offsetx:		18,
		tooltip_offsety:		0,
		arrows:					true,
		buttons:				true,
		btn_numbers:			false,
		keybord_keys:			true,
		mousetrace:				false,
		pauseonover:			true,
		transition:				'hslide', /* hslide/vslide/fade */
		transition_delay:		300,
		transition_speed:		500,
		show_caption:			'onhover', /* onload/onhover/show */
		thumbnails:				true,
		thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
		thumbnails_direction:	'horizontal', /* vertical/horizontal */
		thumbnails_slidex:		1, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
		dynamic_height:			true,
		speed_change:			true,
		viewline:				false
	});

});

