// JavaScript Document
$(document).ready(function(){
// Footer Blind
	$("#footerlink").click(function(){
		$(this).toggleClass('active');
		$("#slide_hidden").slideToggle("slow");
	});
document.documentElement.className = 'js';
// SOCIAL icon popup
	$("#logo a").hover(function() { 
		$(this).next("em").stop(true, true).animate({opacity: "show", top: "47"}, "slow"); 
	}, function() { 
		$(this).next("em").animate({opacity: "hide", top: "70"}, "fast"); 
	}); 
document.documentElement.className = 'js';
// SOCIAL icon popup
	$("#nav_facebook a").hover(function() { 
		$(this).next("em").stop(true, true).animate({opacity: "show", top: "47"}, "slow"); 
	}, function() { 
		$(this).next("em").animate({opacity: "hide", top: "70"}, "fast"); 
	}); 
document.documentElement.className = 'js';
// SOCIAL icon popup
	$("#nav_twitter a").hover(function() { 
		$(this).next("em").stop(true, true).animate({opacity: "show", top: "47"}, "slow"); 
	}, function() { 
		$(this).next("em").animate({opacity: "hide", top: "70"}, "fast"); 
	}); 
document.documentElement.className = 'js';
// SOCIAL icon popup
	$("#nav_linkedin a").hover(function() { 
		$(this).next("em").stop(true, true).animate({opacity: "show", top: "47"}, "slow"); 
	}, function() { 
		$(this).next("em").animate({opacity: "hide", top: "70"}, "fast"); 
	}); 
document.documentElement.className = 'js';
// SOCIAL icon popup
	$("#nav_rss a").hover(function() { 
		$(this).next("em").stop(true, true).animate({opacity: "show", top: "47"}, "slow"); 
	}, function() { 
		$(this).next("em").animate({opacity: "hide", top: "70"}, "fast"); 
	}); 
document.documentElement.className = 'js';
// SOCIAL icon popup
	$("#nav_email a").hover(function() { 
		$(this).next("em").stop(true, true).animate({opacity: "show", top: "47"}, "slow"); 
	}, function() { 
		$(this).next("em").animate({opacity: "hide", top: "70"}, "fast"); 
	}); 
// Image Rounded Corners - For Dynamic Content Gallery
jQuery(function($) {
				$('div.panel img').wrap(function() {
					return '<span style="background-image:url(' + $(this).attr('src') + '); height: '+ $(this).height() + 'px; width: '+ $(this).width() + 'px;" class="rounded" />';
				});
			});
			
// IMAGE PRELOADING
	var images = [
	'wp-content/themes/uxable/images/nav_home_hover.png',
	'wp-content/themes/uxable/images/nav_email_on.png',
	'wp-content/themes/uxable/images/nav_rss_on.png',
	'wp-content/themes/uxable/images/nav_linkedin_on.png',
	'wp-content/themes/uxable/images/nav_facebook_on.png',
	'wp-content/themes/uxable/images/nav_twitter_on.png',
	'wp-content/themes/uxable/images/nav_about.png',
	'wp-content/themes/uxable/images/nav_categories.png',
	'wp-content/themes/uxable/images/nav_archives.png',
	'wp-content/themes/uxable/images/nav_contact.png',
	'wp-content/themes/uxable/images/footer_tab_on.png'
	];
	$(images).each(function(key, value) {
		var img = new Image();
		$(img)
		.attr('src', value)
		.error(function (){
			alert('Error preloading image ' . value);
		})
	});
// CLOSE DOC READY
});
