Subversion Repositories SmartDukaan

Rev

Rev 1773 | Rev 1796 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1773 Rev 1778
Line 1... Line 1...
1
// Ebizon Move script js into the file
1
// Ebizon Move script js into the file
2
 
2
 
-
 
3
$(document).ready(function() {
-
 
4
  var count = $('.comparision-product-column').length;
-
 
5
  if(count < 4) {
-
 
6
    if(count == 3) {
-
 
7
      var subtract = 6;
-
 
8
    } else if(count == 2) {
-
 
9
      var subtract = 3;
-
 
10
    } else {
-
 
11
      var subtract = 0;
-
 
12
    }
-
 
13
    var parentWidth = $('#comparision-right').width();
-
 
14
    var width = (parentWidth - subtract)/count;
-
 
15
    var newWidth = parseInt(width);
-
 
16
    $('.product-name').width(newWidth);
-
 
17
    $('.comparision-product-column').width(newWidth);
-
 
18
  }
-
 
19
  var style = $('.jspTrack').attr('style');
-
 
20
  $('.jspTrackbottom').attr('style', style);
-
 
21
  var style = $('.jspDrag').attr('style');
-
 
22
  $('.jspDragbottom').attr('style', style);
-
 
23
  $('.ui-state-default').click(function(){
-
 
24
    var title = this.title;
-
 
25
    var aID = $("li.ui-state-active").children('a:first').attr('href');
-
 
26
    var array = aID.split("#");
-
 
27
    var displayID = array[1];
-
 
28
    var new_aID = $(this).children('a:first').attr('href');
-
 
29
    var new_array = new_aID.split("#");
-
 
30
    var new_displayID = new_array[1];
-
 
31
    $('.'+displayID).each(function(){
-
 
32
      this.style.display = 'none';
-
 
33
      $(this).removeClass("comparision-block").addClass('comparision-hide');
-
 
34
    });
-
 
35
    if(new_displayID == 'vtab-1') {
-
 
36
    //$('#comparision-right').removeClass("product-comparision-internal").addClass('product-comparision-home');
-
 
37
    //$('.product-summary-column').show();
-
 
38
    } else {
-
 
39
    //$('#comparision-right').removeClass("product-comparision-home").addClass('product-comparision-internal');
-
 
40
    //$('.product-summary-column').hide();
-
 
41
    }
-
 
42
    $('.comparision-page-title').html(this.title);
-
 
43
    $('.ui-state-active').removeClass("ui-tabs-selected ui-state-active");
-
 
44
    $(this).addClass("ui-tabs-selected ui-state-active");
-
 
45
    $('.'+new_displayID).each(function() {
-
 
46
      $(this).removeClass("comparision-hide").addClass('comparision-block');
-
 
47
      this.style.display = 'block';
-
 
48
    });
-
 
49
    return false;
-
 
50
  });
-
 
51
  $('.comparision-hide').each(function(){
-
 
52
    this.style.display = 'none';
-
 
53
  });
-
 
54
});
-
 
55
 
3
$(document).ready(function(){
56
$(document).ready(function(){
4
	
57
	
5
	//For Registration Page
58
	//For Registration Page
6
	$('#frmRegister #email').change(function(){
59
	$('#frmRegister #email').change(function(){
7
		$('#communicationEmail').val($(this).val());
60
		$('#communicationEmail').val($(this).val());
Line 222... Line 275...
222
	} else	{
275
	} else	{
223
		alert("Please select atleast one product");
276
		alert("Please select atleast one product");
224
	}
277
	}
225
  });
278
  });
226
 
279
 
-
 
280
 $("#research_compare").live('click', function(){
-
 
281
        var seldata = "";
-
 
282
        var tot = 1;
-
 
283
        var saprt = "";
-
 
284
        var containerdiv = "#pane1";
-
 
285
        var par = containerdiv + " input[type=checkbox]:checked";
-
 
286
 
-
 
287
        $(par).each(function(){
-
 
288
        		if(tot == 1){
-
 
289
        			seldata +=  "mobile"+tot + "=" + $(this).val();
-
 
290
        		}else{
-
 
291
        			seldata +=  "&mobile"+tot + "=" + $(this).val();
-
 
292
        		}
-
 
293
                tot ++;
-
 
294
        });
-
 
295
 
-
 
296
        if(tot > 2)     {
-
 
297
                window.location="/compare-mobile-phones?" + seldata;
-
 
298
        } else  {
-
 
299
                alert("Please select atleast two products");
-
 
300
        }
-
 
301
});
-
 
302
 
-
 
303
 
227
  // Clear old cache keys. These two lines can be deleted after June 5, 2011.  
304
  // Clear old cache keys. These two lines can be deleted after June 5, 2011.  
228
  $.Storage.remove("history");
305
  $.Storage.remove("history");
229
  $.Storage.remove("research");
306
  $.Storage.remove("research");
230
  
307
  
231
  // No uid cookie
308
  // No uid cookie
Line 284... Line 361...
284
			  }
361
			  }
285
		  }
362
		  }
286
	  }
363
	  }
287
  }
364
  }
288
 
365
 
289
});
-
 
290
366
});
-
 
367