//==========================| FIX PNG |==========================//
function fixPNG(element){if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){var src;if(element.tagName=='IMG'){if(/\.png$/.test(element.src)){src=element.src;element.src="images/blank.gif"}}else{src=element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if(src){src=src[1];element.runtimeStyle.backgroundImage="none"}}if(src)element.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='scale')"}}
//==========================| END FIX PNG |==========================//


function expandSELECT(sel) {
  sel.style.width = '';
}

function contractSELECT(sel) {
  sel.style.width = '133px';
}



$(document).ready(function(){
//==========================| ICO BLOCK |==========================//
	$("#bar_body").find("li").hover(
		function(){
			var liHeight = $(this).height();
			$(this).find('> div.hover').css({height: liHeight}).stop().animate({opacity: 1}, 400);
		},
		function() {
			$(this).find('> div.hover').stop().animate({opacity: 0}, 300);
		}
	);
	
	$("#bar_body ul").each(function(){  
			$(this).find("> li:last").each(function(){
			$(this).remove();
		});
	});
 
 
 
		/*$("#filtrr select").css('width','133px');
		
 
		$("#filtrr select").focus(function(){
			$(this).css('width','');
			
		});
		$("#filtrr select").blur(function(){
			$(this).css('width','133px');
			
		});*/
 
 
 
 
 



		/*function blinkIt(){
			setInterval(function(){
				$('#sub').animate({opacity: 0.5}, 1000).animate({opacity: 1}, 1000);
			}, 1000)
		}
		blinkIt();*/

		

	 var galleryItems = $("#content_body a[rel^='prettyPhoto']");
		if (galleryItems.length > 0) {
			galleryItems.prettyPhoto({theme:'dark_rounded'});
		}



		function getfabrik(){

		
			var country = $("#country select option:selected").text();
			var sel = $("#fabrika select option:contains('"+country+"')").text();
			if( country != '(βρε)') {
				$("#fabrika select option").each(function(){
					var str = this.text;
					$(this).css('display' , 'block');
					if((str.indexOf(country) < 0) && (str != '(βρε)')) {
						$(this).remove();
					}
				});
			}
		};
		getfabrik();
		$("#country select").change(function(){
			var html_fabrika = $("#all_fabrika").html();
			$("#fabrika").html('');
			$("#fabrika").html(html_fabrika);
			getfabrik();			
		});
		
		
	
});

