jQuery(document).ready(function(){
	
	///////////////////////////////////////////////////////////////////////////////////////////////////////
	//	Lightbox
	///////////////////////////////////////////////////////////////////////////////////////////////////////
		if(jQuery("a.lightbox"))
		{
	   		$('a.lightbox').lightBox({
				overlayBgColor: '#000',
				overlayOpacity: 0.8, 
				imageLoading: 'http://www.eurogast.hr/images/lightbox-ico-loading.gif',
				imageBtnClose: 'http://www.eurogast.hr/images/closelabel.gif',
				imageBtnPrev: 'http://www.eurogast.hr/images/prev.gif',
				imageBtnNext: 'http://www.eurogast.hr/images/next.gif',
				containerResizeSpeed: 350,
				txtImage: 'Slika',
				txtOf: 'od'
			});
			
			$('a.lightboxGallery').lightBox({
				overlayBgColor: '#000',
				overlayOpacity: 0.8, 
				imageLoading: 'http://www.eurogast.hr/images/lightbox-ico-loading.gif',
				imageBtnClose: 'http://www.eurogast.hr/images/closelabel.gif',
				imageBtnPrev: 'http://www.eurogast.hr/images/prev.gif',
				imageBtnNext: 'http://www.eurogast.hr/images/next.gif',
				containerResizeSpeed: 350,
				txtImage: 'Slika',
				txtOf: 'od'
			});
		}	
	
	///////////////////////////////////////////////////////////////////////////////////////////////////////
	//	superfish menu
	///////////////////////////////////////////////////////////////////////////////////////////////////////
	
		jQuery("ul.sf-menu").superfish().find('ul').bgIframe({
			opacity:     true,
			delay:       200,								// half second delay on mouseout 
			animation:   {opacity:'show',height:'show'},	// fade-in and slide-down animation 
			speed:       'fast',                        	// faster animation speed 
			autoArrows:  false,                           	// disable generation of arrow mark-up 
			dropShadows: true                            	// disable drop shadows
		});
		
	///////////////////////////////////////////////////////////////////////////////////////////////////////
    //	attachments
    ///////////////////////////////////////////////////////////////////////////////////////////////////////

    jQuery("div#attachments ul.tabs").tabs("div#attachments > div.panes > div");


	///////////////////////////////////////////////////////////////////////////////////////////////////////
	//	slider
	///////////////////////////////////////////////////////////////////////////////////////////////////////

			function formatText(index, panel) {
				  return index + "";
				}
					if($('.anythingSlider ul li').length > 1)
					{
						$('.anythingSlider').anythingSlider({
							easing: "easeInOutExpo",        		// Anything other than "linear" or "swing" requires the easing plugin
							autoPlay: true,                 		// This turns off the entire FUNCTIONALY, not just if it starts running or not.
							delay: 3000,                    		// How long between slide transitions in AutoPlay mode
							startStopped: false,            		// If autoPlay is on, this can force it to start stopped
							animationTime: 600,             		// How long the slide transition takes
							hashTags: false,                 		// Should links change the hashtag in the URL?
							buildNavigation: true,          		// If true, builds and list of anchor links to link to each slide
							pauseOnHover: true,             		// If true, and autoPlay is enabled, the show will pause on hover
							navigationFormatter: formatText         // Details at the top of the file on this use (advanced use)
						});
					}
	});
				
	///////////////////////////////////////////////////////////////////////////////////////////////////////
	//	DW
	///////////////////////////////////////////////////////////////////////////////////////////////////////
			
	function MM_openBrWindow(theURL,winName,features) { //v2.0
		  window.open(theURL,winName,features);
		}
		
	function MM_goToURL() { //v3.0
		  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
		  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
		}
		
	///////////////////////////////////////////////////////////////////////////////////////////////////////
	//	table rollover
	///////////////////////////////////////////////////////////////////////////////////////////////////////
				
				function rollbg(chosen, objectID) {

			if(chosen == "roll") {
			document.getElementById(objectID).style.background="#f0f0f0";
		
		}
		else {
				document.getElementById(objectID).style.background="transparent";
			 }
		}

