
/*----------------------------------------------------------------------------*/

					/*   Comienzo del customs   */

/*----------------------------------------------------------------------------*/





//////////////////// agregado de superfish /////////////////////////////////////////

(function($){

	/* hoverIntent by Brian Cherne */

	$.fn.hoverIntent = function(f,g) {

		// default configuration options

		var cfg = {

			sensitivity: 7,

			interval: 100,

			timeout: 0

		};

		// override configuration options with user supplied object

		cfg = $.extend(cfg, g ? { over: f, out: g } : f );



		// instantiate variables

		// cX, cY = current X and Y position of mouse, updated by mousemove event

		// pX, pY = previous X and Y position of mouse, set by mouseover and polling interval

		var cX, cY, pX, pY;



		// A private function for getting mouse position

		var track = function(ev) {

			cX = ev.pageX;

			cY = ev.pageY;

		};



		// A private function for comparing current and previous mouse position

		var compare = function(ev,ob) {

			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);

			// compare mouse positions to see if they've crossed the threshold

			if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {

				$(ob).unbind("mousemove",track);

				// set hoverIntent state to true (so mouseOut can be called)

				ob.hoverIntent_s = 1;

				return cfg.over.apply(ob,[ev]);

			} else {

				// set previous coordinates for next time

				pX = cX; pY = cY;

				// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)

				ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );

			}

		};



		// A private function for delaying the mouseOut function

		var delay = function(ev,ob) {

			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);

			ob.hoverIntent_s = 0;

			return cfg.out.apply(ob,[ev]);

		};



		// A private function for handling mouse 'hovering'

		var handleHover = function(e) {

			// next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut

			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;

			while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }

			if ( p == this ) { return false; }



			// copy objects to be passed into t (required for event object to be passed in IE)

			var ev = jQuery.extend({},e);

			var ob = this;



			// cancel hoverIntent timer if it exists

			if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }



			// else e.type == "onmouseover"

			if (e.type == "mouseover") {

				// set "previous" X and Y position based on initial entry point

				pX = ev.pageX; pY = ev.pageY;

				// update "current" X and Y position based on mousemove

				$(ob).bind("mousemove",track);

				// start polling interval (self-calling timeout) to compare mouse coordinates over time

				if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}



			// else e.type == "onmouseout"

			} else {

				// unbind expensive mousemove event

				$(ob).unbind("mousemove",track);

				// if hoverIntent state is true, then call the mouseOut function after the specified delay

				if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}

			}

		};



		// bind the function to the two event listeners

		return this.mouseover(handleHover).mouseout(handleHover);

	};

	

	

})(jQuery);



////////////////////  superfish  ///////////////////////////////////////////////////

;(function($){

	$.fn.superfish = function(op){



		var sf = $.fn.superfish,

			c = sf.c,

			$arrow = $(['<span class="',c.arrowClass,'"></span>'].join('')),

			over = function(){

				var $$ = $(this), menu = getMenu($$);

				clearTimeout(menu.sfTimer);

				$$.showSuperfishUl().siblings().hideSuperfishUl();

			},

			out = function(){

				var $$ = $(this), menu = getMenu($$), o = sf.op;

				clearTimeout(menu.sfTimer);

				menu.sfTimer=setTimeout(function(){

					o.retainPath=($.inArray($$[0],o.$path)>-1);

					$$.hideSuperfishUl();

					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}

				},o.delay);	

			},

			getMenu = function($menu){

				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];

				sf.op = sf.o[menu.serial];

				return menu;

			},

			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };

			

		return this.each(function() {

			var s = this.serial = sf.o.length;

			var o = $.extend({},sf.defaults,op);

			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){

				$(this).addClass([o.hoverClass,c.bcClass].join(' '))

					.filter('li:has(ul)').removeClass(o.pathClass);

			});

			sf.o[s] = sf.op = o;

			

			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {

				if (o.autoArrows) addArrow( $('>a:first-child',this) );

			})

			.not('.'+c.bcClass)

				.hideSuperfishUl();

			

			var $a = $('a',this);

			$a.each(function(i){

				var $li = $a.eq(i).parents('li');

				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});

			});

			o.onInit.call(this);

			

		}).each(function() {

			var menuClasses = [c.menuClass];

			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);

			$(this).addClass(menuClasses.join(' '));

		});

	};



	var sf = $.fn.superfish;

	sf.o = [];

	sf.op = {};

	sf.IE7fix = function(){

		var o = sf.op;

		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)

			this.toggleClass(sf.c.shadowClass+'-off');

		};

	sf.c = {

		bcClass     : 'sf-breadcrumb',

		menuClass   : 'sf-js-enabled',

		anchorClass : 'sf-with-ul',

		arrowClass  : 'sf-sub-indicator',

		shadowClass : 'sf-shadow'

	};

	sf.defaults = {

		hoverClass	: 'sfHover',

		pathClass	: 'overideThisToUse',

		pathLevels	: 1,

		delay		: 500,

		animation	: {opacity:'show'},

		speed		: 'normal',

		autoArrows	: true,

		dropShadows : true,

		disableHI	: false,		// true disables hoverIntent detection

		onInit		: function(){}, // callback functions

		onBeforeShow: function(){},

		onShow		: function(){},

		onHide		: function(){}

	};

	$.fn.extend({

		hideSuperfishUl : function(){

			var o = sf.op,

				not = (o.retainPath===true) ? o.$path : '';

			o.retainPath = false;

			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)

					.find('>ul').hide().css('visibility','hidden');

			o.onHide.call($ul);

			return this;

		},

		showSuperfishUl : function(){

			var o = sf.op,

				sh = sf.c.shadowClass+'-off',

				$ul = this.addClass(o.hoverClass)

					.find('>ul:hidden').css('visibility','visible');

			sf.IE7fix.call($ul);

			o.onBeforeShow.call($ul);

			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });

			return this;

		}

	});

	

})(jQuery);	



//////////////////// agregado de superfish/////////////////////////////////////////



;(function($){ // $ will refer to jQuery within this closure

	$.fn.supersubs = function(options){

		var opts = $.extend({}, $.fn.supersubs.defaults, options);

		// return original object to support chaining

		return this.each(function() {

			// cache selections

			var $$ = $(this);

			// support metadata

			var o = $.meta ? $.extend({}, opts, $$.data()) : opts;

			// get the font size of menu.

			// .css('fontSize') returns various results cross-browser, so measure an em dash instead

			var fontsize = $('<li id="menu-fontsize">&#8212;</li>').css({

				'padding' : 0,

				'position' : 'absolute',

				'top' : '-999em',

				'width' : 'auto'

			}).appendTo($$).width(); //clientWidth is faster, but was incorrect here

			// remove em dash

			$('#menu-fontsize').remove();

			// cache all ul elements

			$ULs = $$.find('ul');

			// loop through each ul in menu

			$ULs.each(function(i) {	

				// cache this ul

				var $ul = $ULs.eq(i);

				// get all (li) children of this ul

				var $LIs = $ul.children();

				// get all anchor grand-children

				var $As = $LIs.children('a');

				// force content to one line and save current float property

				var liFloat = $LIs.css('white-space','nowrap').css('float');

				// remove width restrictions and floats so elements remain vertically stacked

				var emWidth = $ul.add($LIs).add($As).css({

					'float' : 'none',

					'width'	: 'auto'

				})

				// this ul will now be shrink-wrapped to longest li due to position:absolute

				// so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer

				.end().end()[0].clientWidth / fontsize;

				// add more width to ensure lines don't turn over at certain sizes in various browsers

				emWidth += o.extraWidth;

				// restrict to at least minWidth and at most maxWidth

				if (emWidth > o.maxWidth)		{ emWidth = o.maxWidth; }

				else if (emWidth < o.minWidth)	{ emWidth = o.minWidth; }

				emWidth += 'em';

				// set ul to width in ems

				$ul.css('width',emWidth);

				// restore li floats to avoid IE bugs

				// set li width to full width of this ul

				// revert white-space to normal

				$LIs.css({

					'float' : liFloat,

					'width' : '100%',

					'white-space' : 'normal'

				})

				// update offset position of descendant ul to reflect new width of parent

				.each(function(){

					var $childUl = $('>ul',this);

					var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';

					$childUl.css(offsetDirection,emWidth);

				});

			});

			

		});

	};

	// expose defaults

	$.fn.supersubs.defaults = {

		minWidth		: 9,		// requires em unit.

		maxWidth		: 25,		// requires em unit.

		extraWidth		: 0			// extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values

	};

})(jQuery);

//////////////////// fin agregado de superfish/////////////////////////////////////////	



//////////////////// vtip  /////////////////////////////////////////

this.vtip = function() {    

    this.xOffset = -10; // x distance from mouse

    this.yOffset = 10; // y distance from mouse       

    

    $(".vtip").unbind().hover(    

        function(e) {

            this.t = this.title;

            this.title = ''; 

            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);

            

            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );

                        

            $('p#vtip #vtipArrow').attr("src", 'http://www.swanturismo.com.ar/img/main/vtip_arrow.gif');

            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");

            

        },

        function() {

            this.title = this.t;

            $("p#vtip").fadeOut("slow").remove();

        }

    ).mousemove(

        function(e) {

            this.top = (e.pageY + yOffset);

            this.left = (e.pageX + xOffset);

                         

            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");

        }

    );            

    

};





//////////////////// fin vtip  /////////////////////////////////////////



//////////////////// imagenes en paquetes  //////////////////////////////////



this.imagePreview = function(){	

	/* CONFIG */

		

		xOffset = 170;

		yOffset = 30;

		

		// these 2 variable determine popup's distance from the cursor

		// you might want to adjust to get the right result

		

	/* END CONFIG */

	$("a.preview").hover(function(e){

		this.t = this.title;

		this.title = "";	

		var c = (this.t != "") ? "<br/>" + this.t : "";

		$("body").append("<div id='preview'><p><img src='"+ this.href +"' alt='Loading...' />"+ c +"</p></div>");								 

		$("#preview")

			.css("top",(e.pageY - xOffset) + "px")

			.css("left",(e.pageX + yOffset) + "px")

			.fadeIn("fast");						

    },

	function(){

		this.title = this.t;	

		$("#preview").remove();

    });	

	$("a.preview").mousemove(function(e){

		$("#preview")

			.css("top",(e.pageY - xOffset) + "px")

			.css("left",(e.pageX + yOffset) + "px");

	});			

};







// velocidad de despligue de la botonera

$.fx.speeds._default = 250;



$(document).ready(function(){ 

						   

			imagePreview(); // carga la funcion de imgs en paquetes

			

			$("ul.sf-menu").supersubs({ 

           	 minWidth:    12,   // minimum width of sub-menus in em units 

             maxWidth:    20,   // maximum width of sub-menus in em units 

             extraWidth:  1     // extra width can ensure lines don't sometimes turn over 

                               // due to slight rounding differences and font-family 

        	}).superfish();  // call supersubs first, then superfish, so that subs are 

                         // not display:none when measuring. Call before initialising 

                         // containing tabs for same reason. 		

			

			$('#tarifario_completo').dialog({

				autoOpen: false,

				width: 650,

				show: 'blind',

				hide: 'blind'

			});

				

			$('a.ver_mas_precios').click(function() {

				$('#tarifario_completo').dialog('open');

				return false;

			});

			

		vtip();

		

		// Accordion

	$("#accordion_promo").accordion({

		header: "h3", 

		autoHeight: false,

		navigation: true,

		collapsible: true



	});



	// Tabs

	$('#tabs1,#tabs2,#tabs3,#tabs4,#tabs6,#tabs7,#tabs8,#tabs9,#tabs10,#tabs11,#tabs12,#tabs13,#tabs14,#tabs15,#tabs16,#tabs17,#tabs18,#tabs19,#tabs20,#tabs21,#tabs22,#tabs23,#tabs24,#tabs25,#tabs26,#tabs27,#tabs28,#tabs29,#tabs30,#tabs31').tabs();

		

	$('.fechapromo').datepicker({

		showOn: 'button',

		buttonImage: 'http://www.swanturismo.com.ar/img/top/calendar.gif',

		buttonImageOnly: true,

		dateFormat: 'yy-mm-dd'

	});

	

			

	$("a[rel='novios1']").colorbox({

		transition:"fade",

		scrolling: false,

		opacity:0,

		current: "",

		previous: "",

		next: "",

		close: "cerrar"

	});	

		

		

	$("a[rel='alaska1']").colorbox({

		transition:"fade",

		scrolling: false,

		opacity:0,

		current: "",

		previous: "anterior",

		next: "Próxima",

		close: "cerrar"

	});

		

	$("a[rel='agro1']").colorbox({
		transition:"fade",
		scrolling: false,
		opacity:0,
		current: "",
		previous: "anterior",
		next: "Próxima",
		close: "cerrar"
	});

	

	$("a[rel='agro2']").colorbox({
		transition:"fade",
		scrolling: false,
		opacity:0,
		current: "",
		previous: "anterior",
		next: "Próxima",
		close: "cerrar"
	});

	
	$('.imgs_paq').tooltip({ 
    delay: 0, 
    showURL: false,
	fade: 250,
    bodyHandler: function() { 
        return $("<img/>").attr("src", this.src); 
    	} 
	});
}); //end document ready


function Valida(){
	var Nvalidator = $("#form").validate().form();
	if(Nvalidator){ 
		return true;
	}else{
		var dataString = false;
		return false;
	}
}
function imprimir(printf,titulo,pie) {

   var ventana = window.open(printf, null, "height=760,width=620,status=no,toolbar=no,Scrollbars=yes,Titlebar=yes,menubar=no,location=no");
   var contenido = "<html><head><link href='http://www.swanturismo.com.ar/css/general.php.css' rel='stylesheet' type='text/css' /><link href='http://www.swanturismo.com.ar/css/imprimir.css' rel='stylesheet' type='text/css' /></head><body onload='window.print();'><div class='title_imprimir'>Swan Turismo - " + titulo +"</div><div class='imprimir'>" + document.getElementById(printf).innerHTML + "</div><div class='pie_imprimir'>"+ pie +"</div></body></html>";
   ventana.document.open();
   ventana.document.write(contenido);
   ventana.document.close();
}


// Create a jquery plugin that prints the given element.
jQuery.fn.print = function(){
	// NOTE: We are trimming the jQuery collection down to the
	// first element in the collection.
	if (this.size() > 1){
		this.eq( 0 ).print();
		return;
	} else if (!this.size()){
		return;
	}
 
	// ASSERT: At this point, we know that the current jQuery
	// collection (as defined by THIS), contains only one
	// printable element.
 
	// Create a random name for the print frame.
	var strFrameName = ("printer-" + (new Date()).getTime());
 
	// Create an iFrame with the new name.
	var jFrame = $( "<iframe name='" + strFrameName + "'>" );
 
	// Hide the frame (sort of) and attach to the body.
	jFrame
		.css( "width", "1px" )
		.css( "height", "1px" )
		.css( "position", "absolute" )
		.css( "left", "-9999px" )
		.appendTo( $( "body:first" ) )
	;
 
	// Get a FRAMES reference to the new frame.
	var objFrame = window.frames[ strFrameName ];
 
	// Get a reference to the DOM in the new frame.
	var objDoc = objFrame.document;
 
	// Grab all the style tags and copy to the new
	// document so that we capture look and feel of
	// the current document.
 
	// Create a temp document DIV to hold the style tags.
	// This is the only way I could find to get the style
	// tags into IE.
	var jStyleDiv = $( "<div>" ).append(
		$( "style" ).clone()
		);
 
	// Write the HTML for the document. In this, we will
	// write out the HTML of the current element.
	objDoc.open();
	objDoc.write( "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" );
	objDoc.write( "<html>" );
	objDoc.write( "<body>" );
    objDoc.write( "<head>" );
	objDoc.write( "<link href=\"http://www.swanturismo.com.ar/css/general.php.css\" rel=\"stylesheet\" type=\"text/css\" /><link href=\"http://www.swanturismo.com.ar/css/imprimir.css\" rel=\"stylesheet\" type=\"text/css\" />" );
	objDoc.write( document.title );
	objDoc.write( "</title>" );
	objDoc.write( jStyleDiv.html() );
	objDoc.write( "</head>" );
	objDoc.write( this.html() );
	objDoc.write( "</body>" );
	objDoc.write( "</html>" );
	objDoc.close();
 
	// Print the document.
	objFrame.focus();
	objFrame.print();
 
	// Have the frame remove itself in about a minute so that
	// we don't build up too many of these frames.
	setTimeout(function(){
		jFrame.remove();
		},
		(60 * 1000)
	);
}



function runSWF(archivo, ancho, alto, version, bgcolor, id, menu, FlashVars, quality, allowScriptAccess) {

	if(version!=""){

		var version_data=version;

	}else{

		var version_data="10,0,45,2";

	}

	if(menu!=""){

		var menu_data=menu;

	}else{

		var menu_data=false;

	}

	if(bgcolor!=""){

		var bgcolor_data=bgcolor;

	}else{

		var bgcolor_data="#FFFFFF";

	}

	if(id!=""){

		var id_data=id;

	}else{

		var id_data="flashMovie";

	}

	if(quality!=""){

		var quality_data=quality;

	}else{

		var quality_data="high";

	}

	if(allowScriptAccess!=""){

		var allowScriptAccess_data=allowScriptAccess;

	}else{

		var allowScriptAccess_data="always";

	}

	 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version_data+'" width='+ancho+' height='+alto+' id='+id_data+'>\n');

	 document.write('<param name="movie" value='+archivo+'>\n');

	 document.write('<param name="allowScriptAccess" value='+allowScriptAccess_data+'>\n');

	 document.write('<param name="quality" value='+quality_data+'>\n');

	 document.write('<param name="FlashVars" value='+FlashVars+'>\n');

	 document.write('<param name="bgcolor" value='+bgcolor_data+'>\n');

	 document.write('<param name="menu" value='+menu_data+' >\n');

	  document.write('<param name=wmode value=transparent >\n');

	 document.write('<embed src='+archivo+' wmode="transparent" bgcolor='+bgcolor_data+' FlashVars='+FlashVars+' menu='+menu_data+' allowScriptAccess='+allowScriptAccess_data+' quality='+quality_data+' pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width='+ancho+' height='+alto+' swLiveConnect=true name='+id_data+'></embed>');

	 document.write('</object>\n');

}







var scrolltotop={

	//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control

	//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).

	setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},

	controlHTML: '<img src="http://www.swanturismo.com.ar/img/top/gotop.png" style="width:36px; height:15px" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"

	controlattrs: {offsetx:163, offsety:70}, //offset of control relative to right/ bottom of window corner

	anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links



	state: {isvisible:false, shouldvisible:false},



	scrollup:function(){

		if (!this.cssfixedsupport) //if control is positioned using JavaScript

			this.$control.css({opacity:0}) //hide control immediately after clicking it

		var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)

		if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists

			dest=jQuery('#'+dest).offset().top

		else

			dest=0

		this.$body.animate({scrollTop: dest}, this.setting.scrollduration);

	},



	keepfixed:function(){

		var $window=jQuery(window)

		var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx

		var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety

		this.$control.css({left:controlx+'px', top:controly+'px'})

	},



	togglecontrol:function(){

		var scrolltop=jQuery(window).scrollTop()

		if (!this.cssfixedsupport)

			this.keepfixed()

		this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false

		if (this.state.shouldvisible && !this.state.isvisible){

			this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])

			this.state.isvisible=true

		}

		else if (this.state.shouldvisible==false && this.state.isvisible){

			this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])

			this.state.isvisible=false

		}

	},

	

	init:function(){

		jQuery(document).ready(function($){

			var mainobj=scrolltotop

			var iebrws=document.all

			mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode

			mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')

			mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')

				.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})

				.attr({title:'Scroll Top'})

				.click(function(){mainobj.scrollup(); return false})

				.appendTo('body')

			if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text

				mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text

			mainobj.togglecontrol()

			$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){

				mainobj.scrollup()

				return false

			})

			$(window).bind('scroll resize', function(e){

				mainobj.togglecontrol()

			})

		})

	}

}



scrolltotop.init();
////////////////////////  sliders  avisos pie   ////////////////////////

	/*

$(function() {	

	// Clone all portfolio items for Quicksand plugin

		var cache_list =$('ul.portfolio').clone();

		

		// When clicked on a link in the portfolio menu

		$('ul.portfolio-menu li a').click(function(e) {

		

		// Remove current old active class

		$('ul.portfolio-menu').children('li').children('a').removeClass('active');

		

		// Set active class on clicked element

		$(this).addClass('active');

		

		// If all portfolio items have to be showed

		if($(this).attr('id') == 'all') {

			

			// Refresh Quicksand

			$('.portfolio').quicksand( cache_list.find('li'), {

		

				  duration: 1000,

				  attribute: function(v) {

				  return $(v).find('img').attr('src');

              }



				}, function() {

				

					lightboxCheck(); // refresh lightbox script (binding)

					initBinding();

				

				});

				e.preventDefault();

		

		// If a particular catagorie has to be showed

		} else {

		

			$('.portfolio').quicksand( cache_list.find('li.'+ $(this).attr('id') +''), {

				  duration: 500,

				  attribute: function(v) {

                return $(v).find('img').attr('src');

              }



				}, function() {

				

					lightboxCheck();

					initBinding();

				

				});

				e.preventDefault();

		}



		});

	$('div.portfolio-slider').sliders({

	

			cycle : true, // true or false

			cycleInterval : 3000, // pause in milleseconds between animation

			arrowNavigationWrapper : 'div.portfolio-slider', // wrapper class

			slideWidth : 350, // width per slide

			projectSlider : true, // true or false

			sliderdots : false // true or false

		

		});

	/////////////////////// fin sliders avisos pie   /////////////////////

});*/


