// JavaScript Document
$(document).ready(function(){
	$('a.linkAdorno').prepend('<img src="images/linkAdorno01.png" width="14" height="10" /> ');
	$('a.linkAdorno').append(' <img src="images/linkAdorno02.png" width="14" height="10" />');
	$('h3.linkAdorno').prepend('<img src="images/linkAdorno01.png" width="14" height="10" /> ');
	$('h3.linkAdorno').append(' <img src="images/linkAdorno02.png" width="14" height="10" />');
	//$('body').append('<br class="clear" /><a class="Catracion" href="/atracciones.html">Atraciones</a>');
	$("ul#nav li a").hover(function() { //When trigger is clicked...
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){
			
			$(this).parent().find("ul.subnav").slideUp('fast'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() {
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});
	
	$('#noticiasSub li a:contains("Prensa")').remove();
	$('#noticiasSub li a:contains("Boletines")').parent().replaceWith('<li><a href="../boletin/boletin.php">Boletines</a>');
	$('#noticiasSub').css({"padding-left": 655,"width": 295});
	if (window.location.pathname.indexOf('noticias.php')!=-1){
		$('#contenidoSeccion .sidebar #infoSideBar2 .textlink li a:contains("Prensa")').parent().remove();
	}
	
	jQuery.cookie=function(a,b,c){if(arguments.length>1&&String(b)!=="[object Object]"){c=jQuery.extend({},c);if(b===null||b===undefined)c.expires=-1;if(typeof c.expires=="number"){var d=c.expires,e=c.expires=new Date;e.setDate(e.getDate()+d)}return b=String(b),document.cookie=[encodeURIComponent(a),"=",c.raw?b:encodeURIComponent(b),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}c=b||{};var f,g=c.raw?function(a){return a}:decodeURIComponent;return(f=(new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)")).exec(document.cookie))?g(f[1]):null}
   
});
