Subversion Repositories SmartDukaan

Rev

Rev 1410 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1410 Rev 1456
Line 56... Line 56...
56
    		
56
    		
57
   		<div class="clearBoth"></div>
57
   		<div class="clearBoth"></div>
58
    </div><!-- /main -->
58
    </div><!-- /main -->
59
	 
59
	 
60
	 $action.getFooterSnippet()
60
	 $action.getFooterSnippet()
61
 
-
 
-
 
61
<script type="text/javascript" src="/js/entity.js"></script>
62
<script type="text/javascript" charset="utf-8">
62
<script type="text/javascript" charset="utf-8">
63
/*youtube video init*/
63
/*youtube video init*/
64
google.load("swfobject", "2.1");
64
google.load("swfobject", "2.1");
65
 
-
 
66
$(function(){
-
 
67
     $('#loopedSlider').loopedSlider();
-
 
68
});
-
 
69
 
-
 
70
$(function() {
-
 
71
runEffect();
-
 
72
});
-
 
73
 
-
 
74
 
-
 
75
$(document).ready(
-
 
76
function() {
-
 
77
          $(".controls").tabs();
-
 
78
});
-
 
79
 
-
 
80
$(function() {
-
 
81
     $('#forgot_username_link').tipsy({gravity: 'w'});
-
 
82
});
-
 
83
 
-
 
84
function changeSignInClass(){
-
 
85
     if(document.getElementById("signinClass").className.indexOf("signin1")> -1){
-
 
86
          document.getElementById("signinClass").className='signin';
-
 
87
     }else{
-
 
88
          document.getElementById("signinClass").className='signin1';
-
 
89
     }
-
 
90
}
-
 
91
 
-
 
92
$(document).ready(function() {
-
 
93
   // Main "Add to Cart" 
-
 
94
    $("#zipcode").val($("#defaultpincode").val()); 
-
 
95
   
-
 
96
    $("#colorselector").change(onSelectChange);
-
 
97
 
-
 
98
	function onSelectChange(){
-
 
99
	    var selected = $("#colorselector option:selected");
-
 
100
    	var output = "";
-
 
101
		var itemid = selected.val();
-
 
102
		//alert("SP for item id" + itemid + " is " + PARAMETERS[itemid].SP);
-
 
103
		$('#sp').html(PARAMETERS[itemid].SP);
-
 
104
		$('#mrp').html(PARAMETERS[itemid].MRP);
-
 
105
		$('#saving').html(PARAMETERS[itemid].SAVING);
-
 
106
		$("#item_id").val(itemid);
-
 
107
		return false;
-
 
108
	}
-
 
109
 
-
 
110
    $("a.colorselector").click(function() {
-
 
111
				//alert("color is"+$(this).attr('color') + "item id"+ $(this).attr('itemid'));
-
 
112
				$('.a.colorselector').addClass('deselect');
-
 
113
				$(this).addClass('deselect');
-
 
114
				var itemid = $(this).attr('itemid')
-
 
115
        		//alert("SP for item id" + itemid + " is " + PARAMETERS[itemid].SP);
-
 
116
				$('#sp').html(" "+PARAMETERS[itemid].SP);
-
 
117
				$('#mrp').html(" "+PARAMETERS[itemid].MRP);
-
 
118
				$('#saving').html(PARAMETERS[itemid].SAVING);
-
 
119
				$("#item_id").val(itemid);
-
 
120
				return false;
-
 
121
    });
-
 
122
 
-
 
123
	
-
 
124
		
-
 
125
   $("#addcart").click(function(){
-
 
126
 
-
 
127
     // alert("AJAX request to add products in Cart. Product ID: "+$("#item_id").val());
-
 
128
	 
-
 
129
     jQuery.ajax({
-
 
130
          type: "POST",
-
 
131
          url: "../cart",
-
 
132
          data: "productid="+$("#item_id").val(),
-
 
133
          success: function(msg){
-
 
134
               $("#cartItemCount").html((msg*1));
-
 
135
			   window.location="/cart";
-
 
136
          //     alert( "Data Saved: " + msg );
-
 
137
          }
-
 
138
     });
-
 
139
   });
-
 
140
   
-
 
141
    jQuery.ajax({
-
 
142
      type: "GET",
-
 
143
      url: "../estimate/"+$("#zipcode").val()+"_"+$("#item_id").val(),
-
 
144
      beforeSend: function(){ $("#shipping_time").html("<img src='../images/loader_l.gif'>"); },
-
 
145
      success: function(msg){
-
 
146
	  	//	alert( "delivery estimate is " + msg);
-
 
147
           $("#shipping_time").html(msg);
-
 
148
      }
-
 
149
 });
-
 
150
 
-
 
151
 load_history_widget();
-
 
152
 
-
 
153
});
-
 
154
 
-
 
155
function updateEstimate(){
-
 
156
jQuery.ajax({
-
 
157
      type: "GET",
-
 
158
      url: "../estimate/"+$("#zipcode").val()+"_"+$("#item_id").val(),
-
 
159
      beforeSend: function(){ $("#days").html("<img src='../images/loader_l.gif'>"); },
-
 
160
      success: function(msg){
-
 
161
	  		//alert( "delivery estimate is " + msg);
-
 
162
           $("#shipping_time").html(msg);
-
 
163
      }
-
 
164
 });
-
 
165
}
-
 
166
 
-
 
167
</script>
65
</script>
168
 
66
 
169
</body>
67
</body>
170
</html>
68
</html>
171
69