// <![CDATA[
	// opacity
	function opacity(element, value) {
		var value_noie = value / 100;
		$(element).css('filter', 'alpha(opacity=' + value + ')');
		$(element).css('-moz-opacity', value_noie);
		$(element).css('-khtml-opacity', value_noie);
		$(element).css('opacity',value_noie);
	}

	// center horizontally
	function centerHoriz(lo_que) {
		var x = parseFloat($(window).width()) / 2 - parseFloat($(lo_que).width()) / 2;
		var y = $(window).scrollTop() + $(window).height() / 2 - parseFloat($(lo_que).height()) / 2;
		x = x + 'px';
		y = y + 'px';
		$(lo_que).css({'left': x, 'top': y});
	}

	// center vertically
	function centerVert(lo_que) {
		var y = $(window).scrollTop() + $(window).height() / 2 - parseFloat($(lo_que).height()) / 2;
		$(lo_que).css({'top': y});
	}

	// image load
	function loadImg(sID, sURL) {
		$(sID).unbind("load");
		$(sID).bind("load", function() { $(this).fadeIn(); } )
		$(sID).stop(true, true).fadeOut("normal", function () { $(sID).attr('src', sURL); } );
	}

	$(document).ready(
		function() {
			//*blogPageNoA
			$('.blogPageNoA a').attr('href', '#');
			
			//topNav			
			$('#topnav .menu li').addClass('ico trns');
			$('#topnav .menu li:nth-child(1)').addClass('ico1');
			$('#topnav .menu li:nth-child(2)').addClass('ico2');
			$('#topnav .menu li:nth-child(3)').addClass('ico3');
			$('#topnav .menu li:nth-child(4)').addClass('ico4');
			$('#topnav .menu li:nth-child(4)').addClass('absolute');
			
			// Menu Vertical
			$('#rigthnav .menu-secundario ul li a').addClass('itemMenu');
			$('#rigthnav .menu-secundario ul li ul.children a').removeClass('itemMenu');
			$('#rigthnav .menu-secundario ul li ul.children a').addClass('itemSubMenu');
			
			$('#rigthnav .menu-secundario ul li ul.children').hide();
			$('#rigthnav .menu-secundario ul li.current_page_ancestor.current_page_parent').find('ul.children').show();
			$('#rigthnav .menu-secundario ul li.current_page_item ul.children').show();
			$('#rigthnav .menu-secundario ul li a.itemMenu').click(
				function() {
					var subMn = $(this).parent().find('ul.children');
					
					$('#rigthnav .menu-secundario ul li a.itemMenu').removeClass('active');
						$(this).parent().addClass('active');
					});
	
		// Add first and last menu item classes
		$('#rigthnav .menu-secundario ul li:first-child').addClass( 'first_item' );
		$('#rigthnav .menu-secundario ul li:last-child').addClass( 'last_item' );
		
		$('#general.active #main div:first').next().addClass( 'random' );
		$('#general.active #main div:first').next().next().addClass( 'first_post' );
	
		$("#topnav .menu li").hover(function() { //Hover over event on list item
			$(this).find("ul.children").show(); //Show the subnav
			$(this).find("ul.children").parent().addClass('active'); //Show the subnav
		} , function() { //on hover out...
			$(this).find("ul.children").hide(); //Hide the subnav
			$(this).find("ul.children").parent().removeClass('active'); //Show the subnav
		});

			// clear inputs
			var input_values = Array();
			$('input[type=text]').each(
				function() {
					input_values[$('input[type=text]').index(this)] = $(this).val();
				}
			);
			$('input[type=text]').focus(
				function() {
					if($(this).val() == input_values[$('input[type=text]').index(this)]) {
						$(this).val('');
					}
				}
			);
			$('input[type=text]').blur(
				function() {
					if($(this).val() == '') {
						$(this).val(input_values[$('input[type=text]').index(this)]);
					}
				}
			);
									
			// END DEFAULT //
		}
	);
	
// ]]>
