// JavaScript Document

function addFav(){
    var url = "http://www.arts-books.net";
    var title = "Art Book - Cat&aacute;logo Internacional de Artes";
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}


function idioma(){
if(navigator.browserLanguage) {  
      var language = navigator.browserLanguage;    
   }
   else if(navigator.language) {
      var language = navigator.language;
   }
   
   switch (language.substring(0,2))  {
	  case "fr" : location.href="http://fr.arts-books.net/index.php";
         break;
      case "en" : location.href="http://en.arts-books.net/index.php";
         break;
      case "es" : location.href="http://es.arts-books.net/index.php";
         break;
	   case "pt" : location.href="http://arts-books.net/index.php";
         break;
	   case "pt_br" : location.href="http://arts-books.net/index.php";
         break;
	   case "br" : location.href="http://arts-books.net/index.php";
         break;
	   case "it" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "de" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "nl" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "ru" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "el" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "ca" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "be" : location.href="http://fr.arts-books.net/index.php";
         break;
	   case "dk" : location.href="http://en.arts-books.net/index.php";
         break;
	   case "ae" : location.href="http://en.arts-books.net/index.php";
         break;
	    case "jp" : location.href="http://en.arts-books.net/index.php";
         break;
	  	case "it" : location.href="http://en.arts-books.net/index.php";
         break;
	    case "de" : location.href="http://en.arts-books.net/index.php";
         break;
        case "se" : location.href="http://en.arts-books.net/index.php";
         break;
		case "no" : location.href="http://en.arts-books.net/index.php";
         break;
		case "fi" : location.href="http://en.arts-books.net/index.php";
         break;
	    case "sz" : location.href="http://en.arts-books.net/index.php";
         break;
	    case "me" : location.href="http://es.arts-books.net/index.php";
         break;
	     case "eq" : location.href="http://es.arts-books.net/index.php";
         break;
	    case "ch" : location.href="http://es.arts-books.net/index.php";
         break;
		case "am" : location.href="http://es.arts-books.net/index.php";
         break;
		default: location.href="http://en.arts-books.net/index.php";
		 break;
}

}

function clickaa(){
		if (window.Event) 
		document.captureEvents(Event.MOUSEUP); 
		function nocontextmenu()
		{ 
			event.cancelBubble = true 
			event.returnValue = false; 
			return false; 
		} 
		
		function norightclick(e) 
		{ 
			if (window.Event) 
		{ 
			if (e.which !=1) 		
return false; 
		} 
			else 
			if (event.button !=1) 
		{ 
		event.cancelBubble = true 
		event.returnValue = false; 
		return false; 
		} 
		} 
		document.oncontextmenu = nocontextmenu; 
		document.onmousedown = norightclick; 
	



/* 			function onKeyDown() {
 			if (event.ctrlKey){ 	 
	 		event.keyCode = 0;
	 		event.returnValue = false;
	 	}
	 }
document.onkeydown = onKeyDown; */
}

function data(){
			var hoje = new Date();
			var sem = hoje.getDay();
			var dia = hoje.getDate();
			var mes = hoje.getMonth();
			var ano = hoje.getFullYear();
				switch(sem){
				case 0:
				sem = "Domingo";
				break;
				case 1:
				sem = "Segunda-feira";
				break;
				case 2:
				sem = "Ter&ccedil;a-feira";
				break;
				case 3:
				sem = "Quarta-feira";
				break;
				case 4:
				sem = "Quinta-feira";
				break;
				case 5:
				sem = "Sexta-feira";
				break;
				case 6:
				sem = "S&aacute;bado";
				break;}
				switch(mes)
				{
				case 0:
				mes = "Janeiro";
				break;
				case 1:
				mes = "Fevereiro";
				break;
				case 2:
				mes = "Mar&ccedil;o";
				break;
				case 3:
				mes = "Abril";
				break;
				case 4:
				mes = "Maio";
				break;
				case 5:
				mes = "Junho";
				break;
				case 6:
				mes = "Julho";
				break;
				case 7:
				mes = "Agosto";
				break;
				case 8:
				mes = "Setembro";
				break;
				case 9:
				mes = "Outubro";
				break;
				case 10:
				mes = "Novembro";
				break;
				case 11:
				mes = "Dezembro";
				break;}

document.write("" + sem+", " + dia + " de "  + mes +" de " +ano + "" );
 }
 
 function fechar(){
setInterval("document.getElementById('banner2').style.display='none'", 5000);
setInterval("document.getElementById('fechar').style.display='none'", 5000);
 }
 
 function fechado(){
	 document.getElementById('banner2').style.display = 'none';
	  document.getElementById('fechar').style.display = 'none';
}

			/* *************************** */
			/* BEGIN ZOOMSHOWCASE SETTINGS */
			/* *************************** */
			zoomShowcaseSettings = {
				
				/* The original image width */
				imageWidth: 565,
				
				/* The original image height */
				imageHeight: 415,
				
				/* The total alloted width for the banner */
				bannerWidth: 900,
				
				/* The speed of the shuffle animation in milliseconds */
				animationSpeed: 850,
				
				/* Options are "easeOutQuint", "easeInOutQuint", "easeOutQuad" and "easeInOutQuad",  */
				easing: "easeOutQuad",
				
				/* The opacity of the side items, 0-1 */
				sideOpacity: 0.5,
				
				/* Choose to set the Slideshow to auto-play, true/false */
				autoPlay: true,
				
				/* The autoPlay delay in milliseconds */
				autoPlayDelay: 4000,
				
				/* Choose to randomize the slide order everytime someone visits your web page, true/false */
				randomizeItems: false,
				
				/* The link target when a slide is linked, options are "_parent" and "_blank" */
				linkTarget: "_self",
				
				/* The percentage to zoom out the sides, 0-1 */
				sideZoom: 0.75,
				
				/* The percentage to zoom out the back slide, 0-1 */
				backZoom: 0.5
				
			}
			
			/* ************************ */
			/* BEGIN DEVELOPER SETTINGS */
			/* ************************ */
			jQuery(document).ready(function() {
				
				jQuery.zoomShowcase(zoomShowcaseSettings);
				zoomShowcaseSettings = null;
				
				/*
			
				// ZOOM SHOWCASE API
				
				jQuery.zoomShowcase.goLeft();
				jQuery.zoomShowcase.goRight();
				
				// Clicks should only follow each other after
				// the animation has completed.  This call
				// will tell you when that the animation has completed;
				var animationComplete = jQuery.zoomShowcase.isReady(); // returns true or false
				
				*/
				
			});
			
			jQuery(function($) {
	$("img.reflect").reflect({height:35,opacity:0.2});
});

// Header/Toppanel h1-h6 Tag Gradients
Cufon.replace('#header h1, #footer-wrap h1', {color: '-linear-gradient(#fff,#f5f5f5,)'});	
Cufon.replace('#header h2, #footer-wrap h2', {color: '-linear-gradient(#fff,#f5f5f5,)'});	
Cufon.replace('#header h3, #header h4, #header h5, #header h6, #footer-wrap h3,#footer-wrap h4,#footer-wrap h5,#footer-wrap h6,.tweets h3', {color: '-linear-gradient(#fff,#f5f5f5,)'});	
// Content h1-h6 Tag Gradients
// Light Inner Skin
Cufon.replace('.inner-page h1,#toppanel h1', {color: '-linear-gradient(#777,#555,)'});	
Cufon.replace('.inner-page h2, .gallerywrap h1, .gallerywrap h2, .gallerywrap h3, .gallerywrap h4, .gallerywrap h5, #toppanel h2', {color: '-linear-gradient(#777,#555,)'});	
Cufon.replace('.inner-page h3,#toppanel h3, .inner-page h4, #toppanel h4,.inner-page h5,#toppanel h5,.inner-page h6,#toppanel h6', {color: '-linear-gradient(#777,#555,)'});

// Gallery Text Overlay Gradients
	
Cufon.replace('.stage-slider .gallerytitle.light h2, .stage-slider .gallerytitle.light h3', {color: '-linear-gradient(#f9f9f9, #fff,)'});
Cufon.replace('.stage-slider .gallerytitle.dark h2, .stage-slider .gallerytitle.dark h3', {color: '-linear-gradient(#999, #333,)'});

  $(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto();
  });
  
  function  ver(){
document.getElementById("close").style.display = "block";
  }
