/**************************************************************************
 *  JAVASCRIPT MENU HIGHLIGHTER v.1.5 (080929)                            *
 * ©2005 Media Division (www.MediaDivision.com)                           *
 * Written by Marius Smarandoiu & Armand Niculescu                        *
 **************************************************************************/
function extractPageName(hrefString)
{
	var arr = hrefString.split('/');
	return  (arr.length<2) ? hrefString : arr[arr.length-2].toLowerCase() + arr[arr.length-1].toLowerCase();               
}

function setActiveMenu(arr, crtPage)
{
	for (var i=0; i<arr.length; i++)
	{
		if(extractPageName(arr[i].href) == crtPage)
		{
			if (arr[i].parentNode.tagName != "DIV")
			{
				arr[i].className = "current";
				//arr[i].parentNode.className = "current";
			}
		}
	}
}

function setPage()
{
	hrefString = document.location.href ? document.location.href : document.location;

	if (document.getElementById("thumbs")!=null)
		setActiveMenu(document.getElementById("thumbs").getElementsByTagName("a"), extractPageName(hrefString));
}
//<![CDATA[
$(document).ready(function(){


// Cycle gallery
	$('#slides').cycle({ 
		fx:    'fade',
		speed:  700,
		timeout: 10000,
		//speedIn:     null,  // speed of the "in" transition 
		//speedOut:    null,  // speed of the "out" transition
		next:   '#next', 
		prev:   '#previous',
		pause:   1, 			//pause: '#pause'
		pager:   '#pager', 
    	pagerEvent: 'mouseover',
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#pager div.trigger:eq(' + idx + ') a'; 
    	} 
	});
	
			
// Current Thumbs

		// to store it in a variable
		/*var loc = window.location;
alert(loc);*/

	/*var scriptname = GetUrlScriptname();
	$('.thumb a[href$="' + scriptname + '"]').parent().addClass('current');
	function GetUrlScriptname() {
		var rex = new RegExp("\\/[^\\/]+\\.\\w+($|\\?)");
		var match = rex.exec(location.pathname);
		return match[0].substring(1);
		}*/
	
	
	
	/*$(".thumb a").addClass(	// "current"
		function(){
			$(this).animate(
				{"opacity": "0.7"},
				{duration: 500}
			);
	});		/
	




// Image Borders

	/*
	$("#left a img , #center a img , #right a img").hover(
		function(){
			$(this).animate(
				{"opacity": "0.7"},
				{duration: 500}
			);
		},
		function(){
			$(this).animate(
				{"opacity": "1"},
				{duration: 500}
			);
	});		*/
	
				
	// transparent hover Panel
	/*$(".slide").hover(
		function () {
		$(this).animate({"opacity": "0.7"}, {duration: "fast"});
		}, 
		function () {
		$(this).animate({"opacity": "1.0"}, {duration: "fast"});
		}
	);
	$("#navigation").hover(
		function () {
		$(this).animate({"opacity": "0.8"}, {duration: "fast"});
		}, 
		function () {
		$(this).animate({"opacity": "1.0"}, {duration: "fast"});
		}
	);*/

}); //close doc ready
//]]>
