$(document).ready(function() {
	$('#navigation ul li').navtabHover();
	// --- Navigation Digger
	$("#navigation ul li").click(function(){ window.location=$(this).find("a").attr("href");return false; });
	
	$('[-fb] a, [-tw] a, [-yt] a').append('<span class="hover"></span>').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			$span.stop().fadeTo(500, 1);
		}, function () {
			$span.stop().fadeTo(500, 0);
		});
	});
	
	$("#home-rotator").SexySlider({
        width     : 1000,
        height    : 340,
        delay     : 4000,
        strips    : 1, // <-- this do the trick
        autopause : false,
        control   : '#control',
        effect    : 'random'
	});
	
	$("#shop-rotator").SexySlider({
        width     : 1000,
        height    : 340,
        delay     : 3000,
        strips    : 1, // <-- this do the trick
        autopause : false,
        control   : '#shop-control',
        effect    : 'random'
	});
	
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
	
	// --- Date Picker
	$("#datepicker").datepicker();
	
	// --- Dynamic Login.Box
	$("a[rel='day_view']").colorbox({width:"740px", height:"650px", iframe:true});
	
	// --- Tiny MCE Setup
	$('textarea.tinymce').tinymce({
			// Location of TinyMCE script
			script_url : 'js/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,link,unlink,anchor,image,cleanup,help,code,|,preview,|,forecolor,backcolor",
			theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,cite,abbr,acronym,del,ins,attribs|,outdent,indent,blockquote,|,undo,redo,",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,

			// Example content CSS (should be your site CSS)
			content_css : "css/style.main.css",

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",
			
		});
});
// JavaScript Document
