//<![CDATA[
hs.graphicsDir = 'http://localhost/poliklinika-djeca-wordpress/wp-content/themes/poliklinika/highslide/graphics/';
hs.transitions = ['fade', 'crossfade'];
hs.restoreCursor = null;
hs.lang.restoreTitle = ' ';
hs.lang.number = "%1/%2";
hs.headingOverlay.position = "bottom";
	hs.headingOverlay.width = "100%";
	hs.headingOverlay.opacity = .90;
	hs.headingOverlay.hideOnMouseOut = true;

hs.zIndexCounter = 6001; // default is 1001


// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	slideshowGroup: 'group1',
	interval: 5000,
	repeat: true,
	useControls: false,
	thumbstrip: {
		position: 'below',
		mode: 'horizontal',
		relativeTo: 'expander'
	}
});
 
// Options for the in-page items
var inPageOptions = {
	slideshowGroup: 'group1',
	outlineType: null,
	allowSizeReduction: false,
	wrapperClassName: 'in-page controls-in-heading',
	thumbnailId: 'gallery-area',
	useBox: true,
	width: 600,
	height: 450,
	targetX: 'gallery-area 0px',
	targetY: 'gallery-area 0px',
	autoplay: false,
	numberPosition: 'heading',
	headingEval: 'this.a.title'


}
 

 
// Cancel the default action for image click and do next instead
hs.Expander.prototype.onImageClick = function() {
	if (/in-page/.test(this.wrapper.className))	return hs.next();
}
 
// Under no circumstances should the static popup be closed
hs.Expander.prototype.onBeforeClose = function() {
	if (/in-page/.test(this.wrapper.className))	return false;
}
// ... nor dragged
hs.Expander.prototype.onDrag = function() {
	if (/in-page/.test(this.wrapper.className))	return false;
}
 
// Keep the position after window resize
hs.addEventListener(window, 'resize', function() {
	var i, exp;
	hs.getPageSize();
 
	for (i = 0; i < hs.expanders.length; i++) {
		exp = hs.expanders[i];
		if (exp) {
			var x = exp.x,
				y = exp.y;
 
			// get new thumb positions
			exp.tpos = hs.getPosition(exp.el);
			x.calcThumb();
			y.calcThumb();
 
			// calculate new popup position
		 	x.pos = x.tpos - x.cb + x.tb;
			x.scroll = hs.page.scrollLeft;
			x.clientSize = hs.page.width;
			y.pos = y.tpos - y.cb + y.tb;
			y.scroll = hs.page.scrollTop;
			y.clientSize = hs.page.height;
			exp.justify(x, true);
			exp.justify(y, true);
 
			// set new left and top to wrapper and outline
			exp.moveTo(x.pos, y.pos);
		}
	}
});
//]]>

$(document).ready(function(){
//Carousel
jQuery('#mycarousel').jcarousel();	

//Stupid IE z-index 
	$(function() {
	var zIndexNumber = 1100;
	$('div#wrap div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
	});
	

	$(function() {
	var zIndexNumber = 1100;
	$('#footerwrap div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
	});
		
/* Dropdown */
	$("ul.topnav li span").hover(function() { 

		$(this).parent().find("ul.subnav").slideDown(50).show();
		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("ul.subnav").slideUp(50);
		});


		});


		//hide img alt tags from displaying
	jQuery("img").each(function(){
                jQuery(this).removeAttr('alt');
                }) 
	
//hide img alt tags from displaying
	jQuery("#nav a").each(function(){
                jQuery(this).removeAttr('title');
                }) 
});//jQuery end 
	
	
