﻿// JScript File

function getPizza(productId)
{
     var paramProductId = productId;
     
     $(document).ready(function() {
      
      $.get("dataprovider/getPrice.ashx?product_id="+paramProductId,function(xml){ 
            
            $('div#menu_container').html(xml);
            $('div#menu_container').show('fast');      
            
        });   
     });
}
/**************************************************************/
function getBrands(){
     
     $(document).ready(function() {
      
      $.get("dataprovider/GetBrands.ashx",function(xml){ 
            
            $('div#brand_fill').html(xml);
            $('div#brand_fill').show('fast');      
            
        });   
     });
}

/*********************************************************************************/
function getNews(){
     
     $(document).ready(function() {
      
      $.get("dataprovider/GetNews.ashx",function(xml){ 
            
            $('div#news').html(xml);
            $('div#news').show('fast');      
            
        });   
     });
}

/*********************************************************************************/
function getGallery(){
 
        
      $(document).ready(function() {
      
      $.get("dataprovider/GetGallery.ashx",function(xml){ 
            
            $('div#gallery_fill').html(xml);
            $('div#gallery_fill').show('fast');      
            
        });   
     });
}

/*********************************************************************************/

function getGallery(autoId){
 
      var indexPage = autoId;
      
      $(document).ready(function() {
      
      $.get("dataprovider/GetGallery.ashx",function(xml){ 
            $('div#gallery_fill').html(xml);
            $('div#gallery_fill').show('fast');      
        });   
     });
}
/*********************************************************************************/
function getReferanceList(index){
       
//       clearReferanceContent();
      //paramReferanceId
      var indexPage = index;
        
      $(document).ready(function() {
      
      $.get("ajax/GetReferanceList.ashx?index="+indexPage,function(xml){ 
            doVisible();
            $('div#referanceList').html(xml);
            $('div#referanceList').show('fast');      
            
        });   
     });
     
}/*end of getReferanceList(referanceId)*/
/*********************************************************************************/

function clearReferanceContent(){
     $(document).ready(function() {
     
            $('div#referanceList').html("");
            $('div#referanceList').show('fast');      
            
        });
}

function getReferanceImages(paramReferanceId, paramReferansName){

    var referanceId = paramReferanceId;
    
    var referanceName = paramReferansName;

    
      $(document).ready(function() {
      
      $.get("ajax/GetReferancePictures.ashx?referanceId="+referanceId,function(xml){ 
            doUnvisible();
            $('div#referanceList').html(xml);
            $('div#referanceList').show('fast');      
            
        });   
     });
}
/*********************************************************************************/
/*resim galerisine girince flash ve haber kısımlarının görünmemesi lazım         */
function doUnvisible(){
 $(document).ready(function() {
         $('div#flashDiv').removeClass('flash');
         $('div#flashDiv').addClass('unvisible');
         $('div#newsDiv').removeClass('news');
         $('div#newsDiv').addClass('unvisible');      
     });
}
/*********************************************************************************/
/*resim galerisinden cıkınca tekrar görünür hale getiriyoruz                     */
function doVisible(){

 $(document).ready(function() {
         $('div#flashDiv').removeClass('unvisible');
         $('div#flashDiv').addClass('flash');
         $('div#newsDiv').removeClass('unvisible');
         $('div#newsDiv').addClass('news');      
     }); 
}
/*********************************************************************************/

function getMenu(paramMenuId){
    
    /*
        anasayfa    : 1
        referanslar : 2
        insan kaynakları : 3
        linkler : 4
        iletişim : 5
    */
    var menuIdParam = paramMenuId;
    
    $(document).ready(function() {
      
      $.get("ajax/GetMenu.ashx?menuId="+menuIdParam,function(xml){ 
           
            $('div#modernbricksmenu').html(xml);
            $('div#modernbricksmenu').show('fast');      
            
        });   
     });
     
}/*end of function getMenu*/

/*********************************************************************************/


