$(document).ready(function(){

	$("#myController").jFlow({
		slides: "#mySlides",
		width: "100%",
		height: "260px",
		duration: 400
	});
});

function showContactForm(){
	if(document.getElementById('contact_div').style.display == "block"){
		$("#contact_div").slideUp();
		$("#contactBTN").attr('src','/images/btn_contact.jpg');
	} else {
		$("#contact_div").slideDown();
		$("#contactBTN").attr('src','/images/btn_close_panel.jpg');
	}
}

function tabDo(var1,var2){
		if(var2=="on"){
		document.getElementById(var1).style.background = "url(/images/menu_on_bg.jpg) no-repeat top";
		document.getElementById(var1).style.cursor = "pointer";
		document.getElementById(var1).style.color = "#feffff";
		} else { 
		document.getElementById(var1).style.background = "" ;
		document.getElementById(var1).style.cursor = "pointer";
		document.getElementById(var1).style.color = "#c1e1f3";
		 }
	}
	

function getFolio(category,year){
					
					$('#current_folio_holder').html(" "); //empty current contents
					$('#test').append(' <div id=loading2 align=center> <img src="/images/ajax-loader.gif"> </div>'); //show loading image/text.
					
					$.ajax({  //get stuff from database through file getFolio.php
					url: '/js/getFolio.php', //file location
					type: 'POST',
					data: 'cat=' + category + '&year=' + year, // pass variable to getFolio.php
					
					success: function(result) 
						{
								$('#loading2').fadeOut(500, function() {
									$(this).remove();
								});
								$('#current_folio_holder').append( result );
						}
					});
					
			}
			
function showFolioItem(folioID){
					
					$('#portfolio_container').html(" "); //empty current contents
					$('#test').append(' <div id=loading align=center> <img src="/images/ajax-loader.gif"> </div>'); //show loading image/text.
					
					$.ajax({  //get stuff from database through file getFolio.php
					url: '/js/getFolioItem.php', //file location
					type: 'POST',
					data: 'id=' + folioID , // pass variable to getFolio.php
					
					success: function(result) 
						{
								$('#loading').fadeOut(500, function() {
									$(this).remove();
								});
								$('#portfolio_container').append( result );
						}
					});
					
			}
/*
$(function() {
        $('#portfolio_container a[rel="lightbox"]').lightBox();
    });*/
