$(document).ready(function() {
	var slideShow = new Array();
	slideShow[0] = '<a href="#" target="_blank"><img src="/images/slideshow01.jpg"></a>';
	slideShow[1] = '<a href="#" target="_blank"><img src="/images/slideshow02.jpg"></a>';
	slideShow[2] = '<a href="#" target="_blank"><img src="/images/slideshow03.jpg"></a>';
	slideShow[3] = '<a href="#" target="_blank"><img src="/images/slideshow04.jpg"></a>';
	slideShow[4] = '<a href="#" target="_blank"><img src="/images/slideshow05.jpg"></a>';
	slideShow[5] = '<a href="#" target="_blank"><img src="/images/slideshow06.jpg"></a>';
	slideShow[6] = '<a href="#" target="_blank"><img src="/images/slideshow07.jpg"></a>';
	
	shuffle(slideShow);
	$("#coin-slider").html(slideShow.join(""));
	
	$('#coin-slider').coinslider({ width: 960, height: 231, navigation: false, delay: 5000, links: false, effect: 'random' });
	
	// Button
	$(".btn").hover(
		function(){
			$(this).removeClass('ui-state-default');
			$(this).addClass('ui-state-hover');
		},
		function(){
			$(this).removeClass('ui-state-hover');
			$(this).addClass('ui-state-default');
		}
	);
	
	// Corner Inputs
	$('form input:text').addClass('text ui-widget-content ui-corner-all');
	$('form input:password').addClass('text ui-widget-content ui-corner-all');
	$('form input:checkbox').addClass('checkbox ui-widget-content ui-corner-all');
	$('form input:radio').addClass('radio');
	$('form textarea').addClass('textarea ui-widget-content ui-corner-all');
	$('form select').addClass('select ui-widget-content ui-corner-all');

	$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
		.find(".portlet-header")
			.addClass("ui-widget-header ui-corner-all")
			.end()
		.find(".portlet-content");
});

function shuffle(ary) {
	var s = []; while (ary.length) s.push(ary.splice(Math.random() * ary.length, 1)); while (s.length) ary.push(s.pop());
}
