// JavaScript Document

$(document).ready(function()
{
	$(".sanphamhot").jCarouselLite({
		auto:800,
		speed:3000,
		visible:5
	});
});

tinyMCE.init({

// General options
//convert_urls : false,
relative_urls : true,
document_base_url : "http://localhost/testmvc/",
mode : "textareas",

theme : "advanced",
 skin : "o2k7",
 invalid_elements : "div,script,abbr,acronym,address,applet,area,bdo,big,blockquote,button,caption,cite,code,col,colgroup,dd,del,dfn,iframe,input,ins,isindex,kbd,label,legend,map,menu,noscript,object,optgroup,option,param,textarea,var,ruby,samp,select,rtc",	
plugins : "safari,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",

// Theme options

theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect", 
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist|,link,unlink,anchor,image,cleanup,|,preview,|,forecolor,backcolor", 
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,formatselect", 

theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,
// Office example CSS
content_css : "css/content.css",
template_external_list_url : "js/template_list.js",
external_link_list_url : "js/link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});

$(document).ready(function()
{
	$(".datePicker").datePicker({startDate:'01/01/1970'})
					.val(new Date().asString());
});

$(document).ready(function()
{
	$(".tab1").click(function()
	{
		$(".tab1").each(function()
		{
			$("#" + $(this).attr("rel")).hide();
			$(this).attr({"id":"none"});
		});
		$("#" + $(this).attr("rel")).show();
		$(this).attr({"id":"active"});
		return false;
	});
});

$(document).ready(function()
{
	$(".top_item_link").hover(function()
	{
		$(".group_top_item").hide();
		$("." + $(this).attr("rel")).show();
	}, function()
	{
	});
});
$(document).ready(function()
{
	$(".imageTooltip").tooltip({
		delay:0,
		showURL:false,
		bodyHandler: function()
		{
			return $("<img/>").attr("src", $(this).attr("rel"));
		}
	});
});
