﻿// Functions specific to a site.



$('.home #header').css("height","426px");

$('.home .h-w1').css("height","426px");

$('.home .h-w2').css("height","426px");

$('.home .w-w2').css("padding-top","426px");



(function($) {

	$(document).ready(function() {

		// Place document manipulation code here

		

		Cufon.replace('h1, .home-blurb, #cm_contentpage h2');

	

		$('#cycle-banner')

		.before('<div id="cycle-button"><ul>') 

		.cycle({ 

			fx:     'fade', 

			speed:  '800', 

			timeout: 4000, 

			pager:  '#cycle-button ul',

			pagerAnchorBuilder: function(idx, slide) {

				var anchor = '';

				anchor = '<li><a href="#" id="btn-cycle-' + (idx + 1) + '">' + (idx + 1) + '</a></li>';

				return anchor;

			}

		});

		

		var str = $("#banner-title1").text();

		$("#btn-cycle-1").html(str);

		var str = $("#banner-title2").text();

		$("#btn-cycle-2").html(str);

		var str = $("#banner-title3").text();

		$("#btn-cycle-3").html(str);

		var str = $("#banner-title4").text();

		$("#btn-cycle-4").html(str);



	/*	Forms	*/

		$('#ItalianChamberForm').validate({

			rules: {

				company: "required",

				phone: "required",

				email: {

					required: true,

					email: true

				},

				companyRepresent01: { 

					required: function() {

						$('#importsFromItaly:checked').val() == 'YES';

					}

				}

			}

		});

	});

})(jQuery);
