/* Author: olegnax

*/
$(document).ready(function() {
	
		jQuery('.slider').fadeIn(300);
			if ($("#s4").length) {
					$(function() {
					$('#s4')
						.after('<div id="nav">') 
						.cycle({ 
						fx:     'fade', 
						speed:  1000, 
						timeout: 3000, 
						next:   '#next2', 
						prev:   '#prev2',
						pager:  '#nav' 
					});
					});
				};
			$('input[type="text"],textarea').addClass("idleField");
       		$('input[type="text"],textarea,input[type="password"]').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,input[type="password"]').blur(function() {
    			$(this).removeClass("focusField").addClass("idleField");
    		    if ($.trim(this.value) == ''){
			    	this.value = (this.defaultValue ? this.defaultValue : '');
				}
    		});

			
			if ($("#carousel1").length) {
				$(window).load(function(){
					$('#carousel1').bxCarousel({
						display_num: 5,
						move: 2,
						prev_text: '&nbsp;',
						next_text: '&nbsp;',
						margin: 18
					});
				});
			};
			
			
			



			


});


