
$(document).ready(function(){
$("#commentForm").validate();
$("#commentForm2").validate();
$("#commentForm4").validate();
$("#commentForm5").validate();
$("#specialoffer").validate();
$("#emailoffer").validate();
});


$(function() {
$( "#tabs" ).tabs();
});

	
$.fx.speeds._default = 200;
$(function() {
$( "#dialog" ).dialog({
autoOpen: false,
height: 460,
width: 350,
show: "blind",
hide: "slide"
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});


$.fx.speeds._default = 200;
$(function() {
$( "#dialog2" ).dialog({
autoOpen: false,
height: 650,
width: 1050,
show: "blind",
hide: "slide",
closeOnEscape: true
});
$( "#opener2" ).click(function() {
$( "#dialog2" ).dialog( "open" );
return false;
});
});

$.fx.speeds._default = 200;
$(function() {
$( "#dialog3" ).dialog({
autoOpen: false,
height: 650,
width: 1050,
show: "blind",
hide: "slide",
closeOnEscape: true
});
$( "#opener3" ).click(function() {
$( "#dialog3" ).dialog( "open" );
return false;
});
});

$.fx.speeds._default = 200;
$(function() {
$( "#dialog4" ).dialog({
autoOpen: false,
height: 650,
width: 1050,
show: "blind",
hide: "slide",
closeOnEscape: true
});
$( "#opener4" ).click(function() {
$( "#dialog4" ).dialog( "open" );
return false;
});
});

$.fx.speeds._default = 200;
$(function() {
$( "#dialog5" ).dialog({
autoOpen: false,
width: 600,
show: "blind",
hide: "slide",
closeOnEscape: true
});
$( "#opener5" ).click(function() {
$( "#dialog5" ).dialog( "open" );
return false;
});
});

			
$(function() {
$( "input:submit, a, button", ".form" ).button();
$( "a", ".form" ).click(function() { return false; });
$( "#radio" ).buttonset();
$( "#check" ).button();
$( "#checkbox" ).buttonset();
$( "#accordion" ).accordion({
	autoHeight: false,
	navigation: true
	});
});

$(function() {
            $( "#collapse" ).accordion({
                  collapsible: true
            });
            $( "#collapse" ).accordion({
                  active: false
            });
      });
	  
$(function(){  
     var totWidth=0;  
     var positions = new Array();  
     $('#cover .slidecontent').each(function(i){  
         positions[i]= totWidth;  
         totWidth += $(this).width();  
         if(!$(this).width())  
        {  
           alert("Please, fill in width & height for all your images!");  
            return false;  
        }  
     });  
        $('#cover').width(totWidth);  
     $('#menu ul li a').click(function(e){ 
         $('li.menuItem').removeClass('act').addClass('inact');  
        $(this).parent().addClass('act');  
        var pos = $(this).parent().prevAll('.menuItem').length;  
        $('#cover').stop().animate({marginLeft:-positions[pos]+'px'},450);  
         e.preventDefault();  
     });  
     $('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact');  
 }) 

