
$(document).ready(function(){
	/* Corner divs */
	//$('.tab').corner("10px top");
	//$('.corner').corner("10px top");      
    
 $(function(){ 
  
  settingsCorner = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 0 },
          br: { radius: 0 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div","span"]
      };
   
    settingsRounded = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,                 
          validTags: ["div","span"]
      };   
      
    settingsInput = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
          validTags: ["input","textarea"]
      };          
      
                                        
  $('.corner').corner("10px top");
  //$('.tab').corner(settingsCorner); 
  $('.rounded').corner(); 
  

  
  $("#div1").corner("round");
  

   

  if(!$.browser.msie){
    $(".wpcf7-form-control-wrap").corner();
  $("#your-submit").corner();  
  
  
  $('.inputRounded').corner(); 
  
  $('.wpcf7-text').corner();
  $('.wpcf7-validates-as-required').corner();  
  $('.wpcf7-submit').corner();  
  
  
    $("#comment").corner("round");
    $("#submit").corner("round");
    $("#author").corner("round");
    $("#email").corner("round");
    $("#url").corner("round");   
  
  }

   
  
  
  
  

  });   
    

function roundInput(input_id, container_class, border_class){
	var input = $('#'+input_id+'');
	var input_width = input.css("width"); //get the width of input   
	
	var wrap_width = parseInt(input_width) ;//+ 10; //add 10 for padding
	wrapper = input.wrap("<div class='"+container_class+"'></div>").parent();
	wrapper.wrap("<div class='"+border_class+"' style='width: "+wrap_width+"px;'></div>"); //apply border
	wrapper.corner("round 8px").parent().css('padding', '2px').corner("round 10px"); //round box and border
}
        
/* round 2 inputs */
$(function(){             

  //roundInput('your-name','rounded_container','rounded_border');
	//roundInput('rounded_input2','rounded_container','rounded_border');
	
});


    
    
  droplinemenu.buildmenu("droplinetabs1");
	/* Featired rotator */
	//$("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 6000, false);
	$("#feature").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 6000, false);	                                                                                  
	/* Promo rotator */
	/*blockster({
    holder: '.promos',
    rows: 4,
    cols: 6,
     random: true
	}); */ 
	      
 

/* Release rotator  
$(function() {
    $(".releases").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
        speed: 300,
	      easing: "bounceout",
	      width: 335,
	      height:150,
	      
		auto: 4000
    });    
});       */     
                
//Dialog

$(function() {
 
    // if user clicked on button, the overlay layer or the dialogbox, close the dialog  
    $('a.btn-ok, #dialog-overlay').click(function () {     
        $('#dialog-overlay, #dialog-box').hide();       
        return false;
    });
     
    // if user resize the window, call the same function again
    // to make sure the overlay fills the screen and dialogbox aligned to center    
    $('#opener').click(function () {
         
        
        popup();       
    }); 
     
     
});   

}); 
 

//Popup dialog
function popup(message) {
         
    // get the screen height and width  
    var maskHeight = $(document).height();  
    var maskWidth = $(window).width();
     
    // calculate the values for center alignment
    var dialogTop =  70;//(maskHeight/3) - ($('#dialog-box').height());  
    var dialogLeft = 600;//(maskWidth/2) - ($('#dialog-box').width()/2); 
                
    // assign values to the overlay and dialog box
    $('#dialog-overlay').css({height:maskHeight, width:maskWidth}).show();
    $('#dialog-box').css({top:dialogTop, left:dialogLeft}).show();
     
    // display the message
    $('#dialog-message').html(message);
             
}

