$(window).load(function(){
$('#loaderIcon').delay(800).hide();
 $('.image_carousel').delay(1500).css('visibility','visible');
 $('#switcher').delay(5000).show();	

});
$(document).ready(function() {
//$("#main").append('<div class="credit ui-widget-header ui-corner-all"><a href="http://www.jalbumskins.com/carousel">Un-Registered Version<br />Carousel by DrMikey</a></div>').delay(3000);$(".credit").delay(5E3).fadeTo("slow",0.5);$(function(){$(".credit").mouseenter(function(){$(this).fadeTo("fast",1)}).mouseleave(function(){$(this).fadeTo("fast",0.5)})});

$.reject({closeCookie: true // Set cookie to remmember close for this session
}); 

jQuery.fn.fadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle'}, speed, easing, callback);  
};
	 var $box = $('#help')
  $('#info').click(function() {
    $box.fadeToggle('slow');  
  });
  
  		

  $(function() {
		$(".pagination a")
		.mouseenter(function() {
			$(this).addClass('ui-state-active');
		})
		.mouseleave(function() {
			$(this).removeClass("ui-state-active");
		});	
		
	});
	
	
	/*	CarouFredSel: an infinite, circular jQuery carousel.
	Configuration created by the "Configuration Robot"
	at caroufredsel.frebsite.nl
*/

	
/*	CarouFredSel: an infinite, circular jQuery carousel.
	Configuration created by the "Configuration Robot"
	at caroufredsel.frebsite.nl
*/


$("#carousel").carouFredSel({
	
	circular		: true,
	infinite		: true,
	direction		: "left",
	width			: "null",		// automatically calculated
	height			: "auto",		// automatically calculated
	align			: "center",
	synchronise		: null,

	items: {
		visible: 2,
		minimum			: null,		//	items.visible + 1
		start			: 0,
		width: "variable",
		height: "variable"
	},
		
	scroll		: {
	wipe:	false,
	mousewheel: true,
		easing: "easeInQuad",
		duration: 500,
		pauseDuration	: 2000,
		pauseOnHover	: true,
		items			: null,		//	items.visible
		fx				: "scroll",
		easing			: "swing",
		duration		: 500,
		pauseOnHover	: false,
		queue			: false
	
	},
	auto		: {
		play			: true,
		pauseDuration	: 3000,		//	5 * auto.duration
		delay			: 1000,
		items			: 2,		//	scroll.items
		fx				: "scroll",		//	scroll.fx
		easing			: "easeInQuad",		//	scroll.easing
		duration		: 1000,		//	scroll.duration
		pauseOnHover	: "resume",		//	scroll.pauseOnHover
		queue			: null,		//	scroll.queue
		mousewheel		: null,		//	scroll.mousewheel
		conditions		: null		//	scroll.conditions
		
	
	},
	prev		: {
		button		: "#carousel_prev",
		fx			: "scroll",
		key			: "left",
		items		: 2,
		fx				: "scroll",		//	scroll.fx
		easing		: "easeInQuad",
		duration	: 750,
		pauseOnHover	: true,		//	scroll.pauseOnHover
		queue			: null,		//	scroll.queue
		mousewheel		: true,		//	scroll.mousewheel
		conditions		: null		//	scroll.conditions
	
	},
	next		: {
		button		: "#carousel_next",
		fx			: "scroll",
		key			: "right",
		items		: 2,
		fx				: "scroll",		//	scroll.fx
		easing		: "easeInQuad",
		duration	: 750,
		pauseOnHover	: true,		//	scroll.pauseOnHover
		queue			: null,		//	scroll.queue
		mousewheel		: true,		//	scroll.mousewheel
		conditions		: null		//	scroll.conditions
	
	},
	pagination	: {
		container	: "#carousel_pag",
		keys		: true,
		fx			: "scroll",		//	scroll.fx
		easing		: "easeInQuad",
		duration	: 1000,
		pauseOnHover	: null,		//	scroll.pauseOnHover
		queue			: null,		//	scroll.queue
		mousewheel		: null,		//	scroll.mousewheel
		conditions		: null		//	scroll.conditions
		}
});
$("#carousel_play").click(function() {
    $("#carousel").trigger("play", true).trigger("next");
    $(this).hide().next().show();
    return false;
});
$("#carousel_pause").click(function() {
    $("#carousel").trigger("pause", true);
    $(this).hide().prev().show();
    return false;
}).hide();
$("#carousel a[rel^='prettyPhoto']").prettyPhoto({
				slideshow: 3000, /* false OR interval time in ms */				
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 15, /* padding for each side of the picture */
				opacity: 0.70, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				autoplay: false, /* Automatically start videos: True/False */
				autoplay_slideshow: false, /* true/false */
				default_width: 500,
				default_height: 344,
				allowresize: true, /* true/false */
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
				hideflash: true, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
				wmode: 'opaque', /* Set the flash wmode attribute */
				keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
				modal: false, /* If set to true, only the close button will close the window */
				deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
				overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
				ie6_fallback: true,
				social_tools: false, /* html or false to disable */
				changepicturecallback: function() {
		$("#carousel").trigger("pause");
	},
	callback: function() {
		  $("#carousel").trigger("play");
	}
			});
			
$('#switcher').themeswitcher();
});



