// JavaScript Document
function IncludeJavaScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"></scr' + 'ipt>'); 
}

function IncludeCSS(cssFile)
{
  document.write('<link href="'
    + cssFile + '" rel="stylesheet" type="text/css" />'); 
}

		IncludeCSS('/js/css/cupertino/jquery-ui-1.8.4.custom.css');
		IncludeJavaScript('/js/jquery-ui-1.7.3.custom.min.js');
		IncludeJavaScript('/js/referfriend.js');

$(function(){
	var currentTime = new Date();
	$("#current_year").text(currentTime.getFullYear());
	
	$("#nav ul li.submenu").hoverIntent( 
		function () {
			$(this).addClass("nav_selected");
			$("#nav ul li.nav_selected ul").show('normal');
		}, 
		function () {
			$("#nav ul li.nav_selected ul").hide('normal');
			$(this).removeClass("nav_selected");
		}
	);

	$(".img_nav ul li.submenu").hoverIntent(
		function () {
			$(this).addClass("nav_selected");
			$(".img_nav ul li.nav_selected ul").show('normal');
		}, 
		function () {
			$(".img_nav ul li.nav_selected ul").hide('normal');
			$(this).removeClass("nav_selected");
		}
	);
	
		$('#cycle_rotation').cycle({ 
				fx:     'fade', //how the slides change. Can also use
				speed:   1500, //how quickly the slides change. In milliseconds
				timeout: 6000, //how long slide is displayed before change. In milliseconds
				pager:  '#cycle_nav', //id for the rotation navigation
				pause:   1 //slides pause when moused over.  change to 0 for no pause
		});



});


function SendLink() {

}


function openWindow(theURL,features) {
	window.open(theURL,'myWindow',features);
}

/* functions used for share */
	function get_url() {
		return window.location;
	}
	
	function get_pretty_url() {
		var page_url = get_url();
		var pretty_page_url = escape(page_url);
		pretty_page_url = pretty_page_url.replace(/\+/g, "%2B");
		pretty_page_url = pretty_page_url.replace(/\//g, "%2F");
		window.location = 'http://www.addtoany.com/share_save?linkname=&amp;linkurl='+pretty_page_url;
		return false;
	}	
