function hoverashit(holder,on,off) {
$ja(holder).mouseenter(function () {$ja(this).css({'background-color':on});});
$ja(holder).mouseleave(function () {$ja(this).css({'background-color':off});});
}
function hoverashitText(holder,on,off) {
$ja(holder).mouseenter(function () {$ja(this).css({'font-weight':on});});
$ja(holder).mouseleave(function () {$ja(this).css({'font-weight':off});});
}

function piroboxer() {
	$ja('.fancybox-tmp,.fancybox-loading,.fancybox-overlay,.fancybox-wrap').each(function() {
				$ja(this).remove();
	});
	
	function formatTitle(title, currentArray, currentIndex, currentOpts) {
    return '<div class="fancybox-title-inside">' + (title && title.length ? ' <b>' + title + '</b>' : '' ) + '<br /></div>';
	}

	$ja("a.galleryImg,a.mcdbox").fancybox({
		'transitionIn'	:	'none',
		'transitionOut'	:	'none',
		'speedIn'		:	200, 
		'speedOut'		:	200, 
		'autoScale'	:	true,
		'centerOnScroll':	true,
		'hideOnOverlayClick'	:	true,
		'overlayOpacity'	:	0.9,
		'overlayColor'	:	'#ffffff',
		'titlePosition'	:	'out',
		'titleFormat'		: formatTitle,
		'onComplete'	:	function() {
			/*$ja("#fancybox-wrap").hover(function() {
				$ja("#fancybox-title").show();
			}, function() {
				$ja("#fancybox-title").hide();
			});*/
		},
		'overlayShow'	:	true,
		'showNavArrows' : true,
		'scrolling' : false
	});
}




function alertGreen(sta) {
	$ja("#loadingadvice").hide();
	$ja("#advice-red").hide();
	$ja("#advice-green").hide();
	
	switch(sta)
		{
		case "add":
		$ja("#advice-green").stop(true, true).hide().empty().append("Sadržaj uspješno dodan !").slideDown().animate({ opacity: 1.0 },3000).slideUp();
		break;
				
		default:
		$ja("#advice-green").stop(true, true).hide().empty().append(sta).slideDown().animate({ opacity: 1.0 },3000).slideUp();
		}
}
function alertRed(sta) {
	$ja("#loadingadvice").hide();
	$ja("#advice-red").hide();
	$ja("#advice-green").hide();
	switch(sta)
		{
		case "your_name":
		$ja("#advice-red").stop(true, true).hide().empty().append("Molim, unesite vaše ime!").slideDown().animate({ opacity: 1.0 },3000).slideUp();
		break;
		case "your_email":
		$ja("#advice-red").stop(true, true).hide().empty().append("Molim, unesite vašu email adresu!").slideDown().animate({ opacity: 1.0 },3000).slideUp();
		break;
		case "your_email_invalid":
		$ja("#advice-red").stop(true, true).hide().empty().append("Molim, unesite validan format vaše email adrese!").slideDown().animate({ opacity: 1.0 },3000).slideUp();
		break;
		case "mail_to":
		$ja("#advice-red").stop(true, true).hide().empty().append("Molim, unesite email adresu primaoca!").slideDown().animate({ opacity: 1.0 },3000).slideUp();
		break;
		case "mail_to_invalid":
		$ja("#advice-red").stop(true, true).hide().empty().append("Molim, unesite validan format email adrese primaoca!").slideDown().animate({ opacity: 1.0 },3000).slideUp();
		break;
		
		default:
		$ja("#advice-red").stop(true, true).hide().empty().append(sta).slideDown().animate({ opacity: 1.0 },3000).slideUp();
		}
}



function hoverashi() {
			hoverashit('.sadrzajerDesno','#e6e6d9','#efede1');
			hoverashit('.vijestBlockHover','#efede1','#ffffff');
}
