$(document).ready(function(){

	//prevent right click for downloading images
	$(document).bind("contextmenu",function(e){
        return false;
    });
	
	
	//$('.scroll_pane').jScrollPane({
		//verticalDragMinHeight: 50,
		//verticalDragMaxHeight: 100,
		//horizontalDragMinWidth: 50,
		//horizontalDragMaxWidth: 100
	//});
	
		

	$("ul#menu-main").lavaLamp({
		fx: "backout", 
		speed: 500
	});

    
    $('ul#portal li ul').hide();
    $('ul#portal li.level1 span').click(function() {
    		$(this).next('ul').slideToggle('fast');
    		return false;
	});
	
	
	$('ul#test_projects').hide();
	$('h4.more').click(function() {
    		$('ul#test_projects').slideToggle('slow');
    		return false;
	});
	
	
	$("#quote_slider").cycle({
		fx: 'fade',
		next: '#quote_slider',
		cleartype: 0,
		speed: 600,
		pause: 1,
		timeout: 8000
	});
	
	$("#slider").cycle({
		fx: 'fade',
		pager: '#slider_nav',
		speed: 600,
		pause: 1,
		timeout: 5500
	});
	
	$("#home_slider").cycle({
		fx: 'fade',
		next: '#home_slider',
		speed: 800,
		pause: 1,
		timeout: 2800
	});
	
	$("#portfolio_slider").cycle({
		fx: 'fade',
		next: '#portfolio_slider',
		speed: 800,
		pause: 1,
		timeout: 2800
	});
	

$('#galleria').galleria({
    pause_on_interaction: 'false'
    //on_image: function( image, thumb ) {

        //var gallery = this;

        // image is now the image element and gallery the instance
        //$( image ).click( function() {
            //gallery.openLightbox();
        //})
    //}
});


	$('input[type="text"], textarea').focus(function() {  
		$(this).removeClass("idleField").addClass("focusField");  
		if (this.value == this.defaultValue){  
			this.value = '';  
		}  

		if(this.value != this.defaultValue){  
			this.select();  
		}  
	});  

	$('input[type="text"], textarea').blur(function() {  
		$(this).removeClass("focusField").addClass("idleField");  
		if (this.value == ''){  
			this.value = this.defaultValue;  
		}
	});	
	
	$('.scroll_pane').jScrollPane({
			scrollbarMargin: 10,
			scrollbarWidth: 14,
			showArrows: false,
			wheelSpeed: 10,
			dragMinHeight: 40,
			dragMaxHeight: 150
		});
	

});


	
	

