/*no intrusivo*/
/*funcion que llama a diferentes funciones que se quedan pendientes de ser llamadas mediante eventos como onclick*/	
(function() {
window.onload = function() {
	colapInicialMenu(); 
	getCapaSubmenu();
	menuDespl();
	colapInicial();
	getCapas();
	init();
	galeria();
	carusel();
	accordion();
	slideimg();
	popUp();
}
	
})();



function slideimg(){
       function formatText(index, panel) {
		  return index + "";
	    }
    

    $(document).ready(function(){
			var flashvars = {};
			var params = {wmode:"transparent"};
			var attributes = {};
    		//swfobject.embedSWF("img/sliderimag.swf", "movie", "491", "240", "9.0.0","img/expressInstall.swf",flashvars,params,attributes);
   		 });
	
	

        $(function () {
        
            $('.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: 1000,             // How long the slide transition takes
                hashTags: true,                 // 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
		        		startText: "",             // Start text
				        stopText: "",               // Stop text
				        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });
};


function accordion(){

	$(function() {
		$("#accordion").accordion({
			collapsible: true
		});
	});
};



function carusel()
{
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();
});

};

	function galeria ()
	{
				$(document).ready(function() {
				// Initialize Advanced Galleriffic Gallery
					$('div.navigation').css({'width' : '248px', 'float' : 'left'});
					$('div.content').css('display', 'block');
					
					// Initially set opacity on thumbs and add
					// additional styling for hover effect on thumbs
					var onMouseOutOpacity = 1;
					$('#thumbs ul.thumbs li').css('opacity', onMouseOutOpacity)
						.hover(
							function () {
								$(this).not('.selected').fadeTo('fast', 1.0);
							}, 
							function () {
								$(this).not('.selected').fadeTo('fast', onMouseOutOpacity);
							}
					);

				var galleryAdv = $('#gallery').galleriffic('#thumbs', {
					delay:                  2000,
					numThumbs:              12,
					preloadAhead:           10,
					enableTopPager:         false,
					enableBottomPager:      false,
					imageContainerSel:      '#slideshow',
					controlsContainerSel:   '#controls',
					captionContainerSel:    '#caption',
					loadingContainerSel:    '#loading',
					renderSSControls:       true,
					renderNavControls:      true,
					playLinkText:           'Play Slideshow',
					pauseLinkText:          'Pause Slideshow',
					prevLinkText:           '&lsaquo; Previous Photo',
					nextLinkText:           'Next Photo &rsaquo;',
					nextPageLinkText:       'Next &rsaquo;',
					prevPageLinkText:       '&lsaquo; Prev',
					enableHistory:          true,
					autoStart:              false,
					onChange:               function(prevIndex, nextIndex) {
						$('#thumbs ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onTransitionOut:        function(callback) {
						$('#caption').fadeTo('fast', 0.0);
						$('#slideshow').fadeTo('fast', 0.0, callback);
					},
					onTransitionIn:         function() {
						$('#slideshow').fadeTo('fast', 1.0);
						$('#caption').fadeTo('fast', 1.0);
					},
					onPageTransitionOut:    function(callback) {
						$('#thumbs ul.thumbs').fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:     function() {
						$('#thumbs ul.thumbs').fadeTo('fast', 1.0);
					}
				});
			});
};


// JavaScript Document


