David %!s(int64=11) %!d(string=hai) anos
pai
achega
4e0edb2ec3
Modificáronse 3 ficheiros con 100 adicións e 0 borrados
  1. 81 0
      js/main.js
  2. 15 0
      piwik.html
  3. 4 0
      robots.txt

+ 81 - 0
js/main.js

@@ -0,0 +1,81 @@
+window.onload = function() {
+	var availableWidth = [ 500, 1024, 1400, 1920];
+	var size=0; 
+	var banner=document.getElementById("banner");
+	while ($(window).width() > availableWidth[size] && size < availableWidth.length-1 ) 
+		size++;
+	banner.src="Images/slider/slide1-"+availableWidth[size]+".jpg";
+
+	var contact= document.getElementsByClassName("contact");
+	var tit_curso = document.getElementsByClassName("titulo_curso");
+	var desc_curso = document.getElementsByClassName("descripcion_curso");
+	function curso_click(){ 
+		for(var j =0; j < desc_curso.length; j++){
+			if (desc_curso[j].getAttribute("tatosa") == this.getAttribute("tatosa"))
+				desc_curso[j].style.display="block";
+		}
+	}
+	for(var i =0; i < tit_curso.length; i++)
+		tit_curso[i].onclick=curso_click;
+
+	for(var i =0; i < contact.length; i++)
+		contact[i].onclick=showContact;
+
+    function showContact() {
+        $('.basic-grey, #overlay-contact').toggle();
+        if($('.basic-grey').is(':visible')){ 
+            $('#overlay-contact').click(function(){
+                $('.basic-grey, #overlay-contact').hide();
+            });
+            $('#exit').click(function(){
+                $('.basic-grey, #overlay-contact').hide();
+            });
+        }
+    }
+
+	$('li a').click(function () {
+        $('html, body').animate({ scrollTop: $($(this).attr('href')).position().top }, 'slow');
+        if ($(this).attr('href')=='#footer-outer') { showContact(); }
+	    return false;
+	});
+
+//    $('.menu').hide(); //TATII!!!
+    $('#responsive-menu').click(function(){
+        $('.menu').slideToggle(300);    
+    });
+
+    var startY= $('#top_wrapper').position().top + $('#top_wrapper').outerHeight();
+    $('#logo').css('opacity','0');
+    $('#navlist').css('height','55px');
+    $(window).scroll(function () {
+        if($(this).scrollTop() > startY ){
+            $('#logo').css({'opacity':'1', 'transition': 'opacity 0.5s ease-in-out'});
+        }else{
+            $('#logo').css({'opacity':'0', 'transition': 'opacity 0.5s ease-in-out'});
+        }
+    });
+    $("#btnconsulta").click(function() {
+        $.post('contacto.php',{nombre: $("#name").val(), mail:$("#email").val(),consulta:$("#message").val()}).done(function(data) {
+            $("#respuestacontacto").html(data);
+        });
+    });
+    $("#ok").click(function() {
+        $.post('newsletter.php',{mail:$("#suscribe").val()}).done(function(data) {
+            $("#respuestanewsletter").html(data);
+        });
+    });
+    var curImg=1;
+    setInterval(slide, 8000);
+
+    function slide() {
+        banner.className='transp';
+        setTimeout(transp, 500);
+        curImg++;
+        if(curImg>5) curImg=1;
+    }
+    function transp() {
+		banner.src="Images/slider/slide"+curImg+"-"+availableWidth[size]+".jpg";
+        banner.removeAttribute('class');
+    }
+}
+

+ 15 - 0
piwik.html

@@ -0,0 +1,15 @@
+<!-- Piwik -->
+<script type="text/javascript">
+  var _paq = _paq || [];
+  _paq.push(['trackPageView']);
+  _paq.push(['enableLinkTracking']);
+  (function() {
+    var u="//stats.especificos.com.ar/";
+    _paq.push(['setTrackerUrl', u+'piwik.php']);
+    _paq.push(['setSiteId', 1]);
+    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+  })();
+</script>
+<noscript><p><img src="//stats.especificos.com.ar/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
+<!-- End Piwik Code -->

+ 4 - 0
robots.txt

@@ -0,0 +1,4 @@
+User-agent: *
+Disallow: /Images/
+Disallow: /Fonts/
+Disallow: /syncer.sh