	var $Q = jQuery.noConflict();
	
	$Q(window).bind('load', function() {
	$Q('.photos>a>img').each(function() {

		if((typeof this.naturalWidth != "undefined" &&

			this.naturalWidth == 0 ) 

			|| this.readyState == 'uninitialized' ) {

			$Q(this).css('border', '2px solid red');//test
			$Q(this).css('display', 'none');
				var id = $Q(this).attr('id');
				var code = id.split('_')[1];
				MarkAsBroken(code);	
		}

	});
	
	function MarkAsBroken(code){
			$Q.post("../sotb/includes/broken_img.inc.php",{code: code }, function(data){});
		}
})
	
	
	
	jQuery(document).ready(function($){
		
		var cache = [];//image loader
		
		$Q('.photos>a>img').each(function(){
			src = $Q(this).attr('src');

			cacheImage = document.createElement('img');
			cacheImage.src = src;
			cache.push(cacheImage);
		});
		
		function MarkAsBroken(code){
			$Q.post("../sotb/includes/broken_img.inc.php",{code: code }, function(data){});
		}
	
		$Q('li').removeClass('nav');
		
		$Q('#home_nav>ul>li> a > span').css('display', 'none').
			css("background-image", "url("+layout+"main_nav_over.png)");
		$Q('#page_nav>ul>li> a > span').css('display', 'none').
			css("background-image", "url("+layout+"page_nav_over.png)");
		$Q('.add_to_cart>ul>li> a > span').css('display', 'none').
			css("background-image", "url("+layout+"button_lg_over.png)");
		
		$Q('li').hover(
		function () {
		
			 if($Q(this).children('a').children('span').text() == '')
				$Q(this).children('a').children('span').append($Q(this).children('a').text());
			 $Q(this).children('a').children('span').fadeIn(150, function(){});
			$Q(this).children('a').children('span').css('cursor', 'pointer');
		}, 
			function () {
			$Q(this).children('a').children('span').fadeOut(150, function(){});
		});
		$Q.translate.load('C4638396DFE22A4B3F4B938F2D230D514271307E');
		$Q(".translate_es").translate('en','es',function(){ }); 
		//$Q(".translate_es").css({'border':'2px solid blue'});
		//$Q(".translate_en").translate('es','en',function(){ });

	});
