jQuery(document).ready(function() {

		if (jQuery.browser.safari && document.readyState != "complete"){
		//console.info('ready...');
		setTimeout( arguments.callee, 100 );
		return;
	 } 
	
	
	var imgW = 130, imgH = 130
	
	$(".item_img").each(function(){
	
		thisImg = $(this)
		/*
		var thisWidth = thisImg.width();
		var thisHeight = thisImg.height();
		if( thisWidth > thisHeight ) 
		{
			thisImg.css({width: imgW, height: 'auto'});
			
			if ( thisImg.height() > imgH )
				thisImg.css({height:imgH, width:"auto"}); 
		}
		if( thisWidth <= thisHeight ) 
			thisImg.css({height:imgH, width:'auto'});
		
		
		var endHeight = thisImg.height()
		var endwidth = thisImg.width()
		$(this).css({marginTop:-(endHeight/2), marginLeft:-(endwidth/2), width: endwidth})
		*/
		
		thisImg.fadeIn();
		
		
	});




function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'circular',
        initCallback: mycarousel_initCallback
    });




	$("ul.sf-menu2").superfish({ 
		animation: {height:'show'},   // slide-down effect without fade-in 
		delay: 1200               	  // 1.2 second delay on mouseout 
	}); 



			$('.item a').fancybox({
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.9
			});

		

		$('.sf-menu2>li>a').removeAttr('href');


		// Accordion
			$("#accordion").accordion({ header: "h3" });

		 
});
