$(document).ready(function(){
	//INPUT ELEMENTS	
		//remove styles from hidden inputs
		$('input[type=hidden]').each(function(){$(this).css('display', 'none');});
		
		//change color unless typed in	
		$(':input').focus(function(){
			if($(this).val() == $(this).attr('rel')){
				$(this).fadeTo(500, 0.5);
				$(this).keydown(function(){
					if($(this).val() == $(this).attr('rel')){					
						$(this).val('');
						$(this).fadeTo(500, 1.0);
					}
				});
			}
		}).blur(function(){
			if($(this).val() == '' || $(this).val() == $(this).attr('rel')){
				var atty = $(this).attr('rel');
				$(this).val(atty).fadeTo(500, 1.0);
			}
		});
		
		//CHECKBOX
		$('input[type=checkbox]').each(function(){
			$(this).css({'display' : 'inline', 'width' : 'auto', 'padding' : '0px', 'margin-right' : '5px'});
		});
	//INPUT ELEMENTS
	
	//FIND LOGO
	$('#logo').css('cursor', 'pointer').bind({
		click: function(){
			window.location = './?page=home';	
		}
	});
	
	//country store
	$('.showStore').toggle(function(){
		$('#store').slideDown('slow');
	},function(){
		$('#store').slideUp('fast');	
	});
	
	//iframe grab
	dog = true;
	id = 'dog';
	if(dog == true){
		$.ajax({
			type: 'POST',
			url: 'php/ajax/curl.php',
			data: 'id='+id,
			success: function(msg){
				//here we go
				$('#iframe').html(msg);
				$('#iframe').find('hr').remove();
				$('.NA_Title').css('display', 'none');
				$('.Normal').last().css({
					'border-bottom' : 'none',
					'margin-bottom' : '0px',
					'padding-bottom' : '0px'
				});
			},
			dataType: 'html'
		});
	}
	
	//SHOW HIDDEN
	$('.show_hidden').toggle(function(){
		$(this).next().slideDown('slow');
	},function(){
		$(this).next().slideUp('fast');	
	});
});
