/*
	EXPORAIL RUSSIA 2012 jQuery Functions
	Author: FL1 Group - www.fl1group.com
*/
jQuery(document).ready(function(){
	
	/*----------- Clear text field -----------*/
	
		// hides the slickbox as soon as the DOM is ready
		jQuery('#search-toggle').hide();
		
		// toggles the slickbox on clicking the noted link
		jQuery('a.search-trigger').click(function() {
			jQuery('#search-toggle').toggle();
			return false;
		});
	
	
	/*----------- Clear text field -----------*/
	
		// set all input.text default value according to alt attribute
		jQuery("input#s").each(function(){
			jQuery(this).val(jQuery(this).attr("value")); 																		 	
		});
		
		// clear input.text on focus, if still in default
		jQuery("input#s").focus(function() {
			if(jQuery(this).val()=="Enter keywords here") {
				jQuery(this).val("");
			}
		});
		
		// if field is empty afterwards, add text again
		jQuery("input#s").blur(function() {
			if(jQuery(this).val()=="") {
				jQuery(this).val("Enter keywords here");
			}
		});
	
	/* ------------- Bookmark ------------- */
	  	
		jQuery("#bookmark").jBrowserBookmark();
		
	/* ------------- Zoombox ------------- */
	
	jQuery(function(jQuery){				
		// Set specific options
		jQuery('a.zoombox').zoombox({
			theme       : 'zoombox',	// available themes : zoombox, lightbox, prettyphoto, darkprettyphoto, simple
			opacity     : 0.5,              	// Black overlay opacity
			duration    : 400,              	// Animation duration
			animation   : true,             	// Do we have to animate the box?
			width       : 600,              	// Default width
			height      : 400,              	// Default height
			gallery     : true,             	// Allow gallery thumb view
			autoplay 	: false             	// Autoplay for video
		});
	});	
	
	/* ------------- Character counter ------------- */
	jQuery("#englishtext").counter({
		type: 'word',
		goal: 50
	});
	jQuery("#russiantext").counter({
		type: 'word',
		goal: 50
	});
	
	
	jQuery('.belt').cycle({
		fx: 'scrollLeft', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed: 800,
		timeout: 6000,
		next:   '#next', 
		prev:   '#prev'
	});	

	
});

