/*
* Mark external Links and set Title
*/
var ie5 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.0") != -1);
var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

if (!ie5) {
	jQuery(document).ready(function(){
		$("a[@href^=http]:not([@href*='"+location.hostname+"']):not(.thickbox)").each(function(i){
			if (typeof jQuery(this).attr('title') == "undefined" )
				jQuery(this).attr('title',jQuery(this).attr('href')+'    (external link)');
			else
				jQuery(this).attr('title',jQuery(this).attr('title')+'    (external link)');
			jQuery(this).append('<span class="external" title="'+jQuery(this).attr('title')+'">&nbsp;</sp'+'an>').click(function(){
				/* this.href = 'http://sasa/urltrack.php?url='+this.href;
				console.log('CLICK HREF='+this.href);
				return false; */
				window.open(jQuery(this).attr('href')); return false;
			});
		});
	});
}

$(document).ready(function(){
	$('#col-in').Accordion({
		header: 'h3'
	});
	$("#tb-form-div, .tb-credit").hide();

	$(".tb-togle-form").toggle(function(){
		$("#tb-form-div, .tb-credit").slideDown('slow');
		},function(){
		$("#tb-form-div, .tb-credit").slideUp('fast');
		});
	$(".tb-togle-comment").toggle(function(){
		$(".tb-all-comment").slideDown('slow');
		},function(){
		$(".tb-all-comment").slideUp('fast');
		});

	$("img.slikashadow").wrap("<div class='slika'><div class='drop-shadow-left'>" + "</div></div>");
	$("img.slikashadow-desno").wrap("<div class='drop-shadow-right'></div>");
	$("img.slikashadow-levo").wrap("<div class='drop-shadow-left'></div>");
	$('div.main').pngFix( );
	$('a.zatvori').click( function() {$('#neflash').hide();});
	$('#neflash').show();
	$('.sakrij').hide();

});

function fbs_click() {
	u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}
