
// -------------------------------------------------------------------------------------------
// cufon
// -------------------------------------------------------------------------------------------

	Cufon.replace('h1, h2, h3, h4, h5, h6', {
			hover: 'true'
		});
	Cufon.replace('#nav li a', {
			hover: 'true'
		});
	Cufon.replace('.column .box h3', {
			textShadow: '#9FCCF5 .5px 1px'
		});



// -------------------------------------------------------------------------------------------
// menu sidebar
// -------------------------------------------------------------------------------------------

//menu links effects							
							
$(document).ready(function(){

	      $('ul.menu_sidebar li a').hover(function() {
	        $(this).stop().animate({ paddingLeft: '40px', backgroundPosition: '15px' }, 200);
	      }, function() {
	        $(this).stop().animate({ paddingLeft: '35px', backgroundPosition: '10px' }, 200);           
	      });

		
});



	
// -------------------------------------------------------------------------------------------
// forms
// -------------------------------------------------------------------------------------------

//search form

$(document).ready(function() {
	$('#search_form input[type="text"]').focus(function() {
	    if (this.value == this.defaultValue){ 
		this.value = '';
			}
			if(this.value != this.defaultValue){
			this.select();
		}
	});
	$('#search_form input[type="text"]').blur(function() {
	    if ($.trim(this.value) == ''){
			this.value = (this.defaultValue ? this.defaultValue : '');
			}
	});
});

	

// -------------------------------------------------------------------------------------------
// styles switcher sliding
// -------------------------------------------------------------------------------------------


$(document).ready(function(){ 

	$(".styles_switcher").css('top', '-230px');

	$("a.sliding_button").toggle( 
				function () { 
 					$(".styles_switcher").animate({top: "0"}, {queue:false, duration: 1700, easing: 'easeOutQuint'}) 
                }, 
                function () { 
					$(".styles_switcher").animate({top: "-230px"}, {queue:false, duration: 1700, easing: 'easeOutQuint'})  
				} 
		); 
        
}); 


// -------------------------------------------------------------------------------------------
// tooltip
// -------------------------------------------------------------------------------------------

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 10;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn(300);		
	},
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
	});	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
	};



	// starting the script on page load
	$(document).ready(function(){
		tooltip();
	});








//$(function () {
//			$('body img').hide();//hide all the images on the page
//		});
//		
//		var i = 0;//initialize
//		var int=0;//Internet Explorer Fix
//		$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
//			var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
//		});
//
//		function doThis() {
//			var imgs = $('body img').length;//count the number of images on the page
//			if (i >= imgs) {// Loop the images
//				clearInterval(int);//When it reaches the last image the loop ends
//			}
//			$('body img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
//			i++;//add 1 to the count
//		}

